My Project
Loading...
Searching...
No Matches
Initialization Functions

Functions for device initialization and configuration. More...

Functions

nrf24l01_device nrf24l01_get_default_config ()
 Get default device configuration.
uint8_t nrf24l01_init (nrf24l01_device *device)
 Initialize nRF24L01 device.
void nrf24l01_deinit (nrf24l01_device *device)
 Deinitialize nRF24L01 device.
uint8_t nrf24l01_init_data_pipe (nrf24l01_device *device, uint8_t pipe_number)
 Initialize specific data pipe.

Detailed Description

Functions for device initialization and configuration.

Function Documentation

◆ nrf24l01_deinit()

void nrf24l01_deinit ( nrf24l01_device * device)

Deinitialize nRF24L01 device.

Parameters
devicePointer to device configuration structure

Powers down the device and resets control pins to safe states.

◆ nrf24l01_get_default_config()

nrf24l01_device nrf24l01_get_default_config ( )

Get default device configuration.

Returns
nrf24l01_device Default configuration structure

Returns a device structure with sensible default values:

  • Power down mode
  • 5-byte address width
  • Channel 2 (2.402 GHz)
  • 1 Mbps data rate
  • 0 dBm output power
  • Auto retransmit: 250µs delay, 3 retries

◆ nrf24l01_init()

uint8_t nrf24l01_init ( nrf24l01_device * device)

Initialize nRF24L01 device.

Parameters
devicePointer to device configuration structure
Returns
0 on success, non-zero on error

Initializes the nRF24L01 module with the provided configuration. This function configures all registers according to the device structure and verifies successful communication with the module.

Note
Make sure to configure SPI handle and GPIO pins before calling this function

◆ nrf24l01_init_data_pipe()

uint8_t nrf24l01_init_data_pipe ( nrf24l01_device * device,
uint8_t pipe_number )

Initialize specific data pipe.

Parameters
devicePointer to device configuration structure
pipe_numberData pipe number (0-5)
Returns
0 on success, non-zero on error

Configures a specific data pipe according to the settings in the device structure's data_pipe array.