aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBen V. Brown <[email protected]>2021-01-17 10:57:24 +1100
committerBen V. Brown <[email protected]>2021-01-17 10:57:24 +1100
commit1b0b665072aae7f5df6bf19fc82559b852c6f7c3 (patch)
tree801e74ba92eb92509cadde704af20ba0c9edeaec
parent7ecc7e4d12164575fcf4f1dbd1912285e18f8dde (diff)
downloadIronOS-1b0b665072aae7f5df6bf19fc82559b852c6f7c3.tar.gz
IronOS-1b0b665072aae7f5df6bf19fc82559b852c6f7c3.zip
Create style call in Makefile
-rw-r--r--source/Core/BSP/Miniware/Vendor/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc_ex.h4
-rw-r--r--source/Core/BSP/Pine64/Vendor/SoC/gd32vf103/Common/Source/system_gd32vf103.c9
-rw-r--r--source/Makefile14
3 files changed, 22 insertions, 5 deletions
diff --git a/source/Core/BSP/Miniware/Vendor/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc_ex.h b/source/Core/BSP/Miniware/Vendor/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc_ex.h
index 2d25e59b..f6a8c35e 100644
--- a/source/Core/BSP/Miniware/Vendor/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc_ex.h
+++ b/source/Core/BSP/Miniware/Vendor/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc_ex.h
@@ -74,8 +74,8 @@ typedef struct {
Note: Depending on devices, some channels may not be available on package pins. Refer to device datasheet for channels availability.
Note: On STM32F1 devices with several ADC: Only ADC1 can access internal measurement channels (VrefInt/TempSensor)
Note: On STM32F10xx8 and STM32F10xxB devices: A low-amplitude voltage glitch may be generated (on ADC input 0) on the PA0 pin, when the ADC is converting with
- injection trigger. It is advised to distribute the analog channels so that Channel 0 is configured as an injected channel. Refer to errata
- sheet of these devices for more details. */
+ injection trigger. It is advised to distribute the analog channels so that Channel 0 is configured as an injected channel. Refer to
+ errata sheet of these devices for more details. */
uint32_t InjectedRank; /*!< Rank in the injected group sequencer
This parameter must be a value of @ref ADCEx_injected_rank
Note: In case of need to disable a channel or change order of conversion sequencer, rank containing a previous channel setting can be overwritten by the new channel
diff --git a/source/Core/BSP/Pine64/Vendor/SoC/gd32vf103/Common/Source/system_gd32vf103.c b/source/Core/BSP/Pine64/Vendor/SoC/gd32vf103/Common/Source/system_gd32vf103.c
index 39bdd2ed..fcb8786c 100644
--- a/source/Core/BSP/Pine64/Vendor/SoC/gd32vf103/Common/Source/system_gd32vf103.c
+++ b/source/Core/BSP/Pine64/Vendor/SoC/gd32vf103/Common/Source/system_gd32vf103.c
@@ -511,7 +511,8 @@ void _premain_init(void) {
* by __libc_fini_array function, so we defined a new function
* to do initialization
*/
-void _postmain_fini(int status) { /* TODO: Add your own finishing code here, called after main */ }
+void _postmain_fini(int status) { /* TODO: Add your own finishing code here, called after main */
+}
/**
* \brief _init function called in __libc_init_array()
@@ -522,7 +523,8 @@ void _postmain_fini(int status) { /* TODO: Add your own finishing code here, cal
* \note
* Please use \ref _premain_init function now
*/
-void _init(void) { /* Don't put any code here, please use _premain_init now */ }
+void _init(void) { /* Don't put any code here, please use _premain_init now */
+}
/**
* \brief _fini function called in __libc_fini_array()
@@ -533,6 +535,7 @@ void _init(void) { /* Don't put any code here, please use _premain_init now */ }
* \note
* Please use \ref _postmain_fini function now
*/
-void _fini(void) { /* Don't put any code here, please use _postmain_fini now */ }
+void _fini(void) { /* Don't put any code here, please use _postmain_fini now */
+}
/** @} */ /* End of Doxygen Group NMSIS_Core_SystemAndClock */
diff --git a/source/Makefile b/source/Makefile
index 26e596f8..ef3da370 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -31,7 +31,12 @@ SOURCE_CORE_DIR = ./Core/Src
SOURCE_DRIVERS_DIR = ./Core/Drivers
INC_PD_DRIVERS_DIR = ./Core/Drivers/FUSB302
SOURCE_MIDDLEWARES_DIR = ./Middlewares
+# Find-all's used for formatting
+ALL_INCLUDES = $(shell find ./ -type f -name '*.h') \
+ $(shell find ./ -type f -name '*.hpp')
+ALL_SOURCE = $(shell find ./ -type f -name '*.c') \
+ $(shell find ./ -type f -name '*.cpp')
# Device dependent settings
ifeq ($(model),$(filter $(model),TS100 TS80 TS80P))
$(info Building for Miniware )
@@ -316,6 +321,15 @@ clean :
rm -Rf $(OUTPUT_DIR_BASE)
rm -Rf $(HEXFILE_DIR)
+style:
+ @for src in $(ALL_SOURCE) $(ALL_INCLUDES); do \
+ echo "Formatting $$src..." ; \
+ clang-format -i "$$src" ; \
+ done
+ @echo "Done"
+
+.PHONY: style
+
# pull in dependency info for *existing* .o files
-include $(OUT_OBJS:.o=.d)
-include $(OUT_OBJS_CPP:.o=.d)