From 765f890eaadea45adf9afcfc119be1720095e8fc Mon Sep 17 00:00:00 2001 From: phail Date: Mon, 3 Sep 2018 22:51:47 +0200 Subject: [PATCH] case sensitive Folder names, small changes --- .gitignore | 3 +++ Makefile | 22 +++++++++++----------- {Inc => inc}/config.h | 0 {Inc => inc}/defines.h | 0 {Inc => inc}/setup.h | 0 {Inc => inc}/stm32f1xx_hal_conf.h | 0 {Inc => inc}/stm32f1xx_it.h | 0 {Src => src}/bldc.c | 4 ++-- {Src => src}/comms.c | 0 {Src => src}/control.c | 0 {Src => src}/main.c | 0 {Src => src}/setup.c | 0 {Src => src}/stm32f1xx_it.c | 0 {Src => src}/system_stm32f1xx.c | 0 14 files changed, 16 insertions(+), 13 deletions(-) rename {Inc => inc}/config.h (100%) rename {Inc => inc}/defines.h (100%) rename {Inc => inc}/setup.h (100%) rename {Inc => inc}/stm32f1xx_hal_conf.h (100%) rename {Inc => inc}/stm32f1xx_it.h (100%) rename {Src => src}/bldc.c (97%) rename {Src => src}/comms.c (100%) rename {Src => src}/control.c (100%) rename {Src => src}/main.c (100%) rename {Src => src}/setup.c (100%) rename {Src => src}/stm32f1xx_it.c (100%) rename {Src => src}/system_stm32f1xx.c (100%) diff --git a/.gitignore b/.gitignore index 72db3d9a..dbfd7177 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ build/* .vscode/.browse.c_cpp.db* .vscode/c_cpp_properties.json .vscode/launch.json +.travis.yml +.vscode/extensions.json +lib/readme.txt diff --git a/Makefile b/Makefile index 832aab58..b8fd746f 100644 --- a/Makefile +++ b/Makefile @@ -35,13 +35,13 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc.c \ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c \ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.c \ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c \ -Src/system_stm32f1xx.c \ -Src/setup.c \ -Src/control.c \ -Src/main.c \ -Src/bldc.c \ -Src/comms.c \ -Src/stm32f1xx_it.c \ +src/system_stm32f1xx.c \ +src/setup.c \ +src/control.c \ +src/main.c \ +src/bldc.c \ +src/comms.c \ +src/stm32f1xx_it.c \ # ASM sources ASM_SOURCES = \ @@ -89,7 +89,7 @@ AS_INCLUDES = # C includes C_INCLUDES = \ --IInc \ +-Iinc \ -IDrivers/STM32F1xx_HAL_Driver/Inc \ -IDrivers/STM32F1xx_HAL_Driver/Inc/Legacy \ -IDrivers/CMSIS/Device/ST/STM32F1xx/Include \ @@ -135,10 +135,10 @@ vpath %.c $(sort $(dir $(C_SOURCES))) OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) vpath %.s $(sort $(dir $(ASM_SOURCES))) -$(BUILD_DIR)/%.o: %.c Inc/config.h Makefile | $(BUILD_DIR) +$(BUILD_DIR)/%.o: %.c inc/config.h Makefile | $(BUILD_DIR) $(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@ -$(BUILD_DIR)/%.o: %.s Inc/config.h Makefile | $(BUILD_DIR) +$(BUILD_DIR)/%.o: %.s inc/config.h Makefile | $(BUILD_DIR) $(AS) -c $(CFLAGS) $< -o $@ $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile @@ -155,7 +155,7 @@ $(BUILD_DIR): mkdir -p $@ format: - find Src/ Inc/ -iname '*.h' -o -iname '*.c' | xargs clang-format -i + find src/ inc/ -iname '*.h' -o -iname '*.c' | xargs clang-format -i ####################################### # clean up ####################################### diff --git a/Inc/config.h b/inc/config.h similarity index 100% rename from Inc/config.h rename to inc/config.h diff --git a/Inc/defines.h b/inc/defines.h similarity index 100% rename from Inc/defines.h rename to inc/defines.h diff --git a/Inc/setup.h b/inc/setup.h similarity index 100% rename from Inc/setup.h rename to inc/setup.h diff --git a/Inc/stm32f1xx_hal_conf.h b/inc/stm32f1xx_hal_conf.h similarity index 100% rename from Inc/stm32f1xx_hal_conf.h rename to inc/stm32f1xx_hal_conf.h diff --git a/Inc/stm32f1xx_it.h b/inc/stm32f1xx_it.h similarity index 100% rename from Inc/stm32f1xx_it.h rename to inc/stm32f1xx_it.h diff --git a/Src/bldc.c b/src/bldc.c similarity index 97% rename from Src/bldc.c rename to src/bldc.c index e5c609cd..d023c288 100644 --- a/Src/bldc.c +++ b/src/bldc.c @@ -36,7 +36,7 @@ const uint8_t hall_to_pos[8] = { 0, }; -inline void blockPWM(int pwm, int pos, int *u, int *v, int *w) { +static inline void blockPWM(int pwm, int pos, int *u, int *v, int *w) { switch(pos) { case 0: *u = 0; @@ -75,7 +75,7 @@ inline void blockPWM(int pwm, int pos, int *u, int *v, int *w) { } } -inline void blockPhaseCurrent(int pos, int u, int v, int *q) { +static inline void blockPhaseCurrent(int pos, int u, int v, int *q) { switch(pos) { case 0: *q = u - v; diff --git a/Src/comms.c b/src/comms.c similarity index 100% rename from Src/comms.c rename to src/comms.c diff --git a/Src/control.c b/src/control.c similarity index 100% rename from Src/control.c rename to src/control.c diff --git a/Src/main.c b/src/main.c similarity index 100% rename from Src/main.c rename to src/main.c diff --git a/Src/setup.c b/src/setup.c similarity index 100% rename from Src/setup.c rename to src/setup.c diff --git a/Src/stm32f1xx_it.c b/src/stm32f1xx_it.c similarity index 100% rename from Src/stm32f1xx_it.c rename to src/stm32f1xx_it.c diff --git a/Src/system_stm32f1xx.c b/src/system_stm32f1xx.c similarity index 100% rename from Src/system_stm32f1xx.c rename to src/system_stm32f1xx.c