From 284073584a66c0fde03e439fbdb54a4a5dc34790 Mon Sep 17 00:00:00 2001 From: jgillick Date: Thu, 19 Mar 2020 00:01:32 -0700 Subject: [PATCH] Cleanup --- ports/stm/boards/thunderpack/mpconfigboard.mk | 2 +- ports/stm/common-hal/busio/UART.c | 4 ---- ports/stm/peripherals/stm32f4/periph.h | 7 ------- ports/stm/peripherals/stm32f4/pins.h | 3 --- ports/stm/peripherals/stm32f4/stm32f412zx/gpio.c | 1 + ports/stm/supervisor/internal_flash.h | 2 +- 6 files changed, 3 insertions(+), 16 deletions(-) diff --git a/ports/stm/boards/thunderpack/mpconfigboard.mk b/ports/stm/boards/thunderpack/mpconfigboard.mk index 3efd6a8bdc..0bf5b57a88 100644 --- a/ports/stm/boards/thunderpack/mpconfigboard.mk +++ b/ports/stm/boards/thunderpack/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x239A USB_PID = 0x806A -USB_PRODUCT = "Thunderpack powered by ST" +USB_PRODUCT = "Thunderpack STM32F411" USB_MANUFACTURER = "Jeremy Gillick" USB_DEVICES = "CDC,MSC" diff --git a/ports/stm/common-hal/busio/UART.c b/ports/stm/common-hal/busio/UART.c index 20648bf3d4..0b434fd023 100644 --- a/ports/stm/common-hal/busio/UART.c +++ b/ports/stm/common-hal/busio/UART.c @@ -443,11 +443,9 @@ STATIC void uart_clock_enable(uint16_t mask) { #endif #ifdef USART3 if (mask & (1 << 2)) { - #ifndef STM32F412Cx __HAL_RCC_USART3_FORCE_RESET(); __HAL_RCC_USART3_RELEASE_RESET(); __HAL_RCC_USART3_CLK_ENABLE(); - #endif } #endif #ifdef UART4 @@ -518,11 +516,9 @@ STATIC void uart_clock_disable(uint16_t mask) { #endif #ifdef USART3 if (mask & (1 << 2)) { - #ifndef STM32F412Cx __HAL_RCC_USART3_FORCE_RESET(); __HAL_RCC_USART3_RELEASE_RESET(); __HAL_RCC_USART3_CLK_DISABLE(); - #endif } #endif #ifdef UART4 diff --git a/ports/stm/peripherals/stm32f4/periph.h b/ports/stm/peripherals/stm32f4/periph.h index 5ac8b40615..d311afe4a1 100644 --- a/ports/stm/peripherals/stm32f4/periph.h +++ b/ports/stm/peripherals/stm32f4/periph.h @@ -154,13 +154,6 @@ typedef struct { #include "stm32f411xe/periph.h" #endif -#ifdef BOARD_THUNDERPACK_STM32F412 -#define HAS_DAC 0 -#define HAS_TRNG 1 -#define HAS_BASIC_TIM 1 -#include "stm32f412cx_thunderpack/periph.h" -#endif - #ifdef STM32F412Zx #define HAS_DAC 0 #define HAS_TRNG 1 diff --git a/ports/stm/peripherals/stm32f4/pins.h b/ports/stm/peripherals/stm32f4/pins.h index 53040995d0..44ef4c1baf 100644 --- a/ports/stm/peripherals/stm32f4/pins.h +++ b/ports/stm/peripherals/stm32f4/pins.h @@ -83,9 +83,6 @@ extern const mp_obj_type_t mcu_pin_type; #ifdef STM32F411xE #include "stm32f411xe/pins.h" #endif -#ifdef BOARD_THUNDERPACK_STM32F412 -#include "stm32f412cx_thunderpack/pins.h" -#endif #ifdef STM32F412Zx #include "stm32f412zx/pins.h" #endif diff --git a/ports/stm/peripherals/stm32f4/stm32f412zx/gpio.c b/ports/stm/peripherals/stm32f4/stm32f412zx/gpio.c index 2eb2967235..68a75f4639 100644 --- a/ports/stm/peripherals/stm32f4/stm32f412zx/gpio.c +++ b/ports/stm/peripherals/stm32f4/stm32f412zx/gpio.c @@ -239,3 +239,4 @@ void stm32f4_peripherals_status_led(uint8_t led, uint8_t state) { default: break; } } + diff --git a/ports/stm/supervisor/internal_flash.h b/ports/stm/supervisor/internal_flash.h index 92d1baddc0..9f16a799d8 100644 --- a/ports/stm/supervisor/internal_flash.h +++ b/ports/stm/supervisor/internal_flash.h @@ -42,7 +42,7 @@ #define INTERNAL_FLASH_FILESYSTEM_SIZE 0xC000 //48KiB #endif -#if (defined(STM32F412Zx) || defined(STM32F412Cx)) +#ifdef STM32F412Zx #define STM32_FLASH_SIZE 0x100000 //1MB #define INTERNAL_FLASH_FILESYSTEM_SIZE 0xC000 //48KiB #endif