diff --git a/fw/Makefile b/fw/Makefile index 91a67c6..f9c9dc2 100644 --- a/fw/Makefile +++ b/fw/Makefile @@ -13,6 +13,7 @@ U8G2_SRC:=$(U8G2_DIR)/u8x8_d_$(DISPLAY).c $(filter-out $(U8G2_DIR)/u8x8_d_%.c, \ EXTRA_CFLAGS += -I$(U8G2_DIR) ADDITIONAL_C_FILES += lib_i2c.c display.c sc7a20.c pd.c +HEADER_FILES := $(wildcard *.h) include ch32fun/ch32fun/ch32fun.mk @@ -29,7 +30,7 @@ $(BUILD_DIR)/%.o : $(U8G2_DIR)/%.c | $(BUILD_DIR) # build target TARGET_OBJS := $(addprefix $(BUILD_DIR)/, $(filter-out ch32fun.o, $(notdir $(FILES_TO_COMPILE:.c=.o)))) -$(BUILD_DIR)/%.o : %.c | $(BUILD_DIR) +$(BUILD_DIR)/%.o : %.c $(HEADER_FILES) | $(BUILD_DIR) $(PREFIX)-gcc $(CFLAGS) -c $< -o $@ # link target, the rest of the build is specified in ch32fun.mk diff --git a/fw/funconfig.h b/fw/funconfig.h index 688ba79..f6274d1 100644 --- a/fw/funconfig.h +++ b/fw/funconfig.h @@ -8,7 +8,7 @@ #define I2C_TARGET I2C1 #define VCC_MV 3480 #define FRAME_TIME_MS 20 // 50Hz -#define PWM_FREQ_HZ 150000 // TIM3 PWM frequency +#define PWM_FREQ_HZ 100000 // TIM3 PWM frequency // Pin definitions #define PIN_VBUS PA0 // vbus voltage feedback