change flag styling

This commit is contained in:
Lucian Copeland 2020-02-12 14:30:29 -05:00
parent b4c60c3355
commit 7831c475b9
13 changed files with 35 additions and 22 deletions

View File

@ -32,8 +32,8 @@
#define FLASH_SIZE (0x60000)
#define FLASH_PAGE_SIZE (0x4000)
#define AUTORESET_DELAY_MS 500
#define AUTORESET_DELAY_MS (500)
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000)
#define BOARD_OSC_DIV 8
#define BOARD_OSC_DIV (8)

View File

@ -32,5 +32,5 @@
#define FLASH_SIZE (0x80000) //512K
#define FLASH_PAGE_SIZE (0x4000) //16K
#define BOARD_OSC_DIV 8
#define BOARD_OVERWRITE_SWD
#define BOARD_OSC_DIV (8)
#define BOARD_OVERWRITE_SWD (1)

View File

@ -42,7 +42,7 @@
// Bootloader only
#ifdef UF2_BOOTLOADER_ENABLED
#define BOARD_VTOR_DEFER //Leave VTOR relocation to bootloader
#define BOARD_VTOR_DEFER (1) //Leave VTOR relocation to bootloader
#endif
#define DEFAULT_I2C_BUS_SCL (&pin_PB06)

View File

@ -35,10 +35,10 @@
#define AUTORESET_DELAY_MS 500
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000)
#define BOARD_OSC_DIV 12
#define BOARD_NO_VBUS_SENSE
#define BOARD_VTOR_DEFER //Leave VTOR relocation to bootloader
#define BOARD_USE_INTERNAL_SPI
#define BOARD_OSC_DIV (12)
#define BOARD_NO_VBUS_SENSE (1)
#define BOARD_VTOR_DEFER (1) //Leave VTOR relocation to bootloader
#define BOARD_USE_INTERNAL_SPI (1)
// On-board flash
#define SPI_FLASH_MOSI_PIN (&pin_PB15)

View File

@ -32,7 +32,7 @@
#define FLASH_SIZE (0x80000)
#define FLASH_PAGE_SIZE (0x4000)
#define BOARD_OSC_DIV 8
#define BOARD_OSC_DIV (8)
// On-board flash
#define SPI_FLASH_MOSI_PIN (&pin_PB15)
@ -40,8 +40,8 @@
#define SPI_FLASH_SCK_PIN (&pin_PB13)
#define SPI_FLASH_CS_PIN (&pin_PB12)
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
#define CIRCUITPY_AUTORELOAD_DELAY_MS (500)
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x2000 - 0xC000)
#define AUTORESET_DELAY_MS 500
#define AUTORESET_DELAY_MS (500)

View File

@ -32,6 +32,5 @@
#define FLASH_SIZE (0x100000)
#define FLASH_PAGE_SIZE (0x4000)
#define DEFAULT_I2C_BUS_SCL (&pin_PB06)
#define DEFAULT_I2C_BUS_SDA (&pin_PB07)

View File

@ -32,8 +32,8 @@
#define FLASH_SIZE (0x80000)
#define FLASH_PAGE_SIZE (0x4000)
#define BOARD_OSC_DIV 25
#define BOARD_NO_VBUS_SENSE
#define BOARD_OSC_DIV (25)
#define BOARD_NO_VBUS_SENSE (1)
// On-board flash
// #define SPI_FLASH_MOSI_PIN (&pin_PA07)
@ -41,8 +41,8 @@
// #define SPI_FLASH_SCK_PIN (&pin_PA05)
// #define SPI_FLASH_CS_PIN (&pin_PA04)
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
#define CIRCUITPY_AUTORELOAD_DELAY_MS (500)
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x2000 - 0xC000)
#define AUTORESET_DELAY_MS 500
#define AUTORESET_DELAY_MS (500)

View File

@ -32,4 +32,4 @@
#define FLASH_SIZE (0x80000) //512K
#define FLASH_PAGE_SIZE (0x4000) //16K
#define BOARD_OSC_DIV 8
#define BOARD_OSC_DIV (8)

View File

@ -37,6 +37,20 @@
// 24kiB stack
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000
//Board flags:
#ifndef BOARD_OVERWRITE_SWD
#define BOARD_OVERWRITE_SWD (0)
#endif
#ifndef BOARD_VTOR_DEFER
#define BOARD_VTOR_DEFER (0)
#endif
#ifndef BOARD_NO_VBUS_SENSE
#define BOARD_NO_VBUS_SENSE (0)
#endif
#ifndef BOARD_USE_INTERNAL_SPI
#define BOARD_USE_INTERNAL_SPI (0)
#endif
#include "py/circuitpy_mpconfig.h"
#define MAX_UART 10 //how many UART are implemented

View File

@ -42,7 +42,7 @@ void stm32f4_peripherals_gpio_init(void) {
never_reset_pin_number(2,14); //PC14 OSC32_IN
never_reset_pin_number(2,15); //PC15 OSC32_OUT
#if !defined(BOARD_OVERWRITE_SWD)
#if !(BOARD_OVERWRITE_SWD)
never_reset_pin_number(0,13); //PA13 SWDIO
never_reset_pin_number(0,14); //PA14 SWCLK
#endif

View File

@ -38,7 +38,7 @@
STATIC void init_usb_vbus_sense(void) {
#ifdef BOARD_NO_VBUS_SENSE
#if (BOARD_NO_VBUS_SENSE)
// Disable VBUS sensing
#ifdef USB_OTG_GCCFG_VBDEN
USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBDEN;

View File

@ -218,7 +218,7 @@ void SystemInit(void)
#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */
/* Configure the Vector Table location add offset address ------------------*/
#if !defined(BOARD_VTOR_DEFER) //only set VTOR if the bootloader hasn't already
#if !(BOARD_VTOR_DEFER) //only set VTOR if the bootloader hasn't already
#ifdef VECT_TAB_SRAM
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#else

View File

@ -103,7 +103,7 @@ void reset_displays(void) {
continue;
}
#endif
#ifdef BOARD_USE_INTERNAL_SPI
#if (BOARD_USE_INTERNAL_SPI)
if (original_spi == (mp_obj_t)(&supervisor_flash_spi_bus)) {
continue;
}