Add support for other F4 MCUs
This commit is contained in:
parent
552900f18e
commit
323fe418f7
@ -120,3 +120,26 @@ const mcu_spi_nss_obj_t mcu_spi_nss_list[12] = {
|
||||
};
|
||||
|
||||
//UART, Etc
|
||||
|
||||
USART_TypeDef * mcu_uart_banks[6] = {USART1, USART2, NULL, NULL, NULL, USART6};
|
||||
bool mcu_uart_has_usart[6] = {true, true, false, false, false, true};
|
||||
|
||||
const mcu_uart_tx_obj_t mcu_uart_tx_list[7] = {
|
||||
UART(2, 7, &pin_PA02),
|
||||
UART(1, 7, &pin_PA09),
|
||||
UART(1, 7, &pin_PA15),
|
||||
UART(6, 8, &pin_PA11),
|
||||
UART(1, 7, &pin_PB06),
|
||||
UART(6, 8, &pin_PC06),
|
||||
UART(2, 7, &pin_PD05),
|
||||
};
|
||||
|
||||
const mcu_uart_rx_obj_t mcu_uart_rx_list[7] = {
|
||||
UART(2, 7, &pin_PA03),
|
||||
UART(1, 7, &pin_PA10),
|
||||
UART(6, 8, &pin_PA12),
|
||||
UART(1, 7, &pin_PB03),
|
||||
UART(1, 7, &pin_PB07),
|
||||
UART(6, 8, &pin_PC07),
|
||||
UART(2, 7, &pin_PD06),
|
||||
};
|
||||
|
@ -41,4 +41,11 @@ extern const mcu_spi_mosi_obj_t mcu_spi_mosi_list[14];
|
||||
extern const mcu_spi_miso_obj_t mcu_spi_miso_list[12];
|
||||
extern const mcu_spi_nss_obj_t mcu_spi_nss_list[12];
|
||||
|
||||
//UART
|
||||
extern USART_TypeDef * mcu_uart_banks[6];
|
||||
bool mcu_uart_has_usart[6];
|
||||
|
||||
extern const mcu_uart_tx_obj_t mcu_uart_tx_list[7];
|
||||
extern const mcu_uart_rx_obj_t mcu_uart_rx_list[7];
|
||||
|
||||
#endif // MICROPY_INCLUDED_STM32F4_PERIPHERALS_STM32F411VE_PERIPH_H
|
@ -123,10 +123,31 @@ const mcu_spi_nss_obj_t mcu_spi_nss_list[12] = {
|
||||
USART_TypeDef * mcu_uart_banks[6] = {USART1, USART2, USART3, NULL, NULL, USART6};
|
||||
bool mcu_uart_has_usart[6] = {true, true, true, false, false, true};
|
||||
|
||||
const mcu_uart_tx_obj_t mcu_uart_tx_list[1] = {
|
||||
const mcu_uart_tx_obj_t mcu_uart_tx_list[11] = {
|
||||
UART(2, 7, &pin_PA02),
|
||||
UART(1, 7, &pin_PA09),
|
||||
UART(1, 7, &pin_PA15),
|
||||
UART(6, 8, &pin_PA11),
|
||||
UART(1, 7, &pin_PB06),
|
||||
UART(3, 7, &pin_PB10),
|
||||
UART(6, 8, &pin_PC06),
|
||||
UART(3, 7, &pin_PC10),
|
||||
UART(2, 7, &pin_PD05),
|
||||
UART(3, 7, &pin_PD08),
|
||||
UART(6, 8, &pin_PG14),
|
||||
};
|
||||
|
||||
const mcu_uart_rx_obj_t mcu_uart_rx_list[1] = {
|
||||
const mcu_uart_rx_obj_t mcu_uart_rx_list[12] = {
|
||||
UART(2, 7, &pin_PA03),
|
||||
UART(1, 7, &pin_PA10),
|
||||
UART(6, 8, &pin_PA12),
|
||||
UART(1, 7, &pin_PB03),
|
||||
UART(1, 7, &pin_PB07),
|
||||
UART(3, 7, &pin_PB11),
|
||||
UART(3, 7, &pin_PC05),
|
||||
UART(6, 8, &pin_PC07),
|
||||
UART(3, 7, &pin_PC11),
|
||||
UART(2, 7, &pin_PD06),
|
||||
UART(3, 7, &pin_PD09),
|
||||
UART(6, 8, &pin_PG09),
|
||||
};
|
||||
|
@ -46,8 +46,8 @@ extern const mcu_spi_nss_obj_t mcu_spi_nss_list[12];
|
||||
extern USART_TypeDef * mcu_uart_banks[6];
|
||||
bool mcu_uart_has_usart[6];
|
||||
|
||||
extern const mcu_uart_tx_obj_t mcu_uart_tx_list[1];
|
||||
extern const mcu_uart_rx_obj_t mcu_uart_rx_list[1];
|
||||
extern const mcu_uart_tx_obj_t mcu_uart_tx_list[11];
|
||||
extern const mcu_uart_rx_obj_t mcu_uart_rx_list[12];
|
||||
|
||||
|
||||
#endif // MICROPY_INCLUDED_STM32F4_PERIPHERALS_STM32F411VE_PERIPH_H
|
Loading…
x
Reference in New Issue
Block a user