nRF51 SDK - S120 SoftDevice
|
Functions | |
uint32_t | sd_softdevice_enable (nrf_clock_lfclksrc_t clock_source, softdevice_assertion_handler_t assertion_handler) |
Enables the SoftDevice and by extension the protocol stack. More... | |
uint32_t | sd_softdevice_disable (void) |
Disables the SoftDevice and by extension the protocol stack. More... | |
uint32_t | sd_softdevice_is_enabled (uint8_t *p_softdevice_enabled) |
Check if the SoftDevice is enabled. More... | |
uint32_t | sd_softdevice_forward_to_application (uint32_t address) |
Start forwarding interrupts to application. More... | |
uint32_t sd_softdevice_disable | ( | void | ) |
Disables the SoftDevice and by extension the protocol stack.
Idempotent function to disable the SoftDevice.
NRF_SUCCESS |
uint32_t sd_softdevice_enable | ( | nrf_clock_lfclksrc_t | clock_source, |
softdevice_assertion_handler_t | assertion_handler | ||
) |
Enables the SoftDevice and by extension the protocol stack.
Idempotent function to enable the SoftDevice.
clock_source | Low frequency clock source and accuracy. (Note: In the case of XTAL source, the PPM accuracy of the chosen clock source must be greater than or equal to the actual characteristics of your XTAL clock). |
assertion_handler | Callback for SoftDevice assertions. |
NRF_SUCCESS | |
NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION | SoftDeviceinterrupt is already enabled, or an enabled interrupt has an illegal priority level |
NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN | Unknown low frequency clock source selected |
uint32_t sd_softdevice_forward_to_application | ( | uint32_t | address | ) |
Start forwarding interrupts to application.
This function is only intended to be called when a bootloader is enabled. This function will tell the SoftDevice to start forwarding interrupts to the address in the parameter.
To get interrupts forwarded to itself, the bootloader must first call MBR with command SD_MBR_COMMAND_INIT_SD, and then call this function with it's own start address as parameter.
To get interrupts forwarded to the application the bootloader must first call MBR with command SD_MBR_COMMAND_INIT_SD, and then call this function with the applications start address.
It is recommended that all interrupt sources are off when this is called, or you could end up having interrupts in the application being executed before main() of the application.
[in] | address | The address at which to start forwarding interrupts. |
NRF_SUCCESS |
uint32_t sd_softdevice_is_enabled | ( | uint8_t * | p_softdevice_enabled | ) |
Check if the SoftDevice is enabled.
[out] | p_softdevice_enabled | If the SoftDevice is enabled: 1 else 0. |
NRF_SUCCESS |