diff --git a/STM32F1/variants/STM32VLD/board.cpp b/STM32F1/variants/STM32VLD/board.cpp index 1cecbd9..2561814 100644 --- a/STM32F1/variants/STM32VLD/board.cpp +++ b/STM32F1/variants/STM32VLD/board.cpp @@ -51,7 +51,8 @@ void boardInit(void) { } // Note. See the enum of pin names in board.h - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { @@ -113,6 +114,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpiod, NULL, NULL, 1, 0, ADCx}, /* PD2 */ {&gpiod, NULL, NULL, 2, 0, ADCx}, /* PD2 */ }; +#pragma GCC diagnostic pop extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { PA0, PA1, PA2, PA3, PA6, PA7, PA8, PA9, PA10, PB0, PB1, PB6, PB7, PB8, PB9 diff --git a/STM32F1/variants/generic_gd32f103c/board.cpp b/STM32F1/variants/generic_gd32f103c/board.cpp index 8b136f2..54f60be 100644 --- a/STM32F1/variants/generic_gd32f103c/board.cpp +++ b/STM32F1/variants/generic_gd32f103c/board.cpp @@ -51,7 +51,8 @@ void boardInit(void) { } // Note. See the enum of pin names in board.h - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { @@ -93,9 +94,8 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpioc, NULL, NULL, 14, 0, ADCx}, /* PC14 */ {&gpioc, NULL, NULL, 15, 0, ADCx}, /* PC15 */ - - }; +#pragma GCC diagnostic pop extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { PB0, PA7, PA6, PA3, PA2, PA1, PA0, PB7, PB6, PA10, PA9, PA8 diff --git a/STM32F1/variants/generic_stm32f103c/board.cpp b/STM32F1/variants/generic_stm32f103c/board.cpp index 7102adb..ac786cf 100644 --- a/STM32F1/variants/generic_stm32f103c/board.cpp +++ b/STM32F1/variants/generic_stm32f103c/board.cpp @@ -51,7 +51,8 @@ void boardInit(void) { } // Note. See the enum of pin names in board.h - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { @@ -92,10 +93,8 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpioc, NULL, NULL, 13, 0, ADCx}, /* PC13 */ {&gpioc, NULL, NULL, 14, 0, ADCx}, /* PC14 */ {&gpioc, NULL, NULL, 15, 0, ADCx}, /* PC15 */ - - - }; +#pragma GCC diagnostic pop extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { PB0, PA7, PA6, PA3, PA2, PA1, PA0, PB7, PB6, PA10, PA9, PA8 diff --git a/STM32F1/variants/generic_stm32f103r/board.cpp b/STM32F1/variants/generic_stm32f103r/board.cpp index 3e3589c..e50314e 100644 --- a/STM32F1/variants/generic_stm32f103r/board.cpp +++ b/STM32F1/variants/generic_stm32f103r/board.cpp @@ -69,7 +69,8 @@ void boardInit(void) { // - Timer channel (1 to 4, for PWM), or 0 if none // - ADC device, or NULL if none // - ADC channel, or ADCx if none - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { /* gpio_dev *gpio_device; GPIO device @@ -137,6 +138,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpiod, NULL, NULL, 1, 0, ADCx} , /* PD1 OSC_OUT */ {&gpiod, NULL, NULL, 2, 0, ADCx} , /* PD2 TIM3_ETR/UART5_RX SDIO_CMD */ }; +#pragma GCC diagnostic pop /* Basically everything that is defined as having a timer us PWM */ extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { diff --git a/STM32F1/variants/generic_stm32f103r8/board.cpp b/STM32F1/variants/generic_stm32f103r8/board.cpp index 05f85a5..1987651 100644 --- a/STM32F1/variants/generic_stm32f103r8/board.cpp +++ b/STM32F1/variants/generic_stm32f103r8/board.cpp @@ -51,7 +51,8 @@ void boardInit(void) { } // Note. See the enum of pin names in board.h - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { @@ -111,6 +112,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpiod, NULL, NULL, 2, 0, ADCx}, /* PD2 */ }; +#pragma GCC diagnostic pop extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { PB0, PA7, PA6, PA3, PA2, PA1, PA0, PB7, PB6, PA10, PA9, PA8, PC6, PC7, PC8, PC9 diff --git a/STM32F1/variants/generic_stm32f103t/board.cpp b/STM32F1/variants/generic_stm32f103t/board.cpp index e7a1dc0..003d225 100644 --- a/STM32F1/variants/generic_stm32f103t/board.cpp +++ b/STM32F1/variants/generic_stm32f103t/board.cpp @@ -51,7 +51,8 @@ void boardInit(void) { } // Note. See the enum of pin names in board.h - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { @@ -81,6 +82,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpiob, &timer4, NULL, 6, 1, ADCx}, /* PB6 */ {&gpiob, &timer4, NULL, 7, 2, ADCx}, /* PB7 */ }; +#pragma GCC diagnostic pop extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { PB0, PA7, PA6, PA3, PA2, PA1, PA0, PB7, PB6, PA10, PA9, PA8 diff --git a/STM32F1/variants/generic_stm32f103v/board.cpp b/STM32F1/variants/generic_stm32f103v/board.cpp index 9c13772..8b24169 100644 --- a/STM32F1/variants/generic_stm32f103v/board.cpp +++ b/STM32F1/variants/generic_stm32f103v/board.cpp @@ -68,7 +68,8 @@ void boardInit(void) { // - Timer channel (1 to 4, for PWM), or 0 if none // - ADC device, or NULL if none // - ADC channel, or ADCx if none - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { /* gpio_dev *gpio_device; GPIO device @@ -166,6 +167,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpioe, NULL, NULL, 15, 0, ADCx} , /* PE15 FSMC_D12 */ }; +#pragma GCC diagnostic pop /* Basically everything that is defined as having a timer us PWM */ extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { @@ -196,4 +198,4 @@ extern const uint8 boardUsedPins[BOARD_NR_USED_PINS] __FLASH__ = { DEFINE_HWSERIAL(Serial2, 3); DEFINE_HWSERIAL_UART(Serial3, 4); DEFINE_HWSERIAL_UART(Serial4, 5); -#endif \ No newline at end of file +#endif diff --git a/STM32F1/variants/generic_stm32f103z/board.cpp b/STM32F1/variants/generic_stm32f103z/board.cpp index 830479e..4d2e4e9 100644 --- a/STM32F1/variants/generic_stm32f103z/board.cpp +++ b/STM32F1/variants/generic_stm32f103z/board.cpp @@ -69,6 +69,8 @@ void boardInit(void) { // - ADC device, or NULL if none // - ADC channel, or ADCx if none +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { /* gpio_dev *gpio_device; GPIO device @@ -201,6 +203,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpiog, NULL, NULL, 14, 0, ADCx} , /* PG14 */ {&gpiog, NULL, NULL, 15, 0, ADCx} /* PG15 */ }; +#pragma GCC diagnostic pop /* Basically everything that is defined as having a timer us PWM */ extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { @@ -231,4 +234,4 @@ extern const uint8 boardUsedPins[BOARD_NR_USED_PINS] __FLASH__ = { DEFINE_HWSERIAL(Serial2, 3); DEFINE_HWSERIAL_UART(Serial3, 4); DEFINE_HWSERIAL_UART(Serial4, 5); -#endif \ No newline at end of file +#endif diff --git a/STM32F1/variants/hytiny_stm32f103t/board.cpp b/STM32F1/variants/hytiny_stm32f103t/board.cpp index f1fb44f..d1260a6 100644 --- a/STM32F1/variants/hytiny_stm32f103t/board.cpp +++ b/STM32F1/variants/hytiny_stm32f103t/board.cpp @@ -51,7 +51,8 @@ void boardInit(void) { } // Note. See the enum of pin names in board.h - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { @@ -82,6 +83,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpiob, &timer4, NULL, 7, 2, ADCx}, /* PB7 */ }; +#pragma GCC diagnostic pop extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { PB0, PA7, PA6, PA3, PA2, PA1, PA0, PB7, PB6, PA10, PA9, PA8 diff --git a/STM32F1/variants/maple/board.cpp b/STM32F1/variants/maple/board.cpp index a4c0335..b1584e7 100644 --- a/STM32F1/variants/maple/board.cpp +++ b/STM32F1/variants/maple/board.cpp @@ -68,6 +68,8 @@ void boardInit(void) { // - Timer channel (1 to 4, for PWM), or 0 if none // - ADC device, or NULL if none // - ADC channel, or ADCx if none +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { /* Top header */ @@ -126,6 +128,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { PMAP_ROW(&gpiob, 3, NULL, 0, NULL, ADCx), /* D42/PB3 */ PMAP_ROW(&gpiob, 4, NULL, 0, NULL, ADCx), /* D43/PB4 */ }; +#pragma GCC diagnostic pop // Array of pins you can use for pwmWrite(). Keep it in Flash because // it doesn't change, and so we don't waste RAM. diff --git a/STM32F1/variants/maple_mini/board.cpp b/STM32F1/variants/maple_mini/board.cpp index f49b336..bf63364 100644 --- a/STM32F1/variants/maple_mini/board.cpp +++ b/STM32F1/variants/maple_mini/board.cpp @@ -50,6 +50,8 @@ void boardInit(void) { #endif } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { /* Top header */ @@ -92,6 +94,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { {&gpiob, &timer4, NULL, 8, 3, ADCx}, /* D32/PB8 */ {&gpiob, &timer3, &adc1, 1, 4, 9}, /* D33/PB1 */ }; +#pragma GCC diagnostic pop extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { 3, 4, 5, 8, 9, 10, 11, 15, 16, 25, 26, 27 @@ -125,4 +128,4 @@ DEFINE_HWSERIAL(Serial1, 1); DEFINE_HWSERIAL(Serial2, 2); DEFINE_HWSERIAL(Serial3, 3); - \ No newline at end of file + diff --git a/STM32F1/variants/maple_ret6/board.cpp b/STM32F1/variants/maple_ret6/board.cpp index fb92779..dfec977 100644 --- a/STM32F1/variants/maple_ret6/board.cpp +++ b/STM32F1/variants/maple_ret6/board.cpp @@ -69,6 +69,8 @@ void boardInit(void) { // - ADC device, or NULL if none // - ADC channel, or ADCx if none +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { /* gpio_dev *gpio_device; GPIO device @@ -143,6 +145,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { { &gpiod, NULL, NULL, 1, 0, ADCx }, /* PD1 OSC_OUT */ { &gpiob, NULL, NULL, 2, 0, ADCx }, /* PB2 */ }; +#pragma GCC diagnostic pop /* Basically everything that is defined as having a timer us PWM */ extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { @@ -175,4 +178,4 @@ DEFINE_HWSERIAL(Serial1, 1); DEFINE_HWSERIAL(Serial2, 2); DEFINE_HWSERIAL(Serial3, 3); DEFINE_HWSERIAL_UART(Serial4, 4); -DEFINE_HWSERIAL_UART(Serial5, 5); \ No newline at end of file +DEFINE_HWSERIAL_UART(Serial5, 5); diff --git a/STM32F1/variants/microduino/board.cpp b/STM32F1/variants/microduino/board.cpp index 2a00288..d7b4a97 100644 --- a/STM32F1/variants/microduino/board.cpp +++ b/STM32F1/variants/microduino/board.cpp @@ -51,6 +51,8 @@ void boardInit(void) { #endif } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { @@ -84,6 +86,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { // FIXME: find out which pin is the button, if any {&gpiob, NULL, NULL, 8, 0, ADCx}, /* D24/PB8??/Button */ }; +#pragma GCC diagnostic pop extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { 0, 1, 4, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 23 diff --git a/STM32F1/variants/nucleo_f103rb/board.cpp b/STM32F1/variants/nucleo_f103rb/board.cpp index 9f3e08a..9754a2d 100644 --- a/STM32F1/variants/nucleo_f103rb/board.cpp +++ b/STM32F1/variants/nucleo_f103rb/board.cpp @@ -93,6 +93,8 @@ rcc_pll_cfg w_board_pll_cfg = {RCC_PLLSRC_HSI_DIV_2, &pll_data}; // 0 1 3 4 2 5 // 0 1 2 4 2 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { /* Arduino-like header, right connectors */ @@ -149,6 +151,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { // PMAP_ROW(&gpioa, 14, NULL, 0, NULL, ADCx), /* D42/PA14 do not use*/ // PMAP_ROW(&gpioa, 15, &timer2, 1, NULL, ADCx), /* D43/PA15 do not use*/ }; +#pragma GCC diagnostic pop // Array of pins you can use for pwmWrite(). Keep it in Flash because // it doesn't change, and so we don't waste RAM. @@ -256,4 +259,4 @@ MOSI alternate functions on the GPIO ports. DEFINE_HWSERIAL(Serial, 3);// Use HW Serial 2 as "Serial" DEFINE_HWSERIAL(Serial1, 2); DEFINE_HWSERIAL(Serial2, 1); -#endif \ No newline at end of file +#endif