constify spi, i2c, uart bank data
This commit is contained in:
parent
e1f16472c1
commit
08358ecd50
|
@ -29,7 +29,7 @@
|
|||
#include "py/mphal.h"
|
||||
#include "mimxrt10xx/periph.h"
|
||||
|
||||
LPI2C_Type *mcu_i2c_banks[2] = { LPI2C1, LPI2C2 };
|
||||
LPI2C_Type *const mcu_i2c_banks[2] = { LPI2C1, LPI2C2 };
|
||||
|
||||
const mcu_periph_obj_t mcu_i2c_sda_list[8] = {
|
||||
PERIPH_PIN(1, 0, kIOMUXC_LPI2C1_SDA_SELECT_INPUT, 0, &pin_GPIO_AD_13),
|
||||
|
@ -55,7 +55,7 @@ const mcu_periph_obj_t mcu_i2c_scl_list[8] = {
|
|||
PERIPH_PIN(2, 3, kIOMUXC_LPI2C2_SCL_SELECT_INPUT, 3, &pin_GPIO_10),
|
||||
};
|
||||
|
||||
LPSPI_Type *mcu_spi_banks[2] = { LPSPI1, LPSPI2 };
|
||||
LPSPI_Type *const mcu_spi_banks[2] = { LPSPI1, LPSPI2 };
|
||||
|
||||
const mcu_periph_obj_t mcu_spi_sck_list[4] = {
|
||||
PERIPH_PIN(1, 0, kIOMUXC_LPSPI1_SCK_SELECT_INPUT, 0, &pin_GPIO_AD_06),
|
||||
|
@ -81,7 +81,7 @@ const mcu_periph_obj_t mcu_spi_miso_list[4] = {
|
|||
PERIPH_PIN(2, 1, kIOMUXC_LPSPI2_SDI_SELECT_INPUT, 1, &pin_GPIO_SD_09),
|
||||
};
|
||||
|
||||
LPUART_Type *mcu_uart_banks[4] = { LPUART1, LPUART2, LPUART3, LPUART4 };
|
||||
LPUART_Type *const mcu_uart_banks[4] = { LPUART1, LPUART2, LPUART3, LPUART4 };
|
||||
|
||||
const mcu_periph_obj_t mcu_uart_rx_list[9] = {
|
||||
PERIPH_PIN(1, 2, kIOMUXC_LPUART1_RXD_SELECT_INPUT, 0, &pin_GPIO_SD_11),
|
||||
|
|
|
@ -27,18 +27,18 @@
|
|||
#ifndef MICROPY_INCLUDED_MIMXRT10XX_MIMXRT1011_PERIPHERALS_MIMXRT1011_PERIPH_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_MIMXRT1011_PERIPHERALS_MIMXRT1011_PERIPH_H
|
||||
|
||||
extern LPI2C_Type *mcu_i2c_banks[2];
|
||||
extern LPI2C_Type *const mcu_i2c_banks[2];
|
||||
|
||||
extern const mcu_periph_obj_t mcu_i2c_sda_list[8];
|
||||
extern const mcu_periph_obj_t mcu_i2c_scl_list[8];
|
||||
|
||||
extern LPSPI_Type *mcu_spi_banks[2];
|
||||
extern LPSPI_Type *const mcu_spi_banks[2];
|
||||
|
||||
extern const mcu_periph_obj_t mcu_spi_sck_list[4];
|
||||
extern const mcu_periph_obj_t mcu_spi_mosi_list[4];
|
||||
extern const mcu_periph_obj_t mcu_spi_miso_list[4];
|
||||
|
||||
extern LPUART_Type *mcu_uart_banks[4];
|
||||
extern LPUART_Type *const mcu_uart_banks[4];
|
||||
|
||||
extern const mcu_periph_obj_t mcu_uart_rx_list[9];
|
||||
extern const mcu_periph_obj_t mcu_uart_tx_list[9];
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "py/mphal.h"
|
||||
#include "mimxrt10xx/periph.h"
|
||||
|
||||
LPI2C_Type *mcu_i2c_banks[4] = { LPI2C1, LPI2C2, LPI2C3, LPI2C4 };
|
||||
LPI2C_Type *const mcu_i2c_banks[4] = { LPI2C1, LPI2C2, LPI2C3, LPI2C4 };
|
||||
|
||||
const mcu_periph_obj_t mcu_i2c_sda_list[8] = {
|
||||
PERIPH_PIN(1, 6, kIOMUXC_LPI2C1_SDA_SELECT_INPUT, 0, &pin_GPIO_EMC_03),
|
||||
|
@ -60,7 +60,7 @@ const mcu_periph_obj_t mcu_i2c_scl_list[8] = {
|
|||
PERIPH_PIN(4, 3, kIOMUXC_LPI2C4_SCL_SELECT_INPUT, 1, &pin_GPIO_SD_B1_02),
|
||||
};
|
||||
|
||||
LPSPI_Type *mcu_spi_banks[4] = { LPSPI1, LPSPI2, LPSPI3, LPSPI4 };
|
||||
LPSPI_Type *const mcu_spi_banks[4] = { LPSPI1, LPSPI2, LPSPI3, LPSPI4 };
|
||||
|
||||
const mcu_periph_obj_t mcu_spi_sck_list[8] = {
|
||||
PERIPH_PIN(1, 4, kIOMUXC_LPSPI1_SCK_SELECT_INPUT, 0, &pin_GPIO_SD_B0_02),
|
||||
|
@ -104,7 +104,7 @@ const mcu_periph_obj_t mcu_spi_miso_list[8] = {
|
|||
PERIPH_PIN(4, 4, kIOMUXC_LPSPI2_SDI_SELECT_INPUT, 1, &pin_GPIO_EMC_35),
|
||||
};
|
||||
|
||||
LPUART_Type *mcu_uart_banks[8] = { LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8 };
|
||||
LPUART_Type *const mcu_uart_banks[8] = { LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8 };
|
||||
|
||||
const mcu_periph_obj_t mcu_uart_rx_list[16] = {
|
||||
PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_07),
|
||||
|
|
|
@ -28,18 +28,18 @@
|
|||
#ifndef MICROPY_INCLUDED_MIMXRT10XX_PERIPHERALS_MIMXRT1021_PERIPH_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_PERIPHERALS_MIMXRT1021_PERIPH_H
|
||||
|
||||
extern LPI2C_Type *mcu_i2c_banks[4];
|
||||
extern LPI2C_Type *const mcu_i2c_banks[4];
|
||||
|
||||
extern const mcu_periph_obj_t mcu_i2c_sda_list[8];
|
||||
extern const mcu_periph_obj_t mcu_i2c_scl_list[8];
|
||||
|
||||
extern LPSPI_Type *mcu_spi_banks[4];
|
||||
extern LPSPI_Type *const mcu_spi_banks[4];
|
||||
|
||||
extern const mcu_periph_obj_t mcu_spi_sck_list[8];
|
||||
extern const mcu_periph_obj_t mcu_spi_mosi_list[8];
|
||||
extern const mcu_periph_obj_t mcu_spi_miso_list[8];
|
||||
|
||||
extern LPUART_Type *mcu_uart_banks[8];
|
||||
extern LPUART_Type *const mcu_uart_banks[8];
|
||||
|
||||
extern const mcu_periph_obj_t mcu_uart_rx_list[16];
|
||||
extern const mcu_periph_obj_t mcu_uart_tx_list[16];
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "py/mphal.h"
|
||||
#include "mimxrt10xx/periph.h"
|
||||
|
||||
LPI2C_Type *mcu_i2c_banks[4] = { LPI2C1, LPI2C2, LPI2C3, LPI2C4 };
|
||||
LPI2C_Type *const mcu_i2c_banks[4] = { LPI2C1, LPI2C2, LPI2C3, LPI2C4 };
|
||||
|
||||
const mcu_periph_obj_t mcu_i2c_sda_list[9] = {
|
||||
PERIPH_PIN(1, 2, kIOMUXC_LPI2C1_SDA_SELECT_INPUT, 0, &pin_GPIO_SD_B1_05),
|
||||
|
@ -61,7 +61,7 @@ const mcu_periph_obj_t mcu_i2c_scl_list[9] = {
|
|||
PERIPH_PIN(4, 0, kIOMUXC_LPI2C4_SCL_SELECT_INPUT, 1, &pin_GPIO_AD_B0_12),
|
||||
};
|
||||
|
||||
LPSPI_Type *mcu_spi_banks[4] = { LPSPI1, LPSPI2, LPSPI3, LPSPI4 };
|
||||
LPSPI_Type *const mcu_spi_banks[4] = { LPSPI1, LPSPI2, LPSPI3, LPSPI4 };
|
||||
|
||||
const mcu_periph_obj_t mcu_spi_sck_list[8] = {
|
||||
PERIPH_PIN(1, 3, kIOMUXC_LPSPI1_SCK_SELECT_INPUT, 0, &pin_GPIO_EMC_27),
|
||||
|
@ -105,7 +105,7 @@ const mcu_periph_obj_t mcu_spi_miso_list[8] = {
|
|||
PERIPH_PIN(4, 1, kIOMUXC_LPSPI4_SDI_SELECT_INPUT, 1, &pin_GPIO_B1_05),
|
||||
};
|
||||
|
||||
LPUART_Type *mcu_uart_banks[8] = { LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8 };
|
||||
LPUART_Type *const mcu_uart_banks[8] = { LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8 };
|
||||
|
||||
const mcu_periph_obj_t mcu_uart_rx_list[18] = {
|
||||
PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_13),
|
||||
|
|
|
@ -27,18 +27,18 @@
|
|||
#ifndef MICROPY_INCLUDED_MIMXRT10XX_MIMXRT1062_PERIPHERALS_MIMXRT1011_PERIPH_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_MIMXRT1062_PERIPHERALS_MIMXRT1011_PERIPH_H
|
||||
|
||||
extern LPI2C_Type *mcu_i2c_banks[4];
|
||||
extern LPI2C_Type *const mcu_i2c_banks[4];
|
||||
|
||||
extern const mcu_periph_obj_t mcu_i2c_sda_list[9];
|
||||
extern const mcu_periph_obj_t mcu_i2c_scl_list[9];
|
||||
|
||||
extern LPSPI_Type *mcu_spi_banks[4];
|
||||
extern LPSPI_Type *const mcu_spi_banks[4];
|
||||
|
||||
extern const mcu_periph_obj_t mcu_spi_sck_list[8];
|
||||
extern const mcu_periph_obj_t mcu_spi_mosi_list[8];
|
||||
extern const mcu_periph_obj_t mcu_spi_miso_list[8];
|
||||
|
||||
extern LPUART_Type *mcu_uart_banks[8];
|
||||
extern LPUART_Type *const mcu_uart_banks[8];
|
||||
|
||||
extern const mcu_periph_obj_t mcu_uart_rx_list[18];
|
||||
extern const mcu_periph_obj_t mcu_uart_tx_list[18];
|
||||
|
|
|
@ -72,9 +72,9 @@ typedef struct {
|
|||
.pin = p_pin, \
|
||||
}
|
||||
|
||||
extern LPI2C_Type *mcu_i2c_banks[];
|
||||
extern LPSPI_Type *mcu_spi_banks[];
|
||||
extern LPUART_Type *mcu_uart_banks[];
|
||||
extern LPI2C_Type *const mcu_i2c_banks[];
|
||||
extern LPSPI_Type *const mcu_spi_banks[];
|
||||
extern LPUART_Type *const mcu_uart_banks[];
|
||||
|
||||
#ifdef MIMXRT1011_SERIES
|
||||
#include "MIMXRT1011/periph.h"
|
||||
|
|
Loading…
Reference in New Issue