Skip to content

Commit 08358ec

Browse files
committed
constify spi, i2c, uart bank data
1 parent e1f1647 commit 08358ec

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "py/mphal.h"
3030
#include "mimxrt10xx/periph.h"
3131

32-
LPI2C_Type *mcu_i2c_banks[2] = { LPI2C1, LPI2C2 };
32+
LPI2C_Type *const mcu_i2c_banks[2] = { LPI2C1, LPI2C2 };
3333

3434
const mcu_periph_obj_t mcu_i2c_sda_list[8] = {
3535
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] = {
5555
PERIPH_PIN(2, 3, kIOMUXC_LPI2C2_SCL_SELECT_INPUT, 3, &pin_GPIO_10),
5656
};
5757

58-
LPSPI_Type *mcu_spi_banks[2] = { LPSPI1, LPSPI2 };
58+
LPSPI_Type *const mcu_spi_banks[2] = { LPSPI1, LPSPI2 };
5959

6060
const mcu_periph_obj_t mcu_spi_sck_list[4] = {
6161
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] = {
8181
PERIPH_PIN(2, 1, kIOMUXC_LPSPI2_SDI_SELECT_INPUT, 1, &pin_GPIO_SD_09),
8282
};
8383

84-
LPUART_Type *mcu_uart_banks[4] = { LPUART1, LPUART2, LPUART3, LPUART4 };
84+
LPUART_Type *const mcu_uart_banks[4] = { LPUART1, LPUART2, LPUART3, LPUART4 };
8585

8686
const mcu_periph_obj_t mcu_uart_rx_list[9] = {
8787
PERIPH_PIN(1, 2, kIOMUXC_LPUART1_RXD_SELECT_INPUT, 0, &pin_GPIO_SD_11),

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@
2727
#ifndef MICROPY_INCLUDED_MIMXRT10XX_MIMXRT1011_PERIPHERALS_MIMXRT1011_PERIPH_H
2828
#define MICROPY_INCLUDED_MIMXRT10XX_MIMXRT1011_PERIPHERALS_MIMXRT1011_PERIPH_H
2929

30-
extern LPI2C_Type *mcu_i2c_banks[2];
30+
extern LPI2C_Type *const mcu_i2c_banks[2];
3131

3232
extern const mcu_periph_obj_t mcu_i2c_sda_list[8];
3333
extern const mcu_periph_obj_t mcu_i2c_scl_list[8];
3434

35-
extern LPSPI_Type *mcu_spi_banks[2];
35+
extern LPSPI_Type *const mcu_spi_banks[2];
3636

3737
extern const mcu_periph_obj_t mcu_spi_sck_list[4];
3838
extern const mcu_periph_obj_t mcu_spi_mosi_list[4];
3939
extern const mcu_periph_obj_t mcu_spi_miso_list[4];
4040

41-
extern LPUART_Type *mcu_uart_banks[4];
41+
extern LPUART_Type *const mcu_uart_banks[4];
4242

4343
extern const mcu_periph_obj_t mcu_uart_rx_list[9];
4444
extern const mcu_periph_obj_t mcu_uart_tx_list[9];

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "py/mphal.h"
3131
#include "mimxrt10xx/periph.h"
3232

33-
LPI2C_Type *mcu_i2c_banks[4] = { LPI2C1, LPI2C2, LPI2C3, LPI2C4 };
33+
LPI2C_Type *const mcu_i2c_banks[4] = { LPI2C1, LPI2C2, LPI2C3, LPI2C4 };
3434

3535
const mcu_periph_obj_t mcu_i2c_sda_list[8] = {
3636
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] = {
6060
PERIPH_PIN(4, 3, kIOMUXC_LPI2C4_SCL_SELECT_INPUT, 1, &pin_GPIO_SD_B1_02),
6161
};
6262

63-
LPSPI_Type *mcu_spi_banks[4] = { LPSPI1, LPSPI2, LPSPI3, LPSPI4 };
63+
LPSPI_Type *const mcu_spi_banks[4] = { LPSPI1, LPSPI2, LPSPI3, LPSPI4 };
6464

6565
const mcu_periph_obj_t mcu_spi_sck_list[8] = {
6666
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] = {
104104
PERIPH_PIN(4, 4, kIOMUXC_LPSPI2_SDI_SELECT_INPUT, 1, &pin_GPIO_EMC_35),
105105
};
106106

107-
LPUART_Type *mcu_uart_banks[8] = { LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8 };
107+
LPUART_Type *const mcu_uart_banks[8] = { LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8 };
108108

109109
const mcu_periph_obj_t mcu_uart_rx_list[16] = {
110110
PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_07),

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@
2828
#ifndef MICROPY_INCLUDED_MIMXRT10XX_PERIPHERALS_MIMXRT1021_PERIPH_H
2929
#define MICROPY_INCLUDED_MIMXRT10XX_PERIPHERALS_MIMXRT1021_PERIPH_H
3030

31-
extern LPI2C_Type *mcu_i2c_banks[4];
31+
extern LPI2C_Type *const mcu_i2c_banks[4];
3232

3333
extern const mcu_periph_obj_t mcu_i2c_sda_list[8];
3434
extern const mcu_periph_obj_t mcu_i2c_scl_list[8];
3535

36-
extern LPSPI_Type *mcu_spi_banks[4];
36+
extern LPSPI_Type *const mcu_spi_banks[4];
3737

3838
extern const mcu_periph_obj_t mcu_spi_sck_list[8];
3939
extern const mcu_periph_obj_t mcu_spi_mosi_list[8];
4040
extern const mcu_periph_obj_t mcu_spi_miso_list[8];
4141

42-
extern LPUART_Type *mcu_uart_banks[8];
42+
extern LPUART_Type *const mcu_uart_banks[8];
4343

4444
extern const mcu_periph_obj_t mcu_uart_rx_list[16];
4545
extern const mcu_periph_obj_t mcu_uart_tx_list[16];

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "py/mphal.h"
3030
#include "mimxrt10xx/periph.h"
3131

32-
LPI2C_Type *mcu_i2c_banks[4] = { LPI2C1, LPI2C2, LPI2C3, LPI2C4 };
32+
LPI2C_Type *const mcu_i2c_banks[4] = { LPI2C1, LPI2C2, LPI2C3, LPI2C4 };
3333

3434
const mcu_periph_obj_t mcu_i2c_sda_list[9] = {
3535
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] = {
6161
PERIPH_PIN(4, 0, kIOMUXC_LPI2C4_SCL_SELECT_INPUT, 1, &pin_GPIO_AD_B0_12),
6262
};
6363

64-
LPSPI_Type *mcu_spi_banks[4] = { LPSPI1, LPSPI2, LPSPI3, LPSPI4 };
64+
LPSPI_Type *const mcu_spi_banks[4] = { LPSPI1, LPSPI2, LPSPI3, LPSPI4 };
6565

6666
const mcu_periph_obj_t mcu_spi_sck_list[8] = {
6767
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] = {
105105
PERIPH_PIN(4, 1, kIOMUXC_LPSPI4_SDI_SELECT_INPUT, 1, &pin_GPIO_B1_05),
106106
};
107107

108-
LPUART_Type *mcu_uart_banks[8] = { LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8 };
108+
LPUART_Type *const mcu_uart_banks[8] = { LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8 };
109109

110110
const mcu_periph_obj_t mcu_uart_rx_list[18] = {
111111
PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_13),

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@
2727
#ifndef MICROPY_INCLUDED_MIMXRT10XX_MIMXRT1062_PERIPHERALS_MIMXRT1011_PERIPH_H
2828
#define MICROPY_INCLUDED_MIMXRT10XX_MIMXRT1062_PERIPHERALS_MIMXRT1011_PERIPH_H
2929

30-
extern LPI2C_Type *mcu_i2c_banks[4];
30+
extern LPI2C_Type *const mcu_i2c_banks[4];
3131

3232
extern const mcu_periph_obj_t mcu_i2c_sda_list[9];
3333
extern const mcu_periph_obj_t mcu_i2c_scl_list[9];
3434

35-
extern LPSPI_Type *mcu_spi_banks[4];
35+
extern LPSPI_Type *const mcu_spi_banks[4];
3636

3737
extern const mcu_periph_obj_t mcu_spi_sck_list[8];
3838
extern const mcu_periph_obj_t mcu_spi_mosi_list[8];
3939
extern const mcu_periph_obj_t mcu_spi_miso_list[8];
4040

41-
extern LPUART_Type *mcu_uart_banks[8];
41+
extern LPUART_Type *const mcu_uart_banks[8];
4242

4343
extern const mcu_periph_obj_t mcu_uart_rx_list[18];
4444
extern const mcu_periph_obj_t mcu_uart_tx_list[18];

ports/mimxrt10xx/peripherals/mimxrt10xx/periph.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ typedef struct {
7272
.pin = p_pin, \
7373
}
7474

75-
extern LPI2C_Type *mcu_i2c_banks[];
76-
extern LPSPI_Type *mcu_spi_banks[];
77-
extern LPUART_Type *mcu_uart_banks[];
75+
extern LPI2C_Type *const mcu_i2c_banks[];
76+
extern LPSPI_Type *const mcu_spi_banks[];
77+
extern LPUART_Type *const mcu_uart_banks[];
7878

7979
#ifdef MIMXRT1011_SERIES
8080
#include "MIMXRT1011/periph.h"

0 commit comments

Comments
 (0)