Skip to content

Commit

Permalink
dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig
Browse files Browse the repository at this point in the history
These changes were obtained by running a script  created by
Ulf Magnusson <[email protected]> for the following
specification:

1. Read the contents of all dts_fixup.h files in Zephyr
2. Check the left-hand side of the #define macros (i.e. the X in
   #define X Y)
3. Check if that name is also the name of a Kconfig option
   3.a If it is, then do nothing
   3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it
       has neither of these two prefixes
4. Replace the use of the changed #define in the code itself
   (.c, .h, .ld)

Additionally, some tweaks had to be added to this script to catch some
of the macros used in the code in a parameterized form, e.g.:
- CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS
- CONFIG_UART_##idx##_TX_PIN
- I2C_SBCON_##_num##_BASE_ADDR
and to prevent adding DT_ prefix to the following symbols:
- FLASH_START
- FLASH_SIZE
- SRAM_START
- SRAM_SIZE
- _ROM_ADDR
- _ROM_SIZE
- _RAM_ADDR
- _RAM_SIZE
which are surprisingly also defined in some dts_fixup.h files.

Finally, some manual corrections had to be done as well:
- name##_IRQ -> DT_##name##_IRQ in uart_stm32.c

Signed-off-by: Andrzej Głąbek <[email protected]>
  • Loading branch information
anangl committed Nov 13, 2018
1 parent 7fcab26 commit 48e1549
Show file tree
Hide file tree
Showing 304 changed files with 5,335 additions and 5,335 deletions.
4 changes: 2 additions & 2 deletions arch/arm/core/irq_manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ void _irq_priority_set(unsigned int irq, unsigned int prio, u32_t flags)
* affecting performance (can still be useful on systems with a
* reduced set of priorities, like Cortex-M0/M0+).
*/
__ASSERT(prio <= ((1 << CONFIG_NUM_IRQ_PRIO_BITS) - 1),
__ASSERT(prio <= ((1 << DT_NUM_IRQ_PRIO_BITS) - 1),
"invalid priority %d! values must be less than %d\n",
prio - _IRQ_PRIO_OFFSET,
(1 << CONFIG_NUM_IRQ_PRIO_BITS) - (_IRQ_PRIO_OFFSET));
(1 << DT_NUM_IRQ_PRIO_BITS) - (_IRQ_PRIO_OFFSET));
NVIC_SetPriority((IRQn_Type)irq, prio);
}

Expand Down
12 changes: 6 additions & 6 deletions boards/arc/arduino_101_sss/dts_fixup.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

#define CONFIG_BMI160_SLAVE DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_BASE_ADDRESS
#define CONFIG_BMI160_SPI_PORT_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_BUS_NAME
#define CONFIG_BMI160_GPIO_DEV_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_INT_GPIOS_CONTROLLER
#define CONFIG_BMI160_GPIO_PIN_NUM DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_INT_GPIOS_PIN
#define CONFIG_BMI160_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_LABEL
#define CONFIG_BMI160_SPI_BUS_FREQ DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_SPI_MAX_FREQUENCY
#define DT_BMI160_SLAVE DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_BASE_ADDRESS
#define DT_BMI160_SPI_PORT_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_BUS_NAME
#define DT_BMI160_GPIO_DEV_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_INT_GPIOS_CONTROLLER
#define DT_BMI160_GPIO_PIN_NUM DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_INT_GPIOS_PIN
#define DT_BMI160_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_LABEL
#define DT_BMI160_SPI_BUS_FREQ DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_SPI_MAX_FREQUENCY

24 changes: 12 additions & 12 deletions boards/arc/em_starterkit/arc_mpu_regions.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ static struct arc_mpu_region mpu_regions[] = {
AUX_MPU_RDP_KW | AUX_MPU_RDP_KR),

#else
#if CONFIG_ICCM_SIZE > 0
#if DT_ICCM_SIZE > 0
/* Region ICCM */
MPU_REGION_ENTRY("ICCM",
CONFIG_ICCM_BASE_ADDRESS,
CONFIG_ICCM_SIZE * 1024,
DT_ICCM_BASE_ADDRESS,
DT_ICCM_SIZE * 1024,
REGION_FLASH_ATTR),
#endif
#if CONFIG_DCCM_SIZE > 0
#if DT_DCCM_SIZE > 0
/* Region DCCM */
MPU_REGION_ENTRY("DCCM",
CONFIG_DCCM_BASE_ADDRESS,
CONFIG_DCCM_SIZE * 1024,
DT_DCCM_BASE_ADDRESS,
DT_DCCM_SIZE * 1024,
AUX_MPU_RDP_KW | AUX_MPU_RDP_KR),
#endif
#if CONFIG_SRAM_SIZE > 0
Expand All @@ -58,18 +58,18 @@ static struct arc_mpu_region mpu_regions[] = {
};
#else /* CONFIG_USERSPACE */
static struct arc_mpu_region mpu_regions[] = {
#if CONFIG_ICCM_SIZE > 0
#if DT_ICCM_SIZE > 0
/* Region ICCM */
MPU_REGION_ENTRY("ICCM",
CONFIG_ICCM_BASE_ADDRESS,
CONFIG_ICCM_SIZE * 1024,
DT_ICCM_BASE_ADDRESS,
DT_ICCM_SIZE * 1024,
REGION_FLASH_ATTR),
#endif
#if CONFIG_DCCM_SIZE > 0
#if DT_DCCM_SIZE > 0
/* Region DCCM */
MPU_REGION_ENTRY("DCCM",
CONFIG_DCCM_BASE_ADDRESS,
CONFIG_DCCM_SIZE * 1024,
DT_DCCM_BASE_ADDRESS,
DT_DCCM_SIZE * 1024,
REGION_RAM_ATTR),
#endif
#if CONFIG_SRAM_SIZE > 0
Expand Down
24 changes: 12 additions & 12 deletions boards/arc/nsim_em/arc_mpu_regions.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ static struct arc_mpu_region mpu_regions[] = {
AUX_MPU_RDP_KW | AUX_MPU_RDP_KR),

#else
#if CONFIG_ICCM_SIZE > 0
#if DT_ICCM_SIZE > 0
/* Region ICCM */
MPU_REGION_ENTRY("ICCM",
CONFIG_ICCM_BASE_ADDRESS,
CONFIG_ICCM_SIZE * 1024,
DT_ICCM_BASE_ADDRESS,
DT_ICCM_SIZE * 1024,
REGION_FLASH_ATTR),
#endif
#if CONFIG_DCCM_SIZE > 0
#if DT_DCCM_SIZE > 0
/* Region DCCM */
MPU_REGION_ENTRY("DCCM",
CONFIG_DCCM_BASE_ADDRESS,
CONFIG_DCCM_SIZE * 1024,
DT_DCCM_BASE_ADDRESS,
DT_DCCM_SIZE * 1024,
AUX_MPU_RDP_KW | AUX_MPU_RDP_KR),
#endif
#endif /* ARC_MPU_VER == 3 */
Expand All @@ -50,18 +50,18 @@ static struct arc_mpu_region mpu_regions[] = {
};
#else /* CONFIG_USERSPACE */
static struct arc_mpu_region mpu_regions[] = {
#if CONFIG_ICCM_SIZE > 0
#if DT_ICCM_SIZE > 0
/* Region ICCM */
MPU_REGION_ENTRY("ICCM",
CONFIG_ICCM_BASE_ADDRESS,
CONFIG_ICCM_SIZE * 1024,
DT_ICCM_BASE_ADDRESS,
DT_ICCM_SIZE * 1024,
REGION_FLASH_ATTR),
#endif
#if CONFIG_DCCM_SIZE > 0
#if DT_DCCM_SIZE > 0
/* Region DCCM */
MPU_REGION_ENTRY("DCCM",
CONFIG_DCCM_BASE_ADDRESS,
CONFIG_DCCM_SIZE * 1024,
DT_DCCM_BASE_ADDRESS,
DT_DCCM_SIZE * 1024,
REGION_RAM_ATTR),
#endif
/* Region Peripheral */
Expand Down
28 changes: 14 additions & 14 deletions boards/arm/96b_argonkey/dts_fixup.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
* generated data matches the driver definitions.
*/

#define CONFIG_HTS221_NAME DT_ST_STM32_I2C_V1_40005800_ST_HTS221_5F_LABEL
#define CONFIG_HTS221_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_HTS221_5F_BUS_NAME
#define DT_HTS221_NAME DT_ST_STM32_I2C_V1_40005800_ST_HTS221_5F_LABEL
#define DT_HTS221_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_HTS221_5F_BUS_NAME

#define CONFIG_LPS22HB_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_LABEL
#define CONFIG_LPS22HB_I2C_ADDR DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_BASE_ADDRESS
#define CONFIG_LPS22HB_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_BUS_NAME
#define DT_LPS22HB_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_LABEL
#define DT_LPS22HB_I2C_ADDR DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_BASE_ADDRESS
#define DT_LPS22HB_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_BUS_NAME

#define CONFIG_VL53L0X_NAME DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_LABEL
#define CONFIG_VL53L0X_I2C_ADDR DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_BASE_ADDRESS
#define CONFIG_VL53L0X_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_BUS_NAME
#define DT_VL53L0X_NAME DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_LABEL
#define DT_VL53L0X_I2C_ADDR DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_BASE_ADDRESS
#define DT_VL53L0X_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_BUS_NAME

#define CONFIG_LSM6DSL_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_LABEL
#define CONFIG_LSM6DSL_SPI_SELECT_SLAVE DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_BASE_ADDRESS
#define CONFIG_LSM6DSL_SPI_MASTER_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_BUS_NAME
#define CONFIG_LSM6DSL_SPI_BUS_FREQ DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_SPI_MAX_FREQUENCY
#define CONFIG_LSM6DSL_GPIO_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_IRQ_GPIOS_CONTROLLER
#define CONFIG_LSM6DSL_GPIO_PIN_NUM DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_IRQ_GPIOS_PIN
#define DT_LSM6DSL_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_LABEL
#define DT_LSM6DSL_SPI_SELECT_SLAVE DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_BASE_ADDRESS
#define DT_LSM6DSL_SPI_MASTER_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_BUS_NAME
#define DT_LSM6DSL_SPI_BUS_FREQ DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_SPI_MAX_FREQUENCY
#define DT_LSM6DSL_GPIO_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_IRQ_GPIOS_CONTROLLER
#define DT_LSM6DSL_GPIO_PIN_NUM DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_IRQ_GPIOS_PIN

#define CONFIG_LP3943_DEV_NAME DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_LABEL
#define CONFIG_LP3943_I2C_ADDRESS DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_BASE_ADDRESS
Expand Down
30 changes: 15 additions & 15 deletions boards/arm/adafruit_feather_m0_basic_proto/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,54 @@

static int board_pinmux_init(struct device *dev)
{
struct device *muxa = device_get_binding(CONFIG_PINMUX_SAM0_A_LABEL);
#if CONFIG_SPI_SAM0_SERCOM4_BASE_ADDRESS
struct device *muxb = device_get_binding(CONFIG_PINMUX_SAM0_B_LABEL);
struct device *muxa = device_get_binding(DT_PINMUX_SAM0_A_LABEL);
#if DT_SPI_SAM0_SERCOM4_BASE_ADDRESS
struct device *muxb = device_get_binding(DT_PINMUX_SAM0_B_LABEL);
#endif
ARG_UNUSED(dev);

#if CONFIG_UART_SAM0_SERCOM0_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM0_BASE_ADDRESS
/* SERCOM0 on RX=PA11/pad 3, TX=PA10/pad 2 */
pinmux_pin_set(muxa, 11, PINMUX_FUNC_C);
pinmux_pin_set(muxa, 10, PINMUX_FUNC_C);
#endif

#if CONFIG_UART_SAM0_SERCOM1_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM1_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_UART_SAM0_SERCOM2_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM2_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_UART_SAM0_SERCOM3_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM3_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_UART_SAM0_SERCOM4_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM4_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_UART_SAM0_SERCOM5_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM5_BASE_ADDRESS
#error Pin mapping is not configured
#endif

#if CONFIG_SPI_SAM0_SERCOM4_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM4_BASE_ADDRESS
/* SPI SERCOM4 on MISO=PA12/pad 0, MOSI=PB10/pad 2, SCK=PB11/pad 3 */
pinmux_pin_set(muxa, 12, PINMUX_FUNC_D);
pinmux_pin_set(muxb, 10, PINMUX_FUNC_D);
pinmux_pin_set(muxb, 11, PINMUX_FUNC_D);
#endif

#if CONFIG_SPI_SAM0_SERCOM0_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM0_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_SPI_SAM0_SERCOM1_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM1_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_SPI_SAM0_SERCOM2_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM2_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_SPI_SAM0_SERCOM3_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM3_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_SPI_SAM0_SERCOM5_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM5_BASE_ADDRESS
#error Pin mapping is not configured
#endif

Expand Down
26 changes: 13 additions & 13 deletions boards/arm/adafruit_trinket_m0/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,58 @@

static int board_pinmux_init(struct device *dev)
{
struct device *muxa = device_get_binding(CONFIG_PINMUX_SAM0_A_LABEL);
struct device *muxa = device_get_binding(DT_PINMUX_SAM0_A_LABEL);

ARG_UNUSED(dev);

#if CONFIG_UART_SAM0_SERCOM0_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM0_BASE_ADDRESS
/* SERCOM0 on RX=PA7/pad 3, TX=PA6/pad 2 */
pinmux_pin_set(muxa, 7, PINMUX_FUNC_D);
pinmux_pin_set(muxa, 6, PINMUX_FUNC_D);
#endif

#if CONFIG_UART_SAM0_SERCOM2_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM2_BASE_ADDRESS
/* SERCOM2 on RX=PA9/pad 1, TX=PA8/pad 0 */
pinmux_pin_set(muxa, 9, PINMUX_FUNC_D);
pinmux_pin_set(muxa, 8, PINMUX_FUNC_D);
#endif

#if CONFIG_UART_SAM0_SERCOM1_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM1_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_UART_SAM0_SERCOM3_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM3_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_UART_SAM0_SERCOM4_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM4_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_UART_SAM0_SERCOM5_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM5_BASE_ADDRESS
#error Pin mapping is not configured
#endif

#if CONFIG_SPI_SAM0_SERCOM0_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM0_BASE_ADDRESS
/* SPI SERCOM0 on MISO=PA9/pad 1, MOSI=PA6/pad 2, SCK=PA7/pad 3 */
pinmux_pin_set(muxa, 9, PINMUX_FUNC_D);
pinmux_pin_set(muxa, 6, PINMUX_FUNC_D);
pinmux_pin_set(muxa, 7, PINMUX_FUNC_D);
#endif

#if CONFIG_SPI_SAM0_SERCOM1_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM1_BASE_ADDRESS
/* SPI SERCOM1 on MOSI=PA0/pad 0, SCK=PA1/pad 1 */
pinmux_pin_set(muxa, 0, PINMUX_FUNC_D);
pinmux_pin_set(muxa, 1, PINMUX_FUNC_D);
#endif

#if CONFIG_SPI_SAM0_SERCOM2_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM2_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_SPI_SAM0_SERCOM3_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM3_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_SPI_SAM0_SERCOM4_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM4_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_SPI_SAM0_SERCOM5_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM5_BASE_ADDRESS
#error Pin mapping is not configured
#endif

Expand Down
28 changes: 14 additions & 14 deletions boards/arm/arduino_zero/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,56 @@

static int board_pinmux_init(struct device *dev)
{
struct device *muxa = device_get_binding(CONFIG_PINMUX_SAM0_A_LABEL);
struct device *muxb = device_get_binding(CONFIG_PINMUX_SAM0_B_LABEL);
struct device *muxa = device_get_binding(DT_PINMUX_SAM0_A_LABEL);
struct device *muxb = device_get_binding(DT_PINMUX_SAM0_B_LABEL);

ARG_UNUSED(dev);

#if CONFIG_UART_SAM0_SERCOM0_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM0_BASE_ADDRESS
/* SERCOM0 on RX=PA11, TX=PA10 */
pinmux_pin_set(muxa, 11, PINMUX_FUNC_C);
pinmux_pin_set(muxa, 10, PINMUX_FUNC_C);
#endif

#if CONFIG_UART_SAM0_SERCOM5_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM5_BASE_ADDRESS
/* SERCOM5 on RX=PB23, TX=PB22 */
pinmux_pin_set(muxb, 23, PINMUX_FUNC_D);
pinmux_pin_set(muxb, 22, PINMUX_FUNC_D);
#endif

#if CONFIG_UART_SAM0_SERCOM1_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM1_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_UART_SAM0_SERCOM2_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM2_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_UART_SAM0_SERCOM3_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM3_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_UART_SAM0_SERCOM4_BASE_ADDRESS
#if DT_UART_SAM0_SERCOM4_BASE_ADDRESS
#error Pin mapping is not configured
#endif

#if CONFIG_SPI_SAM0_SERCOM4_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM4_BASE_ADDRESS
/* SPI SERCOM4 on MISO=PA12/pad 0, MOSI=PB10/pad 2, SCK=PB11/pad 3 */
pinmux_pin_set(muxa, 12, PINMUX_FUNC_D);
pinmux_pin_set(muxb, 10, PINMUX_FUNC_D);
pinmux_pin_set(muxb, 11, PINMUX_FUNC_D);
#endif

#if CONFIG_SPI_SAM0_SERCOM0_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM0_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_SPI_SAM0_SERCOM1_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM1_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_SPI_SAM0_SERCOM2_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM2_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_SPI_SAM0_SERCOM3_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM3_BASE_ADDRESS
#error Pin mapping is not configured
#endif
#if CONFIG_SPI_SAM0_SERCOM5_BASE_ADDRESS
#if DT_SPI_SAM0_SERCOM5_BASE_ADDRESS
#error Pin mapping is not configured
#endif

Expand Down
Loading

0 comments on commit 48e1549

Please sign in to comment.