NRF24L01 Library
|
Functions | |
char | NRF24L01_ReadReg (char Reg) |
Read a register. | |
char | NRF24L01_WriteReg (char Reg, char Value) |
Returns the STATUS register and then modify a register. | |
char | NRF24L01_ReadRegBuf (char Reg, char *Buf, int Size) |
Returns the STATUS register and then read "n" registers. | |
char | NRF24L01_WriteRegBuf (char Reg, char *Buf, int Size) |
Returns the STATUS register and then write "n" registers. | |
char | NRF24L01_Get_Status (void) |
Returns the STATUS register. | |
char | NRF24L01_Get_CD (void) |
Returns the carrier signal in RX mode (high when detected) | |
void | NRF24L01_Set_Power (char Mode) |
Select power mode. | |
void | NRF24L01_Set_CH (char CH) |
Select the radio channel. | |
void | NRF24L01_Set_ShockBurst (char Mode) |
Select Enhanced ShockBurst ON/OFF. | |
void | NRF24L01_Set_Address_Width (char Width) |
Select the address width. | |
void | NRF24L01_Set_Device_Mode (char Device_Mode) |
Select mode receiver or transmitter. | |
void | NRF24L01_Set_RX_Pipe (char PipeNum, char *Address, int AddressSize, char PayloadSize) |
Enables and configures the pipe receiving the data. | |
void | NRF24L01_Disable_All_Pipes (void) |
Disable all pipes. | |
char | NRF24L01_Clear_Interrupts (void) |
Returns the STATUS register and then clear all interrupts. | |
void | NRF24L01_Set_TX_Address (char *Address, int Size) |
Sets the direction of transmission. | |
void | NRF24L01_Flush_TX (void) |
Empty the transmit buffer. | |
void | NRF24L01_Flush_RX (void) |
Empty the receive buffer. | |
void | NRF24L01_Init (char Device_Mode, char CH, char DataRate, char *Address, char Address_Width, char Size_Payload) |
Initializes the device. | |
void | NRF24L01_RF_TX (void) |
Turn on transmitter, and transmits the data loaded into the buffer. | |
void | NRF24L01_Write_TX_Buf (char *Buf, int Size) |
Writes the buffer of data transmission. | |
void | NRF24L01_Read_RX_Buf (char *Buf, int Size) |
Read the data reception buffer. |
char NRF24L01_Clear_Interrupts | ( | void | ) |
Returns the STATUS register and then clear all interrupts.
void NRF24L01_Disable_All_Pipes | ( | void | ) |
Disable all pipes.
void NRF24L01_Flush_RX | ( | void | ) |
Empty the receive buffer.
void NRF24L01_Flush_TX | ( | void | ) |
Empty the transmit buffer.
char NRF24L01_Get_CD | ( | void | ) |
Returns the carrier signal in RX mode (high when detected)
char NRF24L01_Get_Status | ( | void | ) |
Returns the STATUS register.
void NRF24L01_Init | ( | char | Device_Mode, |
char | CH, | ||
char | DataRate, | ||
char * | Address, | ||
char | Address_Width, | ||
char | Size_Payload | ||
) |
void NRF24L01_Read_RX_Buf | ( | char * | Buf, |
int | Size | ||
) |
Read the data reception buffer.
Buf | Buffer with data received |
Size | Buffer size |
char NRF24L01_ReadReg | ( | char | Reg | ) |
Read a register.
Reg | Register to read |
char NRF24L01_ReadRegBuf | ( | char | Reg, |
char * | Buf, | ||
int | Size | ||
) |
Returns the STATUS register and then read "n" registers.
Reg | Register to read |
Buf | Pointer to a buffer |
Size | Buffer Size |
void NRF24L01_RF_TX | ( | void | ) |
Turn on transmitter, and transmits the data loaded into the buffer.
void NRF24L01_Set_Address_Width | ( | char | Width | ) |
Select the address width.
Width | = 3..5 |
void NRF24L01_Set_CH | ( | char | CH | ) |
Select the radio channel.
CH | = 0..125 |
void NRF24L01_Set_Device_Mode | ( | char | Device_Mode | ) |
void NRF24L01_Set_Power | ( | char | Mode | ) |
void NRF24L01_Set_RX_Pipe | ( | char | PipeNum, |
char * | Address, | ||
int | AddressSize, | ||
char | PayloadSize | ||
) |
Enables and configures the pipe receiving the data.
PipeNum | Number of pipe |
Address | Address |
AddressSize | Address size |
PayloadSize | Buffer size, data receiver |
void NRF24L01_Set_ShockBurst | ( | char | Mode | ) |
Select Enhanced ShockBurst ON/OFF.
Disable this functionality to be compatible with nRF2401
Mode | = _ShockBurst_ON, _ShockBurst_OFF |
void NRF24L01_Set_TX_Address | ( | char * | Address, |
int | Size | ||
) |
Sets the direction of transmission.
Address | Address |
Size | Address size 3..5 |
void NRF24L01_Write_TX_Buf | ( | char * | Buf, |
int | Size | ||
) |
Writes the buffer of data transmission.
Buf | Buffer with data to send |
Size | Buffer size |
char NRF24L01_WriteReg | ( | char | Reg, |
char | Value | ||
) |
Returns the STATUS register and then modify a register.
Reg | Register to change |
Value | New value |
char NRF24L01_WriteRegBuf | ( | char | Reg, |
char * | Buf, | ||
int | Size | ||
) |
Returns the STATUS register and then write "n" registers.
Reg | Registers to change |
Buf | Pointer to a buffer |
Size | Buffer Size |