Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: pinmux: Don't throw compiler warnings on using custom sercom use #23252

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions boards/arm/adafruit_feather_m0_basic_proto/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ static int board_pinmux_init(struct device *dev)
#endif

#if DT_ATMEL_SAM0_UART_SERCOM_1_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_2_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_3_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_4_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_5_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif

#if DT_ATMEL_SAM0_SPI_SERCOM_4_BASE_ADDRESS
Expand All @@ -45,19 +45,19 @@ static int board_pinmux_init(struct device *dev)
#endif

#if DT_ATMEL_SAM0_SPI_SERCOM_0_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_1_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_2_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_3_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_5_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif

#ifdef CONFIG_USB_DC_SAM0
Expand Down
16 changes: 8 additions & 8 deletions boards/arm/adafruit_trinket_m0/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ static int board_pinmux_init(struct device *dev)
#endif

#if DT_ATMEL_SAM0_UART_SERCOM_1_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_3_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_4_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_5_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif

#if DT_ATMEL_SAM0_SPI_SERCOM_0_BASE_ADDRESS
Expand All @@ -52,16 +52,16 @@ static int board_pinmux_init(struct device *dev)
#endif

#if DT_ATMEL_SAM0_SPI_SERCOM_2_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_3_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_4_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_5_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif

#ifdef CONFIG_USB_DC_SAM0
Expand Down
18 changes: 9 additions & 9 deletions boards/arm/arduino_zero/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ static int board_pinmux_init(struct device *dev)
#endif

#if DT_ATMEL_SAM0_UART_SERCOM_1_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_2_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_3_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_4_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif

#if DT_ATMEL_SAM0_SPI_SERCOM_4_BASE_ADDRESS
Expand All @@ -47,19 +47,19 @@ static int board_pinmux_init(struct device *dev)
#endif

#if DT_ATMEL_SAM0_SPI_SERCOM_0_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_1_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_2_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_3_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_5_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif

#ifdef CONFIG_USB_DC_SAM0
Expand Down
18 changes: 9 additions & 9 deletions boards/arm/atsamd20_xpro/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ static int board_pinmux_init(struct device *dev)
ARG_UNUSED(dev);

#if DT_ATMEL_SAM0_UART_SERCOM_0_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_1_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_2_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_3_BASE_ADDRESS
/* SERCOM3 on RX=PA25, TX=PA24 */
Expand All @@ -33,7 +33,7 @@ static int board_pinmux_init(struct device *dev)
pinmux_pin_set(muxb, 9, PINMUX_FUNC_D);
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_5_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif

#if DT_ATMEL_SAM0_SPI_SERCOM_0_BASE_ADDRESS
Expand All @@ -43,19 +43,19 @@ static int board_pinmux_init(struct device *dev)
pinmux_pin_set(muxa, 7, PINMUX_FUNC_D);
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_1_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_2_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_3_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_4_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_5_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif

return 0;
Expand Down
16 changes: 8 additions & 8 deletions boards/arm/atsamd21_xpro/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,34 @@ static int board_pinmux_init(struct device *dev)
pinmux_pin_set(muxa, 16, PINMUX_FUNC_C);
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_2_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_3_BASE_ADDRESS
/* SERCOM3 ON RX=PA23, TX=PA22 */
pinmux_pin_set(muxa, 23, PINMUX_FUNC_C);
pinmux_pin_set(muxa, 22, PINMUX_FUNC_C);
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_4_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_5_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif

#if DT_ATMEL_SAM0_SPI_SERCOM_0_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_1_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_2_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_3_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_4_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_5_BASE_ADDRESS
/* SPI SERCOM5 on MISO=PB16/pad 0, MOSI=PB22/pad 2, SCK=PB23/pad 3 */
Expand Down
42 changes: 21 additions & 21 deletions boards/arm/atsame54_xpro/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,43 @@ static int board_pinmux_init(struct device *dev)
ARG_UNUSED(muxd);

#if DT_ATMEL_SAM0_UART_SERCOM_0_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_1_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_2_BASE_ADDRESS
/* SERCOM2 ON RX=PB24, TX=PB25 */
pinmux_pin_set(muxb, 24, PINMUX_FUNC_D);
pinmux_pin_set(muxb, 25, PINMUX_FUNC_D);
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_3_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_4_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_5_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_6_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_UART_SERCOM_7_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif

#if DT_ATMEL_SAM0_SPI_SERCOM_0_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_1_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_2_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_3_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_4_BASE_ADDRESS
/* SERCOM4 ON MOSI=PB27, MISO=PB29, SCK=PB26 */
Expand All @@ -66,35 +66,35 @@ static int board_pinmux_init(struct device *dev)
pinmux_pin_set(muxb, 29, PINMUX_FUNC_D);
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_5_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_6_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_SPI_SERCOM_7_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif

#if DT_ATMEL_SAM0_I2C_SERCOM_0_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_I2C_SERCOM_1_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_I2C_SERCOM_2_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_I2C_SERCOM_3_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_I2C_SERCOM_4_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_I2C_SERCOM_5_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_I2C_SERCOM_6_BASE_ADDRESS
#error Pin mapping is not configured
#warning Pin mapping may not be configured
#endif
#if DT_ATMEL_SAM0_I2C_SERCOM_7_BASE_ADDRESS
pinmux_pin_set(muxd, 8, PINMUX_FUNC_C);
Expand Down
Loading