Skip to content

Commit 9802bfe

Browse files
committed
tests: spi: add a configuration for the Arduino Zero.
Used to test the recent driver updates. Signed-off-by: Michael Hope <[email protected]>
1 parent d8e8a72 commit 9802bfe

File tree

1 file changed

+13
-0
lines changed
  • tests/drivers/spi/spi_loopback/src

1 file changed

+13
-0
lines changed

tests/drivers/spi/spi_loopback/src/spi.c

+13
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,19 @@ struct spi_cs_control spi_cs = {
7575
.delay = 0,
7676
};
7777

78+
#elif defined(CONFIG_BOARD_ARDUINO_ZERO)
79+
80+
#define SPI_DRV_NAME CONFIG_SPI_4_NAME
81+
#define SPI_SLAVE 0
82+
#define MIN_FREQ 500000
83+
84+
#define CS_CTRL_GPIO_DRV_NAME CONFIG_GPIO_SAM0_PORTA_LABEL
85+
86+
struct spi_cs_control spi_cs = {
87+
.gpio_pin = 3,
88+
.delay = 0,
89+
};
90+
7891
#else
7992
#undef SPI_CS
8093
#define SPI_CS NULL

0 commit comments

Comments
 (0)