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/common/arduino-zero: Add Arudino SPI mapping #20884

Merged
merged 1 commit into from
Oct 1, 2024
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
14 changes: 14 additions & 0 deletions boards/common/arduino-zero/include/arduino_iomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,20 @@ extern "C" {
#define ARDUINO_PIN_9_PWM_CHAN 1
/** @} */

/**
* @name Arduino's SPI buses
* @{
*/
/**
* @brief SPI_DEV(0) is connected to the ISP
*/
#define ARDUINO_SPI_ISP SPI_DEV(0)
/**
* @brief SPI_DEV(1) is connected to D11/D12/D13
*/
#define ARDUINO_SPI_D11D12D13 SPI_DEV(1)
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
12 changes: 12 additions & 0 deletions boards/common/arduino-zero/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@
static const uart_conf_t uart_config[] = {
{
.dev = &SERCOM5->USART,
.rx_pin = GPIO_PIN(PB,23),

Check warning on line 130 in boards/common/arduino-zero/include/periph_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

comma should be followed by whitespace
.tx_pin = GPIO_PIN(PB,22),

Check warning on line 131 in boards/common/arduino-zero/include/periph_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

comma should be followed by whitespace
#ifdef MODULE_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
Expand All @@ -141,8 +141,8 @@
},
{
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA,11),

Check warning on line 144 in boards/common/arduino-zero/include/periph_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

comma should be followed by whitespace
.tx_pin = GPIO_PIN(PA,10),

Check warning on line 145 in boards/common/arduino-zero/include/periph_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

comma should be followed by whitespace
#ifdef MODULE_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
Expand Down Expand Up @@ -241,6 +241,18 @@
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM1->SPI,
.miso_pin = GPIO_PIN(PA, 19),
.mosi_pin = GPIO_PIN(PA, 16),
.clk_pin = GPIO_PIN(PA, 17),
.miso_mux = GPIO_MUX_C,
.mosi_mux = GPIO_MUX_C,
.clk_mux = GPIO_MUX_C,
.miso_pad = SPI_PAD_MISO_3,
.mosi_pad = SPI_PAD_MOSI_0_SCK_1,
.gclk_src = SAM0_GCLK_MAIN,
}
};

Expand Down
Loading