nrf24L01
1.0
nrf24L01 library
|
Spi driver for Nordic NRF24L01p on HvA Xmegaboard-version2. More...
#include "nrf24spiXM2.h"
Functions | |
void | nrfspiInit (void) |
Initialization of SPI. More... | |
uint8_t | nrfspiTransfer (uint8_t iData) |
SPI transfer. More... | |
Spi driver for Nordic NRF24L01p on HvA Xmegaboard-version2.
This file contains the routines for interfacing a Nordic NRF24L01p on HvA Xmegaboard-version2 from july 2015.
This driver uses UARTC0 as SPI-interface. The baudrate is the maximum rate. This is 8 MHz with Fcpu 32MHz and doesn't exceed the maximum speed 10 MHz from the NRF24L01p.
The interface exists of six signals:
void nrfspiInit | ( | void | ) |
Initialization of SPI.
This routines has no parameters. It Initializes UARTC0 as SPI and the signals IRQ and CE
uint8_t nrfspiTransfer | ( | uint8_t | iData | ) |
SPI transfer.
iData | data byte send to the slave |
This function send a byte IData to register to the slave, while data from the slave is received into the DATA register.
In this case, for the nrf24L01p, the value of status-register is shifted out