#include "common.h"
Include dependency graph for nrf24l01.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | NRF_NOP 0xff |
#define | R_REGISTER 0x00 |
#define | W_REGISTER 0x01 |
#define | R_RX_PAYLOAD 0x61 |
#define | W_TX_PAYLOAD 0xA0 |
#define | FLUSH_TX 0xE1 |
#define | FLUSH_RX 0xE2 |
#define | REUSE_TX_PL 0xE3 |
#define | RX_ADDR_P0 0x0A |
#define | RX_ADDR_P1 0x0B |
#define | TX_ADDR 0x10 |
#define | RX_PW_P0 0x11 |
#define | RX_PW_P1 0x12 |
#define | FIFO_STATUS 0x17 |
#define | MAX_RT 0x10 |
#define | CONFIG_REG_ADDR 0x00 |
#define | STATUS_ADDR 0x07 |
#define | FLUSH_TX 0xE1 |
#define | TX_FULL 0x01 |
#define | RX_DR 0x40 |
#define | TX_DS 0x20 |
#define | IRQ() (!(P1IN & BIT7)) |
#define | RX_TX_TIME 100000 |
#define | BUT_TIME 10000 |
Functions | |
void | NRF_init (void) |
Initialize SPI interface and chip nRF24L01. | |
void | NRF_send (uint8_t byte) |
Send one byte to the air via chip nRF24L01. | |
void | NRF_prepareForReceive () |
After sending a byte you may set the device to RX mode. | |
bool_t | NRF_receive (uint8_t *const byte) |
Receive one byte from the air via chip nRF24L01. |
Definition in file nrf24l01.h.
#define BUT_TIME 10000 |
Definition at line 56 of file nrf24l01.h.
#define CONFIG_REG_ADDR 0x00 |
Definition at line 45 of file nrf24l01.h.
#define FIFO_STATUS 0x17 |
Definition at line 41 of file nrf24l01.h.
#define FLUSH_RX 0xE2 |
Definition at line 33 of file nrf24l01.h.
#define FLUSH_TX 0xE1 |
Definition at line 48 of file nrf24l01.h.
#define FLUSH_TX 0xE1 |
Definition at line 48 of file nrf24l01.h.
#define IRQ | ( | ) | (!(P1IN & BIT7)) |
Definition at line 53 of file nrf24l01.h.
#define MAX_RT 0x10 |
Definition at line 43 of file nrf24l01.h.
#define NRF_NOP 0xff |
Definition at line 27 of file nrf24l01.h.
#define R_REGISTER 0x00 |
Definition at line 28 of file nrf24l01.h.
#define R_RX_PAYLOAD 0x61 |
Definition at line 30 of file nrf24l01.h.
#define REUSE_TX_PL 0xE3 |
Definition at line 34 of file nrf24l01.h.
#define RX_ADDR_P0 0x0A |
Definition at line 36 of file nrf24l01.h.
#define RX_ADDR_P1 0x0B |
Definition at line 37 of file nrf24l01.h.
#define RX_DR 0x40 |
Definition at line 50 of file nrf24l01.h.
#define RX_PW_P0 0x11 |
Definition at line 39 of file nrf24l01.h.
#define RX_PW_P1 0x12 |
Definition at line 40 of file nrf24l01.h.
#define RX_TX_TIME 100000 |
Definition at line 55 of file nrf24l01.h.
#define STATUS_ADDR 0x07 |
Definition at line 46 of file nrf24l01.h.
#define TX_ADDR 0x10 |
Definition at line 38 of file nrf24l01.h.
#define TX_DS 0x20 |
Definition at line 51 of file nrf24l01.h.
#define TX_FULL 0x01 |
Definition at line 49 of file nrf24l01.h.
#define W_REGISTER 0x01 |
Definition at line 29 of file nrf24l01.h.
#define W_TX_PAYLOAD 0xA0 |
Definition at line 31 of file nrf24l01.h.
void NRF_init | ( | void | ) |
void NRF_prepareForReceive | ( | ) |
bool_t NRF_receive | ( | uint8_t *const | byte | ) |
Receive one byte from the air via chip nRF24L01.
Addresses are hardcoded:
byte | The data byte to receive. |
Definition at line 340 of file nrf24l01.c.
void NRF_send | ( | uint8_t | byte | ) |
Send one byte to the air via chip nRF24L01.
Addresses are hardcoded:
byte | The data byte to send. |
Definition at line 264 of file nrf24l01.c.