Skip to content

Commit

Permalink
case sensitive Folder names, small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
p-h-a-i-l committed Sep 5, 2018
1 parent b21e6dd commit 765f890
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand All @@ -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
#######################################
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions Src/bldc.c → src/bldc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 765f890

Please sign in to comment.