1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #20884 from maribu/boards/common/arduino-zero

boards/common/arduino-zero: Add Arudino SPI mapping
This commit is contained in:
benpicco 2024-10-01 16:46:55 +00:00 committed by GitHub
commit 884e21a234
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 0 deletions

View File

@ -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

View File

@ -241,6 +241,18 @@ static const spi_conf_t spi_config[] = {
.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,
}
};