diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 13bedd8..0000000 --- a/.clang-format +++ /dev/null @@ -1,16 +0,0 @@ -BasedOnStyle: LLVM -IndentWidth: 4 # Use 4 spaces for indentation -TabWidth: 4 # Tab width is also 4 spaces -UseTab: Never # Always use spaces instead of tabs -ColumnLimit: 120 # Wrap lines after 80 characters -AllowShortLoopsOnASingleLine: true -AlwaysBreakTemplateDeclarations: true -BreakConstructorInitializers: BeforeComma -AlignConsecutiveDeclarations: - Enabled: true - AcrossEmptyLines: false - AcrossComments: false - AlignCompound: false - AlignFunctionPointers: false - PadOperators: false -AlignConsecutiveMacros: true diff --git a/.gitignore b/.gitignore index 099dd79..1c3c380 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ bin/ *.bin generated.*.ld compile_commands.json -tags diff --git a/main.c b/main.c index 831d333..f821803 100644 --- a/main.c +++ b/main.c @@ -2,30 +2,31 @@ #include static void clock_setup(void) { - // Use external 8 MHz HSE and PLL to 72 MHz - rcc_clock_setup_pll(&rcc_hse_configs[RCC_CLOCK_HSE8_72MHZ]); - rcc_periph_clock_enable(RCC_GPIOC); + // Use external 8 MHz HSE and PLL to 72 MHz + rcc_clock_setup_pll(&rcc_hse_configs[RCC_CLOCK_HSE8_72MHZ]); + rcc_periph_clock_enable(RCC_GPIOC); } static void gpio_setup(void) { - // gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO13); - gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_2_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO13); + // gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO13); + gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_2_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, + GPIO13); } static void delay(volatile uint32_t count) { - while (count-- > 0) { - __asm__("nop"); - } + while (count-- > 0) { + __asm__("nop"); + } } int main(void) { - clock_setup(); - gpio_setup(); + clock_setup(); + gpio_setup(); - while (1) { - gpio_toggle(GPIOC, GPIO13); // On Blue Pill: LED is on PC13 - delay(10000000); // Crude delay loop - } + while (1) { + gpio_toggle(GPIOC, GPIO13); // On Blue Pill: LED is on PC13 + delay(10000000); // Crude delay loop + } - return 0; + return 0; } diff --git a/sub_init.sh b/sub_init.sh deleted file mode 100644 index 33a408b..0000000 --- a/sub_init.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -make clean -make -C libopencm3 clean - -bear -- make -C libopencm3 -j$(nproc) -bear --append -- make -j$(nproc) - -ctags -R .