This example demonstrates how to use MEGARF SPI module in slave mode.
The SPI driver API can be found here.
All AVR MEGARF devices can be used. This example has been tested with the following setup:
In This example Usart is configured in SPI master mode and SPI module is configured in slave mode. Usart SPI master will transfer the data to slave. SPI slave also sends data to Usart master when master sends the read command to slave. Received data validation is done on both the sides. If the received data matches with the transmit data then LED will glow.
This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.
For further information, visit Atmel AVR.