reorganize pins
This commit is contained in:
parent
f286737868
commit
a926d01509
@ -74,16 +74,16 @@ typedef struct {
|
||||
uint8_t spi_index:4;
|
||||
uint8_t altfn_index:4;
|
||||
const mcu_pin_obj_t * pin;
|
||||
} mcu_spi_miso_obj_t;
|
||||
} mcu_spi_mosi_obj_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t spi_index:4;
|
||||
uint8_t altfn_index:4;
|
||||
const mcu_pin_obj_t * pin;
|
||||
} mcu_spi_mosi_obj_t;
|
||||
} mcu_spi_miso_obj_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t i2c_index:4;
|
||||
uint8_t spi_index:4;
|
||||
uint8_t altfn_index:4;
|
||||
const mcu_pin_obj_t * pin;
|
||||
} mcu_spi_nss_obj_t;
|
||||
|
@ -57,68 +57,68 @@ SPI_TypeDef * mcu_i2c_banks[3] = {SPI1, SPI2, SPI3, SPI4, SPI5};
|
||||
|
||||
const mcu_spi_sck_obj_t mcu_spi_sck_list[16] = {
|
||||
SPI(1, 5, &pin_PA05),
|
||||
SPI(5, 6, &pin_PB00),
|
||||
SPI(1, 5, &pin_PB03),
|
||||
SPI(3, 6, &pin_PB03),
|
||||
SPI(2, 5, &pin_PB10),
|
||||
SPI(5, 6, &pin_PB00),
|
||||
SPI(3, 7, &pin_PB12),
|
||||
SPI(2, 5, &pin_PB13),
|
||||
SPI(4, 6, &pin_PB13),
|
||||
SPI(2, 5, &pin_PC07),
|
||||
SPI(3, 6, &pin_PC10),
|
||||
SPI(2, 5, &pin_PD03),
|
||||
SPI(3, 6, &pin_PB03),
|
||||
SPI(3, 7, &pin_PB12),
|
||||
SPI(3, 6, &pin_PC10),
|
||||
SPI(4, 6, &pin_PB13),
|
||||
SPI(4, 5, &pin_PE02),
|
||||
SPI(5, 6, &pin_PE02),
|
||||
SPI(4, 5, &pin_PE12),
|
||||
SPI(5, 6, &pin_PE12),
|
||||
SPI(5, 6, &pin_PB00),
|
||||
SPI(5, 6, &pin_PB00),
|
||||
SPI(5, 6, &pin_PE02),
|
||||
SPI(5, 6, &pin_PE12)
|
||||
};
|
||||
|
||||
const mcu_spi_mosi_obj_t mcu_spi_mosi_list[14] = {
|
||||
SPI(4, 5, &pin_PA01),
|
||||
SPI(1, 5, &pin_PA07),
|
||||
SPI(5, 6, &pin_PA10),
|
||||
SPI(1, 5, &pin_PB05),
|
||||
SPI(3, 6, &pin_PB05),
|
||||
SPI(5, 6, &pin_PB08),
|
||||
SPI(2, 5, &pin_PB15),
|
||||
SPI(2, 5, &pin_PC03),
|
||||
SPI(3, 6, &pin_PB05),
|
||||
SPI(3, 6, &pin_PC12),
|
||||
SPI(3, 5, &pin_PD06),
|
||||
SPI(4, 5, &pin_PA01),
|
||||
SPI(4, 5, &pin_PE06),
|
||||
SPI(5, 6, &pin_PE06),
|
||||
SPI(4, 5, &pin_PE14),
|
||||
SPI(5, 6, &pin_PE14),
|
||||
SPI(5, 6, &pin_PA10),
|
||||
SPI(5, 6, &pin_PB08),
|
||||
SPI(5, 6, &pin_PE06),
|
||||
SPI(5, 6, &pin_PE14)
|
||||
};
|
||||
|
||||
const mcu_spi_miso_obj_t mcu_spi_miso_list[12] = {
|
||||
SPI(1, 5, &pin_PA06),
|
||||
SPI(4, 6, &pin_PA11),
|
||||
SPI(5, 6, &pin_PA12),
|
||||
SPI(1, 5, &pin_PB04),
|
||||
SPI(3, 6, &pin_PB04),
|
||||
SPI(2, 5, &pin_PB14),
|
||||
SPI(2, 5, &pin_PC02),
|
||||
SPI(3, 6, &pin_PB04),
|
||||
SPI(3, 6, &pin_PC11),
|
||||
SPI(4, 6, &pin_PA11),
|
||||
SPI(4, 5, &pin_PE05),
|
||||
SPI(5, 6, &pin_PE05),
|
||||
SPI(4, 5, &pin_PE13),
|
||||
SPI(5, 6, &pin_PE13),
|
||||
SPI(5, 6, &pin_PA12),
|
||||
SPI(5, 6, &pin_PE05),
|
||||
SPI(5, 6, &pin_PE13)
|
||||
};
|
||||
|
||||
const mcu_spi_nss_obj_t mcu_spi_nss_list[12] = {
|
||||
SPI(1, 5, &pin_PA04),
|
||||
SPI(3, 6, &pin_PA04),
|
||||
SPI(1, 5, &pin_PA15),
|
||||
SPI(3, 6, &pin_PA15),
|
||||
SPI(5, 6, &pin_PB01),
|
||||
SPI(2, 5, &pin_PB09),
|
||||
SPI(2, 5, &pin_PB12),
|
||||
SPI(3, 6, &pin_PA04),
|
||||
SPI(3, 6, &pin_PA15),
|
||||
SPI(4, 6, &pin_PB12),
|
||||
SPI(4, 5, &pin_PE04),
|
||||
SPI(5, 6, &pin_PE04),
|
||||
SPI(4, 5, &pin_PE11),
|
||||
SPI(5, 6, &pin_PE11),
|
||||
SPI(5, 6, &pin_PB01),
|
||||
SPI(5, 6, &pin_PE04),
|
||||
SPI(5, 6, &pin_PE11)
|
||||
};
|
||||
|
||||
//UART, Etc
|
||||
|
@ -37,9 +37,9 @@ extern const mcu_i2c_scl_obj_t mcu_i2c_scl_list[4];
|
||||
//SPI
|
||||
extern SPI_TypeDef * mcu_spi_banks[5];
|
||||
|
||||
extern const mcu_spi_sck_obj_t mcu_spi_sck_list[8];
|
||||
extern const mcu_spi_mosi_obj_t mcu_spi_mosi_list[4];
|
||||
extern const mcu_spi_miso_obj_t mcu_spi_miso_list[4];
|
||||
extern const mcu_spi_nss_obj_t mcu_spi_nss_list[4];
|
||||
extern const mcu_spi_sck_obj_t mcu_spi_sck_list[16];
|
||||
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];
|
||||
|
||||
#endif // MICROPY_INCLUDED_STM32F4_PERIPHERALS_STM32F411VE_PERIPH_H
|
Loading…
Reference in New Issue
Block a user