30 #ifndef __nrf24spiXM2_H__
31 #define __nrf24spiXM2_H__
34 #define F_CPU 32000000UL
38 #include <util/delay.h>
41 #define NRF_DESELECT 1
55 inline void nrfCSn(uint8_t bSelected)
58 else if (bSelected ==
NRF_SELECT) PORTF.OUTCLR = PIN5_bm;
71 inline void nrfCE(uint8_t bEnabled)
73 if (bEnabled ==
NRF_ENABLE) PORTF.OUTSET = PIN7_bm;
74 else if (bEnabled ==
NRF_DISABLE) PORTF.OUTCLR = PIN7_bm;
#define NRF_SELECT
Spi slave selected.
Definition: nrf24spiXM2.h:40
void nrfspiInit(void)
Initialization of SPI.
Definition: nrf24spiXM2.c:36
void nrfCE(uint8_t bEnabled)
Set chip enable.
Definition: nrf24spiXM2.h:71
#define NRF_DESELECT
Spi slave deselected.
Definition: nrf24spiXM2.h:41
#define NRF_ENABLE
NRF chip enable.
Definition: nrf24spiXM2.h:42
uint8_t nrfspiTransfer(uint8_t iData)
SPI transfer.
Definition: nrf24spiXM2.c:64
void nrfCSn(uint8_t bSelected)
Set chip select.
Definition: nrf24spiXM2.h:55
#define NRF_DISABLE
NRF chip disable.
Definition: nrf24spiXM2.h:43