diff --git a/configs/samv71-xult/mrf24j40-starhub/defconfig b/configs/samv71-xult/mrf24j40-starhub/defconfig index d8b6c1c5682..ece6471edd8 100644 --- a/configs/samv71-xult/mrf24j40-starhub/defconfig +++ b/configs/samv71-xult/mrf24j40-starhub/defconfig @@ -219,8 +219,8 @@ CONFIG_SAMV7_HAVE_USBHS=y CONFIG_SAMV7_HAVE_USART0=y CONFIG_SAMV7_HAVE_USART1=y CONFIG_SAMV7_HAVE_USART2=y -# CONFIG_SAMV7_SPI is not set -# CONFIG_SAMV7_SPI_MASTER is not set +CONFIG_SAMV7_SPI=y +CONFIG_SAMV7_SPI_MASTER=y # CONFIG_SAMV7_SPI_SLAVE is not set # @@ -246,7 +246,7 @@ CONFIG_SAMV7_HSMCI0=y # CONFIG_SAMV7_RTT is not set # CONFIG_SAMV7_SDRAMC is not set # CONFIG_SAMV7_SMC is not set -# CONFIG_SAMV7_SPI0 is not set +CONFIG_SAMV7_SPI0=y # CONFIG_SAMV7_SPI1 is not set # CONFIG_SAMV7_SSC0 is not set # CONFIG_SAMV7_TC0 is not set @@ -254,7 +254,7 @@ CONFIG_SAMV7_HSMCI0=y # CONFIG_SAMV7_TC2 is not set # CONFIG_SAMV7_TC3 is not set # CONFIG_SAMV7_TRNG is not set -CONFIG_SAMV7_TWIHS0=y +# CONFIG_SAMV7_TWIHS0 is not set # CONFIG_SAMV7_TWIHS1 is not set # CONFIG_SAMV7_TWIHS2 is not set # CONFIG_SAMV7_UART0 is not set @@ -285,10 +285,16 @@ CONFIG_SAMV7_GPIOD_IRQ=y # CONFIG_SAMV7_PROGMEM is not set # -# TWIHS device driver options +# SPI Device Driver Configuration # -CONFIG_SAMV7_TWIHS0_FREQUENCY=100000 -CONFIG_SAMV7_TWIHS0_GLITCH_FILTER=1 +CONFIG_SAMV7_SPI0_MASTER=y + +# +# SPI Master Configuration +# +# CONFIG_SAMV7_SPI_CS_DECODING is not set +# CONFIG_SAMV7_SPI_VARSELECT is not set +# CONFIG_SAMV7_SPI_DMA is not set # # HSMCI device driver options diff --git a/configs/samv71-xult/src/sam_spi.c b/configs/samv71-xult/src/sam_spi.c index 8c740642fd7..81163fab648 100644 --- a/configs/samv71-xult/src/sam_spi.c +++ b/configs/samv71-xult/src/sam_spi.c @@ -74,14 +74,15 @@ void sam_spidev_initialize(void) #ifdef CONFIG_SAMV71XULT_MB1_SPI /* Enable chip select for mikroBUS1 */ - (void)stm32_configgpio(CLICK_MB1_CS); + (void)sam_configgpio(CLICK_MB1_CS); #endif #ifdef CONFIG_SAMV71XULT_MB2_SPI /* Enable chip select for mikroBUS2 */ - (void)stm32_configgpio(CLICK_MB2_CS); + (void)sam_configgpio(CLICK_MB2_CS); #endif +#endif /* CONFIG_SAMV7_SPI0_MASTER */ #ifdef CONFIG_SAMV7_SPI0_SLAVE #endif @@ -163,9 +164,9 @@ void sam_spi0select(uint32_t devid, bool selected) /* Set the GPIO low to select and high to de-select */ #if defined(CONFIG_SAMV71XULT_MB1_BEE) - stm32_gpiowrite(CLICK_MB1_CS, !selected); + sam_gpiowrite(CLICK_MB1_CS, !selected); #elif defined(CONFIG_SAMV71XULT_MB2_BEE) - stm32_gpiowrite(CLICK_MB2_CS, !selected); + sam_gpiowrite(CLICK_MB2_CS, !selected); #endif break; #endif