reverted pwm frequency to 100khz

Also recompile on header change
This commit is contained in:
Alessandro Mauri 2026-05-01 19:08:18 +02:00
parent 7aa3e0c3e5
commit f0dfc95910
2 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ U8G2_SRC:=$(U8G2_DIR)/u8x8_d_$(DISPLAY).c $(filter-out $(U8G2_DIR)/u8x8_d_%.c, \
EXTRA_CFLAGS += -I$(U8G2_DIR) EXTRA_CFLAGS += -I$(U8G2_DIR)
ADDITIONAL_C_FILES += lib_i2c.c display.c sc7a20.c pd.c ADDITIONAL_C_FILES += lib_i2c.c display.c sc7a20.c pd.c
HEADER_FILES := $(wildcard *.h)
include ch32fun/ch32fun/ch32fun.mk include ch32fun/ch32fun/ch32fun.mk
@ -29,7 +30,7 @@ $(BUILD_DIR)/%.o : $(U8G2_DIR)/%.c | $(BUILD_DIR)
# build target # build target
TARGET_OBJS := $(addprefix $(BUILD_DIR)/, $(filter-out ch32fun.o, $(notdir $(FILES_TO_COMPILE:.c=.o)))) 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 $@ $(PREFIX)-gcc $(CFLAGS) -c $< -o $@
# link target, the rest of the build is specified in ch32fun.mk # link target, the rest of the build is specified in ch32fun.mk

View File

@ -8,7 +8,7 @@
#define I2C_TARGET I2C1 #define I2C_TARGET I2C1
#define VCC_MV 3480 #define VCC_MV 3480
#define FRAME_TIME_MS 20 // 50Hz #define FRAME_TIME_MS 20 // 50Hz
#define PWM_FREQ_HZ 150000 // TIM3 PWM frequency #define PWM_FREQ_HZ 100000 // TIM3 PWM frequency
// Pin definitions // Pin definitions
#define PIN_VBUS PA0 // vbus voltage feedback #define PIN_VBUS PA0 // vbus voltage feedback