| LibDriver NRF24L01 1.0.0 NRF24L01 full function driver

Data Structures | Typedefs | Enumerations | Functions
nrf24l01 basic driver function
nrf24l01 driver function

nrf24l01 basic driver modules More...

## Data Structures
struct | nrf24l01_handle_s
| nrf24l01 handle structure definition More...
struct | nrf24l01_info_s
| nrf24l01 information structure definition More...

## Typedefs
typedef struct nrf24l01_handle_s | nrf24l01_handle_t
| nrf24l01 handle structure definition More...
typedef struct nrf24l01_info_s | nrf24l01_info_t
| nrf24l01 information structure definition More...

## Enumerations
enum | nrf24l01_bool_t { NRF24L01_BOOL_FALSE = 0x00 , NRF24L01_BOOL_TRUE = 0x01 }
| nrf24l01 bool enumeration definition More...
enum | nrf24l01_config_t { NRF24L01_CONFIG_MASK_RX_DR = 6 , NRF24L01_CONFIG_MASK_TX_DS = 5 , NRF24L01_CONFIG_MASK_MAX_RT = 4 , NRF24L01_CONFIG_EN_CRC = 3 , NRF24L01_CONFIG_CRCO = 2 , NRF24L01_CONFIG_PWR_UP = 1 }
| nrf24l01 config enumeration definition More...
enum | nrf24l01_mode_t { NRF24L01_MODE_TX = 0x00 , NRF24L01_MODE_RX = 0x01 }
| nrf24l01 mode enumeration definition More...
enum | nrf24l01_pipe_t { NRF24L01_PIPE_0 = 0 , NRF24L01_PIPE_1 = 1 , NRF24L01_PIPE_2 = 2 , NRF24L01_PIPE_3 = 3 , NRF24L01_PIPE_4 = 4 , NRF24L01_PIPE_5 = 5 }
| nrf24l01 pipe enumeration definition More...
enum | nrf24l01_address_width_t { NRF24L01_ADDRESS_WIDTH_ILLEGAL = 0 , NRF24L01_ADDRESS_WIDTH_3_BYTES = 1 , NRF24L01_ADDRESS_WIDTH_4_BYTES = 2 , NRF24L01_ADDRESS_WIDTH_5_BYTES = 3 }
| nrf24l01 address width enumeration definition More...
enum | nrf24l01_data_rate_t { NRF24L01_DATA_RATE_1M = 0 , NRF24L01_DATA_RATE_2M = 1 , NRF24L01_DATA_RATE_250K = 2 }
| nrf24l01 data rate enumeration definition More...
enum | nrf24l01_output_power_t { NRF24L01_OUTPUT_POWER_NEGATIVE_18_DBM = 0 , NRF24L01_OUTPUT_POWER_NEGATIVE_12_DBM = 1 , NRF24L01_OUTPUT_POWER_NEGATIVE_6_DBM = 2 , NRF24L01_OUTPUT_POWER_0_DBM = 3 }
| nrf24l01 output power enumeration definition More...
enum | nrf24l01_interrupt_t { NRF24L01_INTERRUPT_RX_DR = 6 , NRF24L01_INTERRUPT_TX_DS = 5 , NRF24L01_INTERRUPT_MAX_RT = 4 , NRF24L01_INTERRUPT_TX_FULL = 0 }
| nrf24l01 interrupt enumeration definition More...
enum | nrf24l01_fifo_status_t { NRF24L01_FIFO_STATUS_TX_REUSE = 6 , NRF24L01_FIFO_STATUS_TX_FULL = 5 , NRF24L01_FIFO_STATUS_TX_EMPTY = 4 , NRF24L01_FIFO_STATUS_RX_FULL = 1 , NRF24L01_FIFO_STATUS_RX_EMPTY = 0 }
| nrf24l01 fifo status enumeration definition More...

## Functions
uint8_t | nrf24l01_info (nrf24l01_info_t *info)
| get chip's information More...
uint8_t | nrf24l01_irq_handler (nrf24l01_handle_t *handle)
| irq handler More...
uint8_t | nrf24l01_init (nrf24l01_handle_t *handle)
| initialize the chip More...
uint8_t | nrf24l01_deinit (nrf24l01_handle_t *handle)
| close the chip More...
uint8_t | nrf24l01_send (nrf24l01_handle_t *handle, uint8_t *buf, uint8_t len)
| send data More...
uint8_t | nrf24l01_set_active (nrf24l01_handle_t *handle, nrf24l01_bool_t enable)
| enable or disable the chip More...
uint8_t | nrf24l01_set_config (nrf24l01_handle_t *handle, nrf24l01_config_t config, nrf24l01_bool_t enable)
| enable or disable configure More...
uint8_t | nrf24l01_get_config (nrf24l01_handle_t *handle, nrf24l01_config_t config, nrf24l01_bool_t *enable)
| get the configure More...
uint8_t | nrf24l01_set_mode (nrf24l01_handle_t *handle, nrf24l01_mode_t mode)
| set the chip mode More...
uint8_t | nrf24l01_get_mode (nrf24l01_handle_t *handle, nrf24l01_mode_t *mode)
| get the chip mode More...
uint8_t | nrf24l01_set_auto_acknowledgment (nrf24l01_handle_t *handle, nrf24l01_pipe_t pipe, nrf24l01_bool_t enable)
| enable or disable auto acknowledgment More...
uint8_t | nrf24l01_get_auto_acknowledgment (nrf24l01_handle_t *handle, nrf24l01_pipe_t pipe, nrf24l01_bool_t *enable)
| get the auto acknowledgment status More...
uint8_t | nrf24l01_set_rx_pipe (nrf24l01_handle_t *handle, nrf24l01_pipe_t pipe, nrf24l01_bool_t enable)
| enable or disable rx pipe More...
uint8_t | nrf24l01_get_rx_pipe (nrf24l01_handle_t *handle, nrf24l01_pipe_t pipe, nrf24l01_bool_t *enable)
| get the rx pipe status More...
uint8_t | nrf24l01_set_address_width (nrf24l01_handle_t *handle, nrf24l01_address_width_t width)
| set the address width More...
uint8_t | nrf24l01_get_address_width (nrf24l01_handle_t *handle, nrf24l01_address_width_t *width)
| get the address width More...
uint8_t | nrf24l01_set_auto_retransmit_delay (nrf24l01_handle_t *handle, uint8_t delay)
| set the auto retransmit delay More...
uint8_t | nrf24l01_get_auto_retransmit_delay (nrf24l01_handle_t *handle, uint8_t *delay)
| get the auto retransmit delay More...
uint8_t | nrf24l01_auto_retransmit_delay_convert_to_register (nrf24l01_handle_t *handle, uint32_t us, uint8_t *reg)
| convert the delay to the register raw data More...
uint8_t | nrf24l01_auto_retransmit_delay_convert_to_data (nrf24l01_handle_t *handle, uint8_t reg, uint32_t *us)
| convert the register raw data to the delay More...
uint8_t | nrf24l01_set_auto_retransmit_count (nrf24l01_handle_t *handle, uint8_t count)
| set the auto retransmit count More...
uint8_t | nrf24l01_get_auto_retransmit_count (nrf24l01_handle_t *handle, uint8_t *count)
| get the auto retransmit count More...
uint8_t | nrf24l01_set_channel_frequency (nrf24l01_handle_t *handle, uint8_t freq)
| set the channel frequency More...
uint8_t | nrf24l01_get_channel_frequency (nrf24l01_handle_t *handle, uint8_t *freq)
| get the channel frequency More...
uint8_t | nrf24l01_set_continuous_carrier_transmit (nrf24l01_handle_t *handle, nrf24l01_bool_t enable)
| enable or disable continuous carrier transmit More...
uint8_t | nrf24l01_get_continuous_carrier_transmit (nrf24l01_handle_t *handle, nrf24l01_bool_t *enable)
| get the continuous carrier transmit status More...
uint8_t | nrf24l01_set_force_pll_lock_signal (nrf24l01_handle_t *handle, nrf24l01_bool_t enable)
| enable or disable force pll lock signal More...
uint8_t | nrf24l01_get_force_pll_lock_signal (nrf24l01_handle_t *handle, nrf24l01_bool_t *enable)
| get the force pll lock signal status More...
uint8_t | nrf24l01_set_data_rate (nrf24l01_handle_t *handle, nrf24l01_data_rate_t rate)
| set the data rate More...
uint8_t | nrf24l01_get_data_rate (nrf24l01_handle_t *handle, nrf24l01_data_rate_t *rate)
| get the data rate More...
uint8_t | nrf24l01_set_output_power (nrf24l01_handle_t *handle, nrf24l01_output_power_t power)
| set the output power More...
uint8_t | nrf24l01_get_output_power (nrf24l01_handle_t *handle, nrf24l01_output_power_t *power)
| get the output power More...
uint8_t | nrf24l01_get_interrupt (nrf24l01_handle_t *handle, nrf24l01_interrupt_t type, nrf24l01_bool_t *enable)
| get the interrupt status More...
uint8_t | nrf24l01_clear_interrupt (nrf24l01_handle_t *handle, nrf24l01_interrupt_t type)
| clear the interrupt status More...
uint8_t | nrf24l01_get_data_pipe_number (nrf24l01_handle_t *handle, uint8_t *number)
| get the data pipe number More...
uint8_t | nrf24l01_get_lost_packet_count (nrf24l01_handle_t *handle, uint8_t *count)
| get the lost packet count More...
uint8_t | nrf24l01_get_retransmitted_packet_count (nrf24l01_handle_t *handle, uint8_t *count)
| get the retransmitted packet count More...
uint8_t | nrf24l01_get_received_power_detector (nrf24l01_handle_t *handle, nrf24l01_bool_t *enable)
| get the received power detector More...
uint8_t | nrf24l01_set_rx_pipe_0_address (nrf24l01_handle_t *handle, uint8_t *addr, uint8_t len)
| set the rx pipe 0 address More...
uint8_t | nrf24l01_get_rx_pipe_0_address (nrf24l01_handle_t *handle, uint8_t *addr, uint8_t *len)
| get the rx pipe 0 address More...
uint8_t | nrf24l01_set_rx_pipe_1_address (nrf24l01_handle_t *handle, uint8_t *addr, uint8_t len)
| set the rx pipe 1 address More...
uint8_t | nrf24l01_get_rx_pipe_1_address (nrf24l01_handle_t *handle, uint8_t *addr, uint8_t *len)
| get the rx pipe 1 address More...
uint8_t | nrf24l01_set_rx_pipe_2_address (nrf24l01_handle_t *handle, uint8_t addr)
| set the rx pipe 2 address More...
uint8_t | nrf24l01_get_rx_pipe_2_address (nrf24l01_handle_t *handle, uint8_t *addr)
| get the rx pipe 2 address More...
uint8_t | nrf24l01_set_rx_pipe_3_address (nrf24l01_handle_t *handle, uint8_t addr)
| set the rx pipe 3 address More...
uint8_t | nrf24l01_get_rx_pipe_3_address (nrf24l01_handle_t *handle, uint8_t *addr)
| get the rx pipe 3 address More...
uint8_t | nrf24l01_set_rx_pipe_4_address (nrf24l01_handle_t *handle, uint8_t addr)
| set the rx pipe 4 address More...
uint8_t | nrf24l01_get_rx_pipe_4_address (nrf24l01_handle_t *handle, uint8_t *addr)
| get the rx pipe 4 address More...
uint8_t | nrf24l01_set_rx_pipe_5_address (nrf24l01_handle_t *handle, uint8_t addr)
| set the rx pipe 5 address More...
uint8_t | nrf24l01_get_rx_pipe_5_address (nrf24l01_handle_t *handle, uint8_t *addr)
| get the rx pipe 5 address More...
uint8_t | nrf24l01_set_tx_address (nrf24l01_handle_t *handle, uint8_t *addr, uint8_t len)
| set the tx address More...
uint8_t | nrf24l01_get_tx_address (nrf24l01_handle_t *handle, uint8_t *addr, uint8_t *len)
| get the tx address More...
uint8_t | nrf24l01_set_pipe_0_payload_number (nrf24l01_handle_t *handle, uint8_t num)
| set the pipe 0 payload number More...
uint8_t | nrf24l01_get_pipe_0_payload_number (nrf24l01_handle_t *handle, uint8_t *num)
| get the pipe 0 payload number More...
uint8_t | nrf24l01_set_pipe_1_payload_number (nrf24l01_handle_t *handle, uint8_t num)
| set the pipe 1 payload number More...
uint8_t | nrf24l01_get_pipe_1_payload_number (nrf24l01_handle_t *handle, uint8_t *num)
| get the pipe 1 payload number More...
uint8_t | nrf24l01_set_pipe_2_payload_number (nrf24l01_handle_t *handle, uint8_t num)
| set the pipe 2 payload number More...
uint8_t | nrf24l01_get_pipe_2_payload_number (nrf24l01_handle_t *handle, uint8_t *num)
| get the pipe 2 payload number More...
uint8_t | nrf24l01_set_pipe_3_payload_number (nrf24l01_handle_t *handle, uint8_t num)
| set the pipe 3 payload number More...
uint8_t | nrf24l01_get_pipe_3_payload_number (nrf24l01_handle_t *handle, uint8_t *num)
| get the pipe 3 payload number More...
uint8_t | nrf24l01_set_pipe_4_payload_number (nrf24l01_handle_t *handle, uint8_t num)
| set the pipe 4 payload number More...
uint8_t | nrf24l01_get_pipe_4_payload_number (nrf24l01_handle_t *handle, uint8_t *num)
| get the pipe 4 payload number More...
uint8_t | nrf24l01_set_pipe_5_payload_number (nrf24l01_handle_t *handle, uint8_t num)
| set the pipe 5 payload number More...
uint8_t | nrf24l01_get_pipe_5_payload_number (nrf24l01_handle_t *handle, uint8_t *num)
| get the pipe 5 payload number More...
uint8_t | nrf24l01_get_fifo_status (nrf24l01_handle_t *handle, uint8_t *status)
| get the fifo status More...
uint8_t | nrf24l01_set_pipe_dynamic_payload (nrf24l01_handle_t *handle, nrf24l01_pipe_t pipe, nrf24l01_bool_t enable)
| enable or disable the pipe dynamic payload More...
uint8_t | nrf24l01_get_pipe_dynamic_payload (nrf24l01_handle_t *handle, nrf24l01_pipe_t pipe, nrf24l01_bool_t *enable)
| get the pipe dynamic payload status More...
uint8_t | nrf24l01_set_dynamic_payload (nrf24l01_handle_t *handle, nrf24l01_bool_t enable)
| enable or disable the dynamic payload More...
uint8_t | nrf24l01_get_dynamic_payload (nrf24l01_handle_t *handle, nrf24l01_bool_t *enable)
| get the dynamic payload status More...
uint8_t | nrf24l01_set_payload_with_ack (nrf24l01_handle_t *handle, nrf24l01_bool_t enable)
| enable or disable the payload with ack More...
uint8_t | nrf24l01_get_payload_with_ack (nrf24l01_handle_t *handle, nrf24l01_bool_t *enable)
| get the payload with ack status More...
uint8_t | nrf24l01_set_tx_payload_with_no_ack (nrf24l01_handle_t *handle, nrf24l01_bool_t enable)
| enable or disable the tx payload with no ack More...
uint8_t | nrf24l01_get_tx_payload_with_no_ack (nrf24l01_handle_t *handle, nrf24l01_bool_t *enable)
| get the tx payload with no ack status More...
uint8_t | nrf24l01_read_rx_payload (nrf24l01_handle_t *handle, uint8_t *buf, uint8_t len)
| read the rx payload More...
uint8_t | nrf24l01_write_tx_payload (nrf24l01_handle_t *handle, uint8_t *buf, uint8_t len)
| write the tx payload More...
uint8_t | nrf24l01_flush_tx (nrf24l01_handle_t *handle)
| flush tx More...
uint8_t | nrf24l01_flush_rx (nrf24l01_handle_t *handle)
| flush rx More...
uint8_t | nrf24l01_reuse_tx_payload (nrf24l01_handle_t *handle)
| reuse the tx payload More...
uint8_t | nrf24l01_get_rx_payload_width (nrf24l01_handle_t *handle, uint8_t *width)
| get the rx payload width More...
uint8_t | nrf24l01_write_payload_with_ack (nrf24l01_handle_t *handle, nrf24l01_pipe_t pipe, uint8_t *buf, uint8_t len)
| write the payload with ack More...
uint8_t | nrf24l01_write_payload_with_no_ack (nrf24l01_handle_t *handle, uint8_t *buf, uint8_t len)
| write the payload with no ack More...
uint8_t | nrf24l01_nop (nrf24l01_handle_t *handle)
| nop More...

## Detailed Description

nrf24l01 basic driver modules

## Typedef Documentation

## ◆ nrf24l01_handle_t

typedef struct nrf24l01_handle_s nrf24l01_handle_t

nrf24l01 handle structure definition

## ◆ nrf24l01_info_t

typedef struct nrf24l01_info_s nrf24l01_info_t

nrf24l01 information structure definition

## Enumeration Type Documentation

## ◆ nrf24l01_address_width_t

enum nrf24l01_address_width_t

nrf24l01 address width enumeration definition

Enumerator
NRF24L01_ADDRESS_WIDTH_ILLEGAL | illegal
NRF24L01_ADDRESS_WIDTH_3_BYTES | 3 bytes
NRF24L01_ADDRESS_WIDTH_4_BYTES | 4 bytes
NRF24L01_ADDRESS_WIDTH_5_BYTES | 5 bytes

Definition at line 106 of file driver_nrf24l01.h.

## ◆ nrf24l01_bool_t

enum nrf24l01_bool_t

nrf24l01 bool enumeration definition

Enumerator
NRF24L01_BOOL_FALSE | disable function
NRF24L01_BOOL_TRUE | enable function

Definition at line 62 of file driver_nrf24l01.h.

## ◆ nrf24l01_config_t

enum nrf24l01_config_t

nrf24l01 config enumeration definition

Enumerator
NRF24L01_CONFIG_MASK_RX_DR | mask interrupt caused by RX_DR
NRF24L01_CONFIG_MASK_TX_DS | mask interrupt caused by TX_DS
NRF24L01_CONFIG_MASK_MAX_RT | mask interrupt caused by MAX_RT
NRF24L01_CONFIG_EN_CRC | enable CRC
NRF24L01_CONFIG_CRCO | enable CRC encoding 2 bytes or 1 byte
NRF24L01_CONFIG_PWR_UP | power up

Definition at line 71 of file driver_nrf24l01.h.

## ◆ nrf24l01_data_rate_t

enum nrf24l01_data_rate_t

nrf24l01 data rate enumeration definition

Enumerator
NRF24L01_DATA_RATE_1M | 1 Mbps
NRF24L01_DATA_RATE_2M | 2 Mbps
NRF24L01_DATA_RATE_250K | 250 Kbps

Definition at line 117 of file driver_nrf24l01.h.

## ◆ nrf24l01_fifo_status_t

enum nrf24l01_fifo_status_t

nrf24l01 fifo status enumeration definition

Enumerator
NRF24L01_FIFO_STATUS_TX_REUSE | tx reuse
NRF24L01_FIFO_STATUS_TX_FULL | tx full
NRF24L01_FIFO_STATUS_TX_EMPTY | tx empty
NRF24L01_FIFO_STATUS_RX_FULL | rx full
NRF24L01_FIFO_STATUS_RX_EMPTY | rx empty

Definition at line 149 of file driver_nrf24l01.h.

## ◆ nrf24l01_interrupt_t

enum nrf24l01_interrupt_t

nrf24l01 interrupt enumeration definition

Enumerator
NRF24L01_INTERRUPT_RX_DR | data ready rx fifo interrupt
NRF24L01_INTERRUPT_TX_DS | data send rx fifo interrupt
NRF24L01_INTERRUPT_MAX_RT | maximum number of tx retransmits interrupt
NRF24L01_INTERRUPT_TX_FULL | tx fifo full flag

Definition at line 138 of file driver_nrf24l01.h.

## ◆ nrf24l01_mode_t

enum nrf24l01_mode_t

nrf24l01 mode enumeration definition

Enumerator
NRF24L01_MODE_TX | tx mode
NRF24L01_MODE_RX | rx mode

Definition at line 84 of file driver_nrf24l01.h.

## ◆ nrf24l01_output_power_t

enum nrf24l01_output_power_t

nrf24l01 output power enumeration definition

Enumerator
NRF24L01_OUTPUT_POWER_NEGATIVE_18_DBM | -18 dBm
NRF24L01_OUTPUT_POWER_NEGATIVE_12_DBM | -12 dBm
NRF24L01_OUTPUT_POWER_NEGATIVE_6_DBM | -6 dBm
NRF24L01_OUTPUT_POWER_0_DBM | 0 dBm

Definition at line 127 of file driver_nrf24l01.h.

## ◆ nrf24l01_pipe_t

enum nrf24l01_pipe_t

nrf24l01 pipe enumeration definition

Enumerator
NRF24L01_PIPE_0 | pipe 0
NRF24L01_PIPE_1 | pipe 1
NRF24L01_PIPE_2 | pipe 2
NRF24L01_PIPE_3 | pipe 3
NRF24L01_PIPE_4 | pipe 4
NRF24L01_PIPE_5 | pipe 5

Definition at line 93 of file driver_nrf24l01.h.

## Function Documentation

## ◆ nrf24l01_auto_retransmit_delay_convert_to_data()

uint8_t nrf24l01_auto_retransmit_delay_convert_to_data | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | reg,
|  | uint32_t * | us
| ) |  |

convert the register raw data to the delay

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | reg | is the register raw data
  [out] | *us | points to a delay buffer

Returns
  status code
  - 0 success
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1108 of file driver_nrf24l01.c.

## ◆ nrf24l01_auto_retransmit_delay_convert_to_register()

uint8_t nrf24l01_auto_retransmit_delay_convert_to_register | ( | nrf24l01_handle_t * | handle,
|  | uint32_t | us,
|  | uint8_t * | reg
| ) |  |

convert the delay to the register raw data

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | us | is the delay
  [out] | *reg | points to a register raw buffer

Returns
  status code
  - 0 success
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1081 of file driver_nrf24l01.c.

## ◆ nrf24l01_clear_interrupt()

uint8_t nrf24l01_clear_interrupt | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_interrupt_t | type
| ) |  |

clear the interrupt status

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | type | is the interrupt type

Returns
  status code
  - 0 success
  - 1 clear interrupt failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1681 of file driver_nrf24l01.c.

## ◆ nrf24l01_deinit()

uint8_t nrf24l01_deinit | ( | nrf24l01_handle_t * | handle | ) |

close the chip

Parameters

  [in] | *handle | points to an nrf24l01 handle structure

Returns
  status code
  - 0 success
  - 1 nop failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 gpio deinit failed
  - 5 spi deinit failed

Note
  none

Definition at line 249 of file driver_nrf24l01.c.

## ◆ nrf24l01_flush_rx()

uint8_t nrf24l01_flush_rx | ( | nrf24l01_handle_t * | handle | ) |

flush rx

Parameters

  [in] | *handle | points to an nrf24l01 handle structure

Returns
  status code
  - 0 success
  - 1 flush rx failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3584 of file driver_nrf24l01.c.

## ◆ nrf24l01_flush_tx()

uint8_t nrf24l01_flush_tx | ( | nrf24l01_handle_t * | handle | ) |

flush tx

Parameters

  [in] | *handle | points to an nrf24l01 handle structure

Returns
  status code
  - 0 success
  - 1 flush tx failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3550 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_address_width()

uint8_t nrf24l01_get_address_width | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_address_width_t * | width
| ) |  |

get the address width

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *width | points to an address width buffer

Returns
  status code
  - 0 success
  - 1 get address width failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 955 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_auto_acknowledgment()

uint8_t nrf24l01_get_auto_acknowledgment | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_pipe_t | pipe,
|  | nrf24l01_bool_t * | enable
| ) |  |

get the auto acknowledgment status

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | pipe | is the rf pipe
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get auto acknowledgment failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 789 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_auto_retransmit_count()

uint8_t nrf24l01_get_auto_retransmit_count | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | count
| ) |  |

get the auto retransmit count

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *count | points to an auto retransmit count buffer

Returns
  status code
  - 0 success
  - 1 get auto retransmit count failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1187 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_auto_retransmit_delay()

uint8_t nrf24l01_get_auto_retransmit_delay | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | delay
| ) |  |

get the auto retransmit delay

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *delay | points to an auto retransmit delay buffer

Returns
  status code
  - 0 success
  - 1 get auto retransmit delay failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1044 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_channel_frequency()

uint8_t nrf24l01_get_channel_frequency | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | freq
| ) |  |

get the channel frequency

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *freq | points to a channel freq buffer

Returns
  status code
  - 0 success
  - 1 get channel frequency failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1276 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_config()

uint8_t nrf24l01_get_config | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_config_t | config,
|  | nrf24l01_bool_t * | enable
| ) |  |

get the configure

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | config | is the config type
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get config failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 623 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_continuous_carrier_transmit()

uint8_t nrf24l01_get_continuous_carrier_transmit | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t * | enable
| ) |  |

get the continuous carrier transmit status

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get continuous carrier transmit failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1358 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_data_pipe_number()

uint8_t nrf24l01_get_data_pipe_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | number
| ) |  |

get the data pipe number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *number | points to a number buffer

Returns
  status code
  - 0 success
  - 1 get data pipe number failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1726 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_data_rate()

uint8_t nrf24l01_get_data_rate | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_data_rate_t * | rate
| ) |  |

get the data rate

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *rate | points to a data rate buffer

Returns
  status code
  - 0 success
  - 1 get data rate failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1524 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_dynamic_payload()

uint8_t nrf24l01_get_dynamic_payload | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t * | enable
| ) |  |

get the dynamic payload status

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get dynamic payload failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3239 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_fifo_status()

uint8_t nrf24l01_get_fifo_status | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | status
| ) |  |

get the fifo status

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *status | points to a fifo status buffer

Returns
  status code
  - 0 success
  - 1 get fifo status failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3075 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_force_pll_lock_signal()

uint8_t nrf24l01_get_force_pll_lock_signal | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t * | enable
| ) |  |

get the force pll lock signal status

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get force pll lock signal failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1440 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_interrupt()

uint8_t nrf24l01_get_interrupt | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_interrupt_t | type,
|  | nrf24l01_bool_t * | enable
| ) |  |

get the interrupt status

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | type | is the interrupt type
  [out] | *enable | points to a bool buffer

Returns
  status code
  - 0 success
  - 1 get interrupt failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1644 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_lost_packet_count()

uint8_t nrf24l01_get_lost_packet_count | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | count
| ) |  |

get the lost packet count

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *count | points to a count buffer

Returns
  status code
  - 0 success
  - 1 get lost packet count failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1763 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_mode()

uint8_t nrf24l01_get_mode | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_mode_t * | mode
| ) |  |

get the chip mode

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *mode | points to a chip mode buffer

Returns
  status code
  - 0 success
  - 1 get mode failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 705 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_output_power()

uint8_t nrf24l01_get_output_power | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_output_power_t * | power
| ) |  |

get the output power

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *power | points to an output power buffer

Returns
  status code
  - 0 success
  - 1 get output power failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1606 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_payload_with_ack()

uint8_t nrf24l01_get_payload_with_ack | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t * | enable
| ) |  |

get the payload with ack status

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get payload with ack failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3321 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_pipe_0_payload_number()

uint8_t nrf24l01_get_pipe_0_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | num
| ) |  |

get the pipe 0 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *num | points to a payload number buffer

Returns
  status code
  - 0 success
  - 1 get pipe 0 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2649 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_pipe_1_payload_number()

uint8_t nrf24l01_get_pipe_1_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | num
| ) |  |

get the pipe 1 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *num | points to a payload number buffer

Returns
  status code
  - 0 success
  - 1 get pipe 1 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2727 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_pipe_2_payload_number()

uint8_t nrf24l01_get_pipe_2_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | num
| ) |  |

get the pipe 2 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *num | points to a payload number buffer

Returns
  status code
  - 0 success
  - 1 get pipe 2 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2805 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_pipe_3_payload_number()

uint8_t nrf24l01_get_pipe_3_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | num
| ) |  |

get the pipe 3 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *num | points to a payload number buffer

Returns
  status code
  - 0 success
  - 1 get pipe 3 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2883 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_pipe_4_payload_number()

uint8_t nrf24l01_get_pipe_4_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | num
| ) |  |

get the pipe 4 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *num | points to a payload number buffer

Returns
  status code
  - 0 success
  - 1 get pipe 4 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2961 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_pipe_5_payload_number()

uint8_t nrf24l01_get_pipe_5_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | num
| ) |  |

get the pipe 5 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *num | points to a payload number buffer

Returns
  status code
  - 0 success
  - 1 get pipe 5 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3039 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_pipe_dynamic_payload()

uint8_t nrf24l01_get_pipe_dynamic_payload | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_pipe_t | pipe,
|  | nrf24l01_bool_t * | enable
| ) |  |

get the pipe dynamic payload status

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | pipe | is the pipe number
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get pipe dynamic payload failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3157 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_received_power_detector()

uint8_t nrf24l01_get_received_power_detector | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t * | enable
| ) |  |

get the received power detector

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *enable | points to a bool buffer

Returns
  status code
  - 0 success
  - 1 get received power detector failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1837 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_retransmitted_packet_count()

uint8_t nrf24l01_get_retransmitted_packet_count | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | count
| ) |  |

get the retransmitted packet count

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *count | points to a count buffer

Returns
  status code
  - 0 success
  - 1 get retransmitted packet count failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1800 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_rx_payload_width()

uint8_t nrf24l01_get_rx_payload_width | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | width
| ) |  |

get the rx payload width

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *width | points to a width buffer

Returns
  status code
  - 0 success
  - 1 get rx payload width failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3653 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_rx_pipe()

uint8_t nrf24l01_get_rx_pipe | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_pipe_t | pipe,
|  | nrf24l01_bool_t * | enable
| ) |  |

get the rx pipe status

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | pipe | is the rf pipe
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get rx pipe failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 873 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_rx_pipe_0_address()

uint8_t nrf24l01_get_rx_pipe_0_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | addr,
|  | uint8_t * | len
| ) |  |

get the rx pipe 0 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | *addr | points to an address buffer
  [in,out] | *len | points to an address length buffer

Returns
  status code
  - 0 success
  - 1 get rx pipe 0 address failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len is too short

Note
  none

Definition at line 1952 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_rx_pipe_1_address()

uint8_t nrf24l01_get_rx_pipe_1_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | addr,
|  | uint8_t * | len
| ) |  |

get the rx pipe 1 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | *addr | points to an address buffer
  [in,out] | *len | points to an address length buffer

Returns
  status code
  - 0 success
  - 1 get rx pipe 1 address failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len is too short

Note
  none

Definition at line 2103 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_rx_pipe_2_address()

uint8_t nrf24l01_get_rx_pipe_2_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | addr
| ) |  |

get the rx pipe 2 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *addr | points to an rx pipe 2 address buffer

Returns
  status code
  - 0 success
  - 1 get rx pipe 2 address failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2211 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_rx_pipe_3_address()

uint8_t nrf24l01_get_rx_pipe_3_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | addr
| ) |  |

get the rx pipe 3 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *addr | points to an rx pipe 3 address buffer

Returns
  status code
  - 0 success
  - 1 get rx pipe 3 address failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2281 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_rx_pipe_4_address()

uint8_t nrf24l01_get_rx_pipe_4_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | addr
| ) |  |

get the rx pipe 4 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *addr | points to an rx pipe 4 address buffer

Returns
  status code
  - 0 success
  - 1 get rx pipe 4 address failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2351 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_rx_pipe_5_address()

uint8_t nrf24l01_get_rx_pipe_5_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | addr
| ) |  |

get the rx pipe 5 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *addr | points to an rx pipe 5 address buffer

Returns
  status code
  - 0 success
  - 1 get rx pipe 5 address failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2421 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_tx_address()

uint8_t nrf24l01_get_tx_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | addr,
|  | uint8_t * | len
| ) |  |

get the tx address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | *addr | points to an address buffer
  [in,out] | *len | points to an address length buffer

Returns
  status code
  - 0 success
  - 1 get tx address failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len is too short

Note
  none

Definition at line 2534 of file driver_nrf24l01.c.

## ◆ nrf24l01_get_tx_payload_with_no_ack()

uint8_t nrf24l01_get_tx_payload_with_no_ack | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t * | enable
| ) |  |

get the tx payload with no ack status

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get tx payload with no ack failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3403 of file driver_nrf24l01.c.

## ◆ nrf24l01_info()

uint8_t nrf24l01_info | ( | nrf24l01_info_t * | info | ) |

get chip's information

Parameters

  [out] | *info | points to an nrf24l01 info structure

Returns
  status code
  - 0 success
  - 2 handle is NULL

Note
  none

Definition at line 3892 of file driver_nrf24l01.c.

## ◆ nrf24l01_init()

uint8_t nrf24l01_init | ( | nrf24l01_handle_t * | handle | ) |

initialize the chip

Parameters

  [in] | *handle | points to an nrf24l01 handle structure

Returns
  status code
  - 0 success
  - 1 spi initialization failed
  - 2 handle is NULL
  - 3 linked functions is NULL
  - 4 gpio init failed

Note
  none

Definition at line 153 of file driver_nrf24l01.c.

## ◆ nrf24l01_irq_handler()

uint8_t nrf24l01_irq_handler | ( | nrf24l01_handle_t * | handle | ) |

irq handler

Parameters

  [in] | *handle | points to an nrf24l01 handle structure

Returns
  status code
  - 0 success
  - 1 run failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 436 of file driver_nrf24l01.c.

## ◆ nrf24l01_nop()

uint8_t nrf24l01_nop | ( | nrf24l01_handle_t * | handle | ) |

nop

Parameters

  [in] | *handle | points to an nrf24l01 handle structure

Returns
  status code
  - 0 success
  - 1 nop failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3806 of file driver_nrf24l01.c.

## ◆ nrf24l01_read_rx_payload()

uint8_t nrf24l01_read_rx_payload | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | buf,
|  | uint8_t | len
| ) |  |

read the rx payload

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [out] | *buf | points to a data buffer
  [in] | len | is the buffer length

Returns
  status code
  - 0 success
  - 1 read rx payload failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len is over 32

Note
  none

Definition at line 3442 of file driver_nrf24l01.c.

## ◆ nrf24l01_reuse_tx_payload()

uint8_t nrf24l01_reuse_tx_payload | ( | nrf24l01_handle_t * | handle | ) |

reuse the tx payload

Parameters

  [in] | *handle | points to an nrf24l01 handle structure

Returns
  status code
  - 0 success
  - 1 reuse tx payload failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3618 of file driver_nrf24l01.c.

## ◆ nrf24l01_send()

uint8_t nrf24l01_send | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | buf,
|  | uint8_t | len
| ) |  |

send data

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | *buf | points to a data buffer
  [in] | len | is the buffer length

Returns
  status code
  - 0 success
  - 1 send failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len is over 32
  - 5 send timeout

Note
  none

Definition at line 350 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_active()

uint8_t nrf24l01_set_active | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t | enable
| ) |  |

enable or disable the chip

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 set active failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 315 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_address_width()

uint8_t nrf24l01_set_address_width | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_address_width_t | width
| ) |  |

set the address width

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | width | is the address width

Returns
  status code
  - 0 success
  - 1 set address width failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 910 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_auto_acknowledgment()

uint8_t nrf24l01_set_auto_acknowledgment | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_pipe_t | pipe,
|  | nrf24l01_bool_t | enable
| ) |  |

enable or disable auto acknowledgment

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | pipe | is the rf pipe
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 set auto acknowledgment failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 743 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_auto_retransmit_count()

uint8_t nrf24l01_set_auto_retransmit_count | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | count
| ) |  |

set the auto retransmit count

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | count | is the auto retransmit count

Returns
  status code
  - 0 success
  - 1 set auto retransmit count failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 count is over 0xF

Note
  count <= 0xF

Definition at line 1136 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_auto_retransmit_delay()

uint8_t nrf24l01_set_auto_retransmit_delay | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | delay
| ) |  |

set the auto retransmit delay

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | delay | is the auto retransmit delay

Returns
  status code
  - 0 success
  - 1 set auto retransmit delay failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 delay is over 0xF

Note
  delay <= 0xF

Definition at line 993 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_channel_frequency()

uint8_t nrf24l01_set_channel_frequency | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | freq
| ) |  |

set the channel frequency

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | freq | is the channel freq

Returns
  status code
  - 0 success
  - 1 set channel frequency failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 freq is over 0x7F

Note
  freq <= 0x7F

Definition at line 1225 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_config()

uint8_t nrf24l01_set_config | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_config_t | config,
|  | nrf24l01_bool_t | enable
| ) |  |

enable or disable configure

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | config | is the config type
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 set config failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 577 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_continuous_carrier_transmit()

uint8_t nrf24l01_set_continuous_carrier_transmit | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t | enable
| ) |  |

enable or disable continuous carrier transmit

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 set continuous carrier transmit failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1313 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_data_rate()

uint8_t nrf24l01_set_data_rate | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_data_rate_t | rate
| ) |  |

set the data rate

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | rate | is the data rate

Returns
  status code
  - 0 success
  - 1 set data rate failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1477 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_dynamic_payload()

uint8_t nrf24l01_set_dynamic_payload | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t | enable
| ) |  |

enable or disable the dynamic payload

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 set dynamic payload failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3194 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_force_pll_lock_signal()

uint8_t nrf24l01_set_force_pll_lock_signal | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t | enable
| ) |  |

enable or disable force pll lock signal

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 set force pll lock signal failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1395 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_mode()

uint8_t nrf24l01_set_mode | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_mode_t | mode
| ) |  |

set the chip mode

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | mode | is the chip mode

Returns
  status code
  - 0 success
  - 1 set mode failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 660 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_output_power()

uint8_t nrf24l01_set_output_power | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_output_power_t | power
| ) |  |

set the output power

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | power | is the output power

Returns
  status code
  - 0 success
  - 1 set output power failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1561 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_payload_with_ack()

uint8_t nrf24l01_set_payload_with_ack | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t | enable
| ) |  |

enable or disable the payload with ack

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 set payload with ack failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3276 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_pipe_0_payload_number()

uint8_t nrf24l01_set_pipe_0_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | num
| ) |  |

set the pipe 0 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | num | is the payload number

Returns
  status code
  - 0 success
  - 1 set pipe 0 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 num is over 0x3F

Note
  none

Definition at line 2608 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_pipe_1_payload_number()

uint8_t nrf24l01_set_pipe_1_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | num
| ) |  |

set the pipe 1 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | num | is the payload number

Returns
  status code
  - 0 success
  - 1 set pipe 1 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 num is over 0x3F

Note
  none

Definition at line 2686 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_pipe_2_payload_number()

uint8_t nrf24l01_set_pipe_2_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | num
| ) |  |

set the pipe 2 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | num | is the payload number

Returns
  status code
  - 0 success
  - 1 set pipe 2 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 num is over 0x3F

Note
  none

Definition at line 2764 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_pipe_3_payload_number()

uint8_t nrf24l01_set_pipe_3_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | num
| ) |  |

set the pipe 3 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | num | is the payload number

Returns
  status code
  - 0 success
  - 1 set pipe 3 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 num is over 0x3F

Note
  none

Definition at line 2842 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_pipe_4_payload_number()

uint8_t nrf24l01_set_pipe_4_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | num
| ) |  |

set the pipe 4 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | num | is the payload number

Returns
  status code
  - 0 success
  - 1 set pipe 4 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 num is over 0x3F

Note
  none

Definition at line 2920 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_pipe_5_payload_number()

uint8_t nrf24l01_set_pipe_5_payload_number | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | num
| ) |  |

set the pipe 5 payload number

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | num | is the payload number

Returns
  status code
  - 0 success
  - 1 set pipe 5 payload number failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 num is over 0x3F

Note
  none

Definition at line 2998 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_pipe_dynamic_payload()

uint8_t nrf24l01_set_pipe_dynamic_payload | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_pipe_t | pipe,
|  | nrf24l01_bool_t | enable
| ) |  |

enable or disable the pipe dynamic payload

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | pipe | is the pipe number
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 set pipe dynamic payload failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3111 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_rx_pipe()

uint8_t nrf24l01_set_rx_pipe | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_pipe_t | pipe,
|  | nrf24l01_bool_t | enable
| ) |  |

enable or disable rx pipe

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | pipe | is the rf pipe
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 set rx pipe failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 827 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_rx_pipe_0_address()

uint8_t nrf24l01_set_rx_pipe_0_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | addr,
|  | uint8_t | len
| ) |  |

set the rx pipe 0 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | *addr | points to an address buffer
  [in] | len | is the address length

Returns
  status code
  - 0 success
  - 1 set rx pipe 0 address failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len is too long

Note
  none

Definition at line 1876 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_rx_pipe_1_address()

uint8_t nrf24l01_set_rx_pipe_1_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | addr,
|  | uint8_t | len
| ) |  |

set the rx pipe 1 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | *addr | points to an address buffer
  [in] | len | is the address length

Returns
  status code
  - 0 success
  - 1 set rx pipe 1 address failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len is too long

Note
  none

Definition at line 2027 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_rx_pipe_2_address()

uint8_t nrf24l01_set_rx_pipe_2_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | addr
| ) |  |

set the rx pipe 2 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | addr | is the rx pipe 2 address

Returns
  status code
  - 0 success
  - 1 set rx pipe 2 address failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2176 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_rx_pipe_3_address()

uint8_t nrf24l01_set_rx_pipe_3_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | addr
| ) |  |

set the rx pipe 3 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | addr | is the rx pipe 3 address

Returns
  status code
  - 0 success
  - 1 set rx pipe 3 address failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2246 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_rx_pipe_4_address()

uint8_t nrf24l01_set_rx_pipe_4_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | addr
| ) |  |

set the rx pipe 4 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | addr | is the rx pipe 4 address

Returns
  status code
  - 0 success
  - 1 set rx pipe 4 address failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2316 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_rx_pipe_5_address()

uint8_t nrf24l01_set_rx_pipe_5_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t | addr
| ) |  |

set the rx pipe 5 address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | addr | is the rx pipe 5 address

Returns
  status code
  - 0 success
  - 1 set rx pipe 5 address failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2386 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_tx_address()

uint8_t nrf24l01_set_tx_address | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | addr,
|  | uint8_t | len
| ) |  |

set the tx address

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | *addr | points to an address buffer
  [in] | len | is the address length

Returns
  status code
  - 0 success
  - 1 set tx address failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len is too long

Note
  none

Definition at line 2458 of file driver_nrf24l01.c.

## ◆ nrf24l01_set_tx_payload_with_no_ack()

uint8_t nrf24l01_set_tx_payload_with_no_ack | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_bool_t | enable
| ) |  |

enable or disable the tx payload with no ack

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 set tx payload with no ack failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 3358 of file driver_nrf24l01.c.

## ◆ nrf24l01_write_payload_with_ack()

uint8_t nrf24l01_write_payload_with_ack | ( | nrf24l01_handle_t * | handle,
|  | nrf24l01_pipe_t | pipe,
|  | uint8_t * | buf,
|  | uint8_t | len
| ) |  |

write the payload with ack

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | pipe | is the pipe number
  [in] | *buf | points to a data buffer
  [in] | len | is the buffer length

Returns
  status code
  - 0 success
  - 1 write payload with ack failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len is over 32

Note
  used in rx mode

Definition at line 3691 of file driver_nrf24l01.c.

## ◆ nrf24l01_write_payload_with_no_ack()

uint8_t nrf24l01_write_payload_with_no_ack | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | buf,
|  | uint8_t | len
| ) |  |

write the payload with no ack

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | *buf | points to a data buffer
  [in] | len | is the buffer length

Returns
  status code
  - 0 success
  - 1 write payload with no ack failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len is over 32

Note
  none

Definition at line 3750 of file driver_nrf24l01.c.

## ◆ nrf24l01_write_tx_payload()

uint8_t nrf24l01_write_tx_payload | ( | nrf24l01_handle_t * | handle,
|  | uint8_t * | buf,
|  | uint8_t | len
| ) |  |

write the tx payload

Parameters

  [in] | *handle | points to an nrf24l01 handle structure
  [in] | *buf | points to a data buffer
  [in] | len | is the buffer length

Returns
  status code
  - 0 success
  - 1 write tx payload failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len is over 32

Note
  none

Definition at line 3495 of file driver_nrf24l01.c.