Skip to content

Commit 7831c47

Browse files
committed
change flag styling
1 parent b4c60c3 commit 7831c47

File tree

13 files changed

+35
-22
lines changed

13 files changed

+35
-22
lines changed

ports/stm32f4/boards/espruino_pico/mpconfigboard.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#define FLASH_SIZE (0x60000)
3333
#define FLASH_PAGE_SIZE (0x4000)
3434

35-
#define AUTORESET_DELAY_MS 500
35+
#define AUTORESET_DELAY_MS (500)
3636
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000)
3737

38-
#define BOARD_OSC_DIV 8
38+
#define BOARD_OSC_DIV (8)
3939

ports/stm32f4/boards/espruino_wifi/mpconfigboard.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
#define FLASH_SIZE (0x80000) //512K
3333
#define FLASH_PAGE_SIZE (0x4000) //16K
3434

35-
#define BOARD_OSC_DIV 8
36-
#define BOARD_OVERWRITE_SWD
35+
#define BOARD_OSC_DIV (8)
36+
#define BOARD_OVERWRITE_SWD (1)

ports/stm32f4/boards/feather_stm32f405_express/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
// Bootloader only
4444
#ifdef UF2_BOOTLOADER_ENABLED
45-
#define BOARD_VTOR_DEFER //Leave VTOR relocation to bootloader
45+
#define BOARD_VTOR_DEFER (1) //Leave VTOR relocation to bootloader
4646
#endif
4747

4848
#define DEFAULT_I2C_BUS_SCL (&pin_PB06)

ports/stm32f4/boards/meowbit_v121/mpconfigboard.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
#define AUTORESET_DELAY_MS 500
3636
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000)
3737

38-
#define BOARD_OSC_DIV 12
39-
#define BOARD_NO_VBUS_SENSE
40-
#define BOARD_VTOR_DEFER //Leave VTOR relocation to bootloader
41-
#define BOARD_USE_INTERNAL_SPI
38+
#define BOARD_OSC_DIV (12)
39+
#define BOARD_NO_VBUS_SENSE (1)
40+
#define BOARD_VTOR_DEFER (1) //Leave VTOR relocation to bootloader
41+
#define BOARD_USE_INTERNAL_SPI (1)
4242

4343
// On-board flash
4444
#define SPI_FLASH_MOSI_PIN (&pin_PB15)

ports/stm32f4/boards/pyb_nano_v2/mpconfigboard.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@
3232
#define FLASH_SIZE (0x80000)
3333
#define FLASH_PAGE_SIZE (0x4000)
3434

35-
#define BOARD_OSC_DIV 8
35+
#define BOARD_OSC_DIV (8)
3636

3737
// On-board flash
3838
#define SPI_FLASH_MOSI_PIN (&pin_PB15)
3939
#define SPI_FLASH_MISO_PIN (&pin_PB14)
4040
#define SPI_FLASH_SCK_PIN (&pin_PB13)
4141
#define SPI_FLASH_CS_PIN (&pin_PB12)
4242

43-
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
43+
#define CIRCUITPY_AUTORELOAD_DELAY_MS (500)
4444

4545
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x2000 - 0xC000)
4646

47-
#define AUTORESET_DELAY_MS 500
47+
#define AUTORESET_DELAY_MS (500)

ports/stm32f4/boards/pyboard_v11/mpconfigboard.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,5 @@
3232
#define FLASH_SIZE (0x100000)
3333
#define FLASH_PAGE_SIZE (0x4000)
3434

35-
3635
#define DEFAULT_I2C_BUS_SCL (&pin_PB06)
3736
#define DEFAULT_I2C_BUS_SDA (&pin_PB07)

ports/stm32f4/boards/stm32f411ce_blackpill/mpconfigboard.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@
3232
#define FLASH_SIZE (0x80000)
3333
#define FLASH_PAGE_SIZE (0x4000)
3434

35-
#define BOARD_OSC_DIV 25
36-
#define BOARD_NO_VBUS_SENSE
35+
#define BOARD_OSC_DIV (25)
36+
#define BOARD_NO_VBUS_SENSE (1)
3737

3838
// On-board flash
3939
// #define SPI_FLASH_MOSI_PIN (&pin_PA07)
4040
// #define SPI_FLASH_MISO_PIN (&pin_PA06)
4141
// #define SPI_FLASH_SCK_PIN (&pin_PA05)
4242
// #define SPI_FLASH_CS_PIN (&pin_PA04)
4343

44-
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
44+
#define CIRCUITPY_AUTORELOAD_DELAY_MS (500)
4545

4646
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x2000 - 0xC000)
4747

48-
#define AUTORESET_DELAY_MS 500
48+
#define AUTORESET_DELAY_MS (500)

ports/stm32f4/boards/stm32f411ve_discovery/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
#define FLASH_SIZE (0x80000) //512K
3333
#define FLASH_PAGE_SIZE (0x4000) //16K
3434

35-
#define BOARD_OSC_DIV 8
35+
#define BOARD_OSC_DIV (8)

ports/stm32f4/mpconfigport.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@
3737
// 24kiB stack
3838
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000
3939

40+
//Board flags:
41+
#ifndef BOARD_OVERWRITE_SWD
42+
#define BOARD_OVERWRITE_SWD (0)
43+
#endif
44+
#ifndef BOARD_VTOR_DEFER
45+
#define BOARD_VTOR_DEFER (0)
46+
#endif
47+
#ifndef BOARD_NO_VBUS_SENSE
48+
#define BOARD_NO_VBUS_SENSE (0)
49+
#endif
50+
#ifndef BOARD_USE_INTERNAL_SPI
51+
#define BOARD_USE_INTERNAL_SPI (0)
52+
#endif
53+
4054
#include "py/circuitpy_mpconfig.h"
4155

4256
#define MAX_UART 10 //how many UART are implemented

ports/stm32f4/peripherals/stm32f4/stm32f411xe/gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void stm32f4_peripherals_gpio_init(void) {
4242
never_reset_pin_number(2,14); //PC14 OSC32_IN
4343
never_reset_pin_number(2,15); //PC15 OSC32_OUT
4444

45-
#if !defined(BOARD_OVERWRITE_SWD)
45+
#if !(BOARD_OVERWRITE_SWD)
4646
never_reset_pin_number(0,13); //PA13 SWDIO
4747
never_reset_pin_number(0,14); //PA14 SWCLK
4848
#endif

0 commit comments

Comments
 (0)