diff --git a/examples/GPIO/GPIO.c b/examples/GPIO/GPIO.c index 1922e090298b8a977fa290dec3301abf5e6d1cac..c8682e11eb136b43eaae5449cc498432c0a4ca88 100644 --- a/examples/GPIO/GPIO.c +++ b/examples/GPIO/GPIO.c @@ -13,9 +13,6 @@ #endif -#define SYSTEM_CORE_CLOCK 48000000 -#define APB_CLOCK SYSTEM_CORE_CLOCK - #include "ch32v003fun.h" #include "ch32v003_GPIO_branchless.h" @@ -25,7 +22,7 @@ int main() { - SystemInit48HSI(); + SystemInit(); #if DEMO_GPIO_blink == 1 GPIO_port_enable(GPIO_port_C); diff --git a/examples/GPIO/Makefile b/examples/GPIO/Makefile index 7e60f814bb33181340eca2ad204cee695088fcc8..63ac24fb7e34c86ff22cb82402116bff1e0e7e99 100644 --- a/examples/GPIO/Makefile +++ b/examples/GPIO/Makefile @@ -2,9 +2,6 @@ all : flash TARGET:=GPIO -CFLAGS+=-DTINYVECTOR -CFLAGS+=-DSTDOUT_UART - include ../../ch32v003fun/ch32v003fun.mk flash : cv_flash diff --git a/examples/GPIO/funconfig.h b/examples/GPIO/funconfig.h new file mode 100644 index 0000000000000000000000000000000000000000..820e1f0cb7f25f390febfc96ec5cb77fc281e984 --- /dev/null +++ b/examples/GPIO/funconfig.h @@ -0,0 +1,7 @@ +#ifndef _FUNCONFIG_H +#define _FUNCONFIG_H + +#define FUNCONF_TINYVECTOR 1 +#define CH32V003 1 + +#endif