nRF21540 front-end Bluetooth range extender.
More...
nRF21540 front-end Bluetooth range extender.
Function choses one of two physical antenna outputs.
- Parameters
-
- Returns
- NRF based error code. NRF_ERROR_BUSY when driver performs another operation at the moment. NRF_SUCCESS on success.
Initialization of modules needed by nRF21540:
- SPI
- GPIO
- GPIOTE
- PPI
- RADIO
- NVIC
- Returns
- NRF based error code. NRF_ERROR_INTERNAL when driver is in error state, or SPI initialization has failed. Reinitialization is required. NRF_ERROR_INVALID_STATE when nRF21540's state isn't proper to perform the operation (
- See Also
- nrf21540_state_t). NRF_SUCCESS on success.
bool nrf21540_is_error |
( |
void |
| ) |
|
Checks if nRF21540 driver is in error state.
- Returns
- true if driver is in error state and should be reinitialized.
nRF21540 power down.
Disables chip functionality and enter power save mode.
- Note
- Dependently on configuration GPIO or SPI interface will be used.
- Parameters
-
[in] | user_trigger_event | event that triggers start of procedure - this event will be connected to appropriate PPI channel. NRF21540_EXECUTE_NOW value causes start procedure immediately. |
[in] | mode | NRF21540_EXEC_MODE_BLOCKING - function will wait for finishing configuration including settling times required by nRF21540 (waits till all procedure has finished). NRF21540_EXEC_MODE_NON_BLOCKING - function will start procedure and set busy flag. User code can be executed at this time and busy flag will be unset when done. |
- Returns
- NRF_ERROR_INTERNAL when driver is in error state. Reinitialization is required then. NRF_ERROR_INVALID_STATE when nRF21540's state isn't proper to perform the operation (
- See Also
- nrf21540_state_t). NRF_ERROR_BUSY when driver performs another operation at the moment. NRF_SUCCESS on success.
Function choses one of two predefined power modes in nRF21540.
Refer to nRF21540 Objective Product Specification, section: TX power control.
- Parameters
-
- Returns
- NRF based error code. NRF_ERROR_BUSY when driver performs another operation at the moment. NRF_SUCCESS on success.
Set nRF21540 to TX mode.
- Note
- Dependently on configuration GPIO or SPI interface will be used (NRF21540_USE_SPI_MANAGEMENT/NRF21540_USE_GPIO_MANAGEMENT).
- Parameters
-
[in] | user_trigger_event | event that triggers start of procedure - this event will be connected to appropriate PPI channel. NRF21540_EXECUTE_NOW value causes start procedure immediately. |
[in] | mode | NRF21540_EXEC_MODE_BLOCKING - function will wait for finishing configuration including settling times required by nRF21540 (waits till all procedure has finished). NRF21540_EXEC_MODE_NON_BLOCKING - function will start procedure and set busy flag. User code can be executed at this time and busy flag will be unset when done. |
- Returns
- NRF based error code. NRF_ERROR_INTERNAL when driver is in error state. Reinitialization is required. NRF_ERROR_INVALID_STATE when nRF21540's state isn't proper to perform the operation (
- See Also
- nrf21540_state_t). NRF_SUCCESS on success.
Set nRF21540 to TX mode.
- Note
- Dependently on configuration GPIO or SPI interface will be used.
- Parameters
-
[in] | user_trigger_event | event that triggers start of procedure - this event will be connected to appropriate PPI channel. NRF21540_EXECUTE_NOW value causes start procedure immediately. |
[in] | mode | NRF21540_EXEC_MODE_BLOCKING - function will wait for finishing configuration including settling times required by nRF21540 (waits till all procedure has finished). NRF21540_EXEC_MODE_NON_BLOCKING - function will start procedure and set busy flag. User code can be executed at this time and busy flag will be unset when done. |
- Returns
- NRF based error code. NRF_ERROR_INTERNAL when driver is in error state. Reinitialization is required. NRF_ERROR_INVALID_STATE when nRF21540's state isn't proper to perform the operation (
- See Also
- nrf21540_state_t). NRF_SUCCESS on success.