Functions | |
uint32_t | sd_mutex_new (nrf_mutex_t *p_mutex) |
Initialize a mutex. More... | |
uint32_t | sd_mutex_acquire (nrf_mutex_t *p_mutex) |
Attempt to acquire a mutex. More... | |
uint32_t | sd_mutex_release (nrf_mutex_t *p_mutex) |
Release a mutex. More... | |
uint32_t | sd_rand_application_pool_capacity_get (uint8_t *p_pool_capacity) |
Query the capacity of the application random pool. More... | |
uint32_t | sd_rand_application_bytes_available_get (uint8_t *p_bytes_available) |
Get number of random bytes available to the application. More... | |
uint32_t | sd_rand_application_vector_get (uint8_t *p_buff, uint8_t length) |
Get random bytes from the application pool. More... | |
uint32_t | sd_power_reset_reason_get (uint32_t *p_reset_reason) |
Gets the reset reason register. More... | |
uint32_t | sd_power_reset_reason_clr (uint32_t reset_reason_clr_msk) |
Clears the bits of the reset reason register. More... | |
uint32_t | sd_power_mode_set (uint8_t power_mode) |
Sets the power mode when in CPU sleep. More... | |
uint32_t | sd_power_system_off (void) |
Puts the chip in System OFF mode. More... | |
uint32_t | sd_power_pof_enable (uint8_t pof_enable) |
Enables or disables the power-fail comparator. More... | |
uint32_t | sd_power_usbpwrrdy_enable (uint8_t usbpwrrdy_enable) |
Enables or disables the USB power ready event. More... | |
uint32_t | sd_power_usbdetected_enable (uint8_t usbdetected_enable) |
Enables or disables the power USB-detected event. More... | |
uint32_t | sd_power_usbremoved_enable (uint8_t usbremoved_enable) |
Enables or disables the power USB-removed event. More... | |
uint32_t | sd_power_usbregstatus_get (uint32_t *usbregstatus) |
Get USB supply status register content. More... | |
uint32_t | sd_power_pof_threshold_set (uint8_t threshold) |
Sets the power failure comparator threshold value. More... | |
uint32_t | sd_power_pof_thresholdvddh_set (uint8_t threshold) |
Sets the power failure comparator threshold value for high voltage. More... | |
uint32_t | sd_power_ram_power_set (uint8_t index, uint32_t ram_powerset) |
Writes the NRF_POWER->RAM[index].POWERSET register. More... | |
uint32_t | sd_power_ram_power_clr (uint8_t index, uint32_t ram_powerclr) |
Writes the NRF_POWER->RAM[index].POWERCLR register. More... | |
uint32_t | sd_power_ram_power_get (uint8_t index, uint32_t *p_ram_power) |
Get contents of NRF_POWER->RAM[index].POWER register, indicates power status of RAM[index] blocks. More... | |
uint32_t | sd_power_gpregret_set (uint32_t gpregret_id, uint32_t gpregret_msk) |
Set bits in the general purpose retention registers (NRF_POWER->GPREGRET*). More... | |
uint32_t | sd_power_gpregret_clr (uint32_t gpregret_id, uint32_t gpregret_msk) |
Clear bits in the general purpose retention registers (NRF_POWER->GPREGRET*). More... | |
uint32_t | sd_power_gpregret_get (uint32_t gpregret_id, uint32_t *p_gpregret) |
Get contents of the general purpose retention registers (NRF_POWER->GPREGRET*). More... | |
uint32_t | sd_power_dcdc_mode_set (uint8_t dcdc_mode) |
Enable or disable the DC/DC regulator for the regulator stage 1 (REG1). More... | |
uint32_t | sd_power_dcdc0_mode_set (uint8_t dcdc_mode) |
Enable or disable the DC/DC regulator for the regulator stage 0 (REG0). More... | |
uint32_t | sd_clock_hfclk_request (void) |
Request the high frequency crystal oscillator. More... | |
uint32_t | sd_clock_hfclk_release (void) |
Releases the high frequency crystal oscillator. More... | |
uint32_t | sd_clock_hfclk_is_running (uint32_t *p_is_running) |
Checks if the high frequency crystal oscillator is running. More... | |
uint32_t | sd_app_evt_wait (void) |
Waits for an application event. More... | |
uint32_t | sd_ppi_channel_enable_get (uint32_t *p_channel_enable) |
Get PPI channel enable register contents. More... | |
uint32_t | sd_ppi_channel_enable_set (uint32_t channel_enable_set_msk) |
Set PPI channel enable register. More... | |
uint32_t | sd_ppi_channel_enable_clr (uint32_t channel_enable_clr_msk) |
Clear PPI channel enable register. More... | |
uint32_t | sd_ppi_channel_assign (uint8_t channel_num, const volatile void *evt_endpoint, const volatile void *task_endpoint) |
Assign endpoints to a PPI channel. More... | |
uint32_t | sd_ppi_group_task_enable (uint8_t group_num) |
Task to enable a channel group. More... | |
uint32_t | sd_ppi_group_task_disable (uint8_t group_num) |
Task to disable a channel group. More... | |
uint32_t | sd_ppi_group_assign (uint8_t group_num, uint32_t channel_msk) |
Assign PPI channels to a channel group. More... | |
uint32_t | sd_ppi_group_get (uint8_t group_num, uint32_t *p_channel_msk) |
Gets the PPI channels of a channel group. More... | |
uint32_t | sd_radio_notification_cfg_set (uint8_t type, uint8_t distance) |
Configures the Radio Notification signal. More... | |
uint32_t | sd_ecb_block_encrypt (nrf_ecb_hal_data_t *p_ecb_data) |
Encrypts a block according to the specified parameters. More... | |
uint32_t | sd_ecb_blocks_encrypt (uint8_t block_count, nrf_ecb_hal_data_block_t *p_data_blocks) |
Encrypts multiple data blocks provided as an array of data block structures. More... | |
uint32_t | sd_evt_get (uint32_t *p_evt_id) |
Gets any pending events generated by the SoC API. More... | |
uint32_t | sd_temp_get (int32_t *p_temp) |
Get the temperature measured on the chip. More... | |
uint32_t | sd_flash_write (uint32_t *p_dst, uint32_t const *p_src, uint32_t size) |
Flash Write. More... | |
uint32_t | sd_flash_page_erase (uint32_t page_number) |
Flash Erase page. More... | |
uint32_t | sd_radio_session_open (nrf_radio_signal_callback_t p_radio_signal_callback) |
Opens a session for radio timeslot requests. More... | |
uint32_t | sd_radio_session_close (void) |
Closes a session for radio timeslot requests. More... | |
uint32_t | sd_radio_request (nrf_radio_request_t const *p_request) |
Requests a radio timeslot. More... | |
uint32_t | sd_protected_register_write (volatile uint32_t *p_register, uint32_t value) |
Write register protected by the SoftDevice. More... | |
uint32_t sd_app_evt_wait | ( | void | ) |
Waits for an application event.
An application event is either an application interrupt or a pended interrupt when the interrupt is disabled.
When the application waits for an application event by calling this function, an interrupt that is enabled will be taken immediately on pending since this function will wait in thread mode, then the execution will return in the application's main thread.
In order to wake up from disabled interrupts, the SEVONPEND flag has to be set in the Cortex-M MCU's System Control Register (SCR), CMSIS_SCB. In that case, when a disabled interrupt gets pended, this function will return to the application's main thread.
NRF_SUCCESS |
uint32_t sd_clock_hfclk_is_running | ( | uint32_t * | p_is_running | ) |
Checks if the high frequency crystal oscillator is running.
[out] | p_is_running | 1 if the external crystal oscillator is running, 0 if not. |
NRF_SUCCESS |
uint32_t sd_clock_hfclk_release | ( | void | ) |
Releases the high frequency crystal oscillator.
Will stop the high frequency crystal oscillator, this happens immediately.
NRF_SUCCESS |
uint32_t sd_clock_hfclk_request | ( | void | ) |
Request the high frequency crystal oscillator.
Will start the high frequency crystal oscillator, the startup time of the crystal varies and the sd_clock_hfclk_is_running function can be polled to check if it has started.
NRF_SUCCESS |
uint32_t sd_ecb_block_encrypt | ( | nrf_ecb_hal_data_t * | p_ecb_data | ) |
Encrypts a block according to the specified parameters.
128-bit AES encryption.
[in,out] | p_ecb_data | Pointer to the ECB parameters' struct (two input parameters and one output parameter). |
NRF_SUCCESS |
uint32_t sd_ecb_blocks_encrypt | ( | uint8_t | block_count, |
nrf_ecb_hal_data_block_t * | p_data_blocks | ||
) |
Encrypts multiple data blocks provided as an array of data block structures.
: Performs 128-bit AES encryption on multiple data blocks
[in] | block_count | Count of blocks in the p_data_blocks array. |
[in,out] | p_data_blocks | Pointer to the first entry in a contiguous array of nrf_ecb_hal_data_block_t structures. |
NRF_SUCCESS |
uint32_t sd_evt_get | ( | uint32_t * | p_evt_id | ) |
Gets any pending events generated by the SoC API.
The application should keep calling this function to get events, until NRF_ERROR_NOT_FOUND is returned.
[out] | p_evt_id | Set to one of the values in NRF_SOC_EVTS, if any events are pending. |
NRF_SUCCESS | An event was pending. The event id is written in the p_evt_id parameter. |
NRF_ERROR_NOT_FOUND | No pending events. |
uint32_t sd_flash_page_erase | ( | uint32_t | page_number | ) |
Flash Erase page.
Commands to erase a flash page If the SoftDevice is enabled: This call initiates the flash access command, and its completion will be communicated to the application with exactly one of the following events:
If the SoftDevice is not enabled no event will be generated, and this call will return NRF_SUCCESS when the erase has been completed
[in] | page_number | Page number of the page to erase |
NRF_ERROR_INTERNAL | If a new session could not be opened due to an internal error. |
NRF_ERROR_INVALID_ADDR | Tried to erase to a non existing flash page. |
NRF_ERROR_BUSY | The previous command has not yet completed. |
NRF_ERROR_FORBIDDEN | Tried to erase a page outside the application flash area. |
NRF_SUCCESS | The command was accepted. |
uint32_t sd_flash_write | ( | uint32_t * | p_dst, |
uint32_t const * | p_src, | ||
uint32_t | size | ||
) |
Flash Write.
Commands to write a buffer to flash
If the SoftDevice is enabled: This call initiates the flash access command, and its completion will be communicated to the application with exactly one of the following events:
If the SoftDevice is not enabled no event will be generated, and this call will return NRF_SUCCESS when the write has been completed
[in] | p_dst | Pointer to start of flash location to be written. |
[in] | p_src | Pointer to buffer with data to be written. |
[in] | size | Number of 32-bit words to write. Maximum size is the number of words in one flash page. See the device's Product Specification for details. |
NRF_ERROR_INVALID_ADDR | Tried to write to a non existing flash address, or p_dst or p_src was unaligned. |
NRF_ERROR_BUSY | The previous command has not yet completed. |
NRF_ERROR_INVALID_LENGTH | Size was 0, or higher than the maximum allowed size. |
NRF_ERROR_FORBIDDEN | Tried to write to an address outside the application flash area. |
NRF_SUCCESS | The command was accepted. |
uint32_t sd_mutex_acquire | ( | nrf_mutex_t * | p_mutex | ) |
Attempt to acquire a mutex.
[in] | p_mutex | Pointer to the mutex to acquire. |
NRF_SUCCESS | The mutex was successfully acquired. |
NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN | The mutex could not be acquired. |
uint32_t sd_mutex_new | ( | nrf_mutex_t * | p_mutex | ) |
Initialize a mutex.
[in] | p_mutex | Pointer to the mutex to initialize. |
NRF_SUCCESS |
uint32_t sd_mutex_release | ( | nrf_mutex_t * | p_mutex | ) |
uint32_t sd_power_dcdc0_mode_set | ( | uint8_t | dcdc_mode | ) |
Enable or disable the DC/DC regulator for the regulator stage 0 (REG0).
For more details on the REG0 stage, please see product specification.
[in] | dcdc_mode | The mode of the DCDC0, see NRF_POWER_DCDC_MODES. |
NRF_SUCCESS | |
NRF_ERROR_INVALID_PARAM | The dcdc_mode is invalid. |
uint32_t sd_power_dcdc_mode_set | ( | uint8_t | dcdc_mode | ) |
Enable or disable the DC/DC regulator for the regulator stage 1 (REG1).
[in] | dcdc_mode | The mode of the DCDC, see NRF_POWER_DCDC_MODES. |
NRF_SUCCESS | |
NRF_ERROR_INVALID_PARAM | The DCDC mode is invalid. |
uint32_t sd_power_gpregret_clr | ( | uint32_t | gpregret_id, |
uint32_t | gpregret_msk | ||
) |
Clear bits in the general purpose retention registers (NRF_POWER->GPREGRET*).
[in] | gpregret_id | 0 for GPREGRET, 1 for GPREGRET2. |
[in] | gpregret_msk | Bits to be clear in the GPREGRET register. |
NRF_SUCCESS |
uint32_t sd_power_gpregret_get | ( | uint32_t | gpregret_id, |
uint32_t * | p_gpregret | ||
) |
Get contents of the general purpose retention registers (NRF_POWER->GPREGRET*).
[in] | gpregret_id | 0 for GPREGRET, 1 for GPREGRET2. |
[out] | p_gpregret | Contents of the GPREGRET register. |
NRF_SUCCESS |
uint32_t sd_power_gpregret_set | ( | uint32_t | gpregret_id, |
uint32_t | gpregret_msk | ||
) |
Set bits in the general purpose retention registers (NRF_POWER->GPREGRET*).
[in] | gpregret_id | 0 for GPREGRET, 1 for GPREGRET2. |
[in] | gpregret_msk | Bits to be set in the GPREGRET register. |
NRF_SUCCESS |
uint32_t sd_power_mode_set | ( | uint8_t | power_mode | ) |
Sets the power mode when in CPU sleep.
[in] | power_mode | The power mode to use when in CPU sleep, see NRF_POWER_MODES. |
NRF_SUCCESS | The power mode was set. |
NRF_ERROR_SOC_POWER_MODE_UNKNOWN | The power mode was unknown. |
uint32_t sd_power_pof_enable | ( | uint8_t | pof_enable | ) |
Enables or disables the power-fail comparator.
Enabling this will give a SoftDevice event (NRF_EVT_POWER_FAILURE_WARNING) when the power failure warning occurs. The event can be retrieved with sd_evt_get();
[in] | pof_enable | True if the power-fail comparator should be enabled, false if it should be disabled. |
NRF_SUCCESS |
uint32_t sd_power_pof_threshold_set | ( | uint8_t | threshold | ) |
Sets the power failure comparator threshold value.
[in] | threshold | The power-fail threshold value to use, see NRF_POWER_THRESHOLDS. |
NRF_SUCCESS | The power failure threshold was set. |
NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN | The power failure threshold is unknown. |
uint32_t sd_power_pof_thresholdvddh_set | ( | uint8_t | threshold | ) |
Sets the power failure comparator threshold value for high voltage.
[in] | threshold | The power-fail threshold value to use, see NRF_POWER_THRESHOLDVDDHS. |
NRF_SUCCESS | The power failure threshold was set. |
NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN | The power failure threshold is unknown. |
uint32_t sd_power_ram_power_clr | ( | uint8_t | index, |
uint32_t | ram_powerclr | ||
) |
Writes the NRF_POWER->RAM[index].POWERCLR register.
[in] | index | Contains the index in the NRF_POWER->RAM[index].POWERCLR register to write to. |
[in] | ram_powerclr | Contains the word to write to the NRF_POWER->RAM[index].POWERCLR register. |
NRF_SUCCESS |
uint32_t sd_power_ram_power_get | ( | uint8_t | index, |
uint32_t * | p_ram_power | ||
) |
Get contents of NRF_POWER->RAM[index].POWER register, indicates power status of RAM[index] blocks.
[in] | index | Contains the index in the NRF_POWER->RAM[index].POWER register to read from. |
[out] | p_ram_power | Content of NRF_POWER->RAM[index].POWER register. |
NRF_SUCCESS |
uint32_t sd_power_ram_power_set | ( | uint8_t | index, |
uint32_t | ram_powerset | ||
) |
Writes the NRF_POWER->RAM[index].POWERSET register.
[in] | index | Contains the index in the NRF_POWER->RAM[index].POWERSET register to write to. |
[in] | ram_powerset | Contains the word to write to the NRF_POWER->RAM[index].POWERSET register. |
NRF_SUCCESS |
uint32_t sd_power_reset_reason_clr | ( | uint32_t | reset_reason_clr_msk | ) |
Clears the bits of the reset reason register.
[in] | reset_reason_clr_msk | Contains the bits to clear from the reset reason register. |
NRF_SUCCESS |
uint32_t sd_power_reset_reason_get | ( | uint32_t * | p_reset_reason | ) |
Gets the reset reason register.
[out] | p_reset_reason | Contents of the NRF_POWER->RESETREAS register. |
NRF_SUCCESS |
uint32_t sd_power_system_off | ( | void | ) |
Puts the chip in System OFF mode.
NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN |
uint32_t sd_power_usbdetected_enable | ( | uint8_t | usbdetected_enable | ) |
Enables or disables the power USB-detected event.
Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_DETECTED) when a voltage supply is detected on VBUS. The event can be retrieved with sd_evt_get();
[in] | usbdetected_enable | True if the power ready event should be enabled, false if it should be disabled. |
NRF_SUCCESS |
uint32_t sd_power_usbpwrrdy_enable | ( | uint8_t | usbpwrrdy_enable | ) |
Enables or disables the USB power ready event.
Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_POWER_READY) when a USB 3.3 V supply is ready. The event can be retrieved with sd_evt_get();
[in] | usbpwrrdy_enable | True if the power ready event should be enabled, false if it should be disabled. |
NRF_SUCCESS |
uint32_t sd_power_usbregstatus_get | ( | uint32_t * | usbregstatus | ) |
Get USB supply status register content.
[out] | usbregstatus | The content of USBREGSTATUS register. |
NRF_SUCCESS |
uint32_t sd_power_usbremoved_enable | ( | uint8_t | usbremoved_enable | ) |
Enables or disables the power USB-removed event.
Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_REMOVED) when a voltage supply is removed from VBUS. The event can be retrieved with sd_evt_get();
[in] | usbremoved_enable | True if the power ready event should be enabled, false if it should be disabled. |
NRF_SUCCESS |
uint32_t sd_ppi_channel_assign | ( | uint8_t | channel_num, |
const volatile void * | evt_endpoint, | ||
const volatile void * | task_endpoint | ||
) |
Assign endpoints to a PPI channel.
[in] | channel_num | Number of the PPI channel to assign. |
[in] | evt_endpoint | Event endpoint of the PPI channel. |
[in] | task_endpoint | Task endpoint of the PPI channel. |
NRF_ERROR_SOC_PPI_INVALID_CHANNEL | The channel number is invalid. |
NRF_SUCCESS |
uint32_t sd_ppi_channel_enable_clr | ( | uint32_t | channel_enable_clr_msk | ) |
Clear PPI channel enable register.
[in] | channel_enable_clr_msk | Mask containing the bits to clear in the PPI CHEN register. |
NRF_SUCCESS |
uint32_t sd_ppi_channel_enable_get | ( | uint32_t * | p_channel_enable | ) |
Get PPI channel enable register contents.
[out] | p_channel_enable | The contents of the PPI CHEN register. |
NRF_SUCCESS |
uint32_t sd_ppi_channel_enable_set | ( | uint32_t | channel_enable_set_msk | ) |
Set PPI channel enable register.
[in] | channel_enable_set_msk | Mask containing the bits to set in the PPI CHEN register. |
NRF_SUCCESS |
uint32_t sd_ppi_group_assign | ( | uint8_t | group_num, |
uint32_t | channel_msk | ||
) |
Assign PPI channels to a channel group.
[in] | group_num | Number of the channel group. |
[in] | channel_msk | Mask of the channels to assign to the group. |
NRF_ERROR_SOC_PPI_INVALID_GROUP | The group number is invalid. |
NRF_SUCCESS |
uint32_t sd_ppi_group_get | ( | uint8_t | group_num, |
uint32_t * | p_channel_msk | ||
) |
Gets the PPI channels of a channel group.
[in] | group_num | Number of the channel group. |
[out] | p_channel_msk | Mask of the channels assigned to the group. |
NRF_ERROR_SOC_PPI_INVALID_GROUP | The group number is invalid. |
NRF_SUCCESS |
uint32_t sd_ppi_group_task_disable | ( | uint8_t | group_num | ) |
Task to disable a channel group.
[in] | group_num | Number of the PPI group. |
NRF_ERROR_SOC_PPI_INVALID_GROUP | The group number is invalid. |
NRF_SUCCESS |
uint32_t sd_ppi_group_task_enable | ( | uint8_t | group_num | ) |
Task to enable a channel group.
[in] | group_num | Number of the channel group. |
NRF_ERROR_SOC_PPI_INVALID_GROUP | The group number is invalid |
NRF_SUCCESS |
uint32_t sd_protected_register_write | ( | volatile uint32_t * | p_register, |
uint32_t | value | ||
) |
Write register protected by the SoftDevice.
This function writes to a register that is write-protected by the SoftDevice. Please refer to your SoftDevice Specification for more details about which registers that are protected by SoftDevice. This function can write to the following protected peripheral:
[in] | p_register | Pointer to register to be written. |
[in] | value | Value to be written to the register. |
NRF_ERROR_INVALID_ADDR | This function can not write to the reguested register. |
NRF_SUCCESS | Value successfully written to register. |
uint32_t sd_radio_notification_cfg_set | ( | uint8_t | type, |
uint8_t | distance | ||
) |
Configures the Radio Notification signal.
[in] | type | Type of notification signal, see NRF_RADIO_NOTIFICATION_TYPES. NRF_RADIO_NOTIFICATION_TYPE_NONE shall be used to turn off radio notification. Using NRF_RADIO_NOTIFICATION_DISTANCE_NONE is recommended (but not required) to be used with NRF_RADIO_NOTIFICATION_TYPE_NONE. |
[in] | distance | Distance between the notification signal and start of radio activity, see NRF_RADIO_NOTIFICATION_DISTANCES. This parameter is ignored when NRF_RADIO_NOTIFICATION_TYPE_NONE or NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE is used. |
NRF_ERROR_INVALID_PARAM | The group number is invalid. |
NRF_ERROR_INVALID_STATE | A protocol stack or other SoftDevice is running. Stop all running activities and retry. |
NRF_SUCCESS |
uint32_t sd_radio_request | ( | nrf_radio_request_t const * | p_request | ) |
Requests a radio timeslot.
[in] | p_request | Pointer to the request parameters. |
NRF_ERROR_FORBIDDEN | Either:
|
NRF_ERROR_INVALID_ADDR | If the p_request pointer is invalid. |
NRF_ERROR_INVALID_PARAM | If the parameters of p_request are not valid. |
NRF_SUCCESS | Otherwise. |
uint32_t sd_radio_session_close | ( | void | ) |
Closes a session for radio timeslot requests.
NRF_ERROR_FORBIDDEN | If session not opened. |
NRF_ERROR_BUSY | If session is currently being closed. |
NRF_SUCCESS | Otherwise. |
uint32_t sd_radio_session_open | ( | nrf_radio_signal_callback_t | p_radio_signal_callback | ) |
Opens a session for radio timeslot requests.
[in] | p_radio_signal_callback | The signal callback. |
NRF_ERROR_INVALID_ADDR | p_radio_signal_callback is an invalid function pointer. |
NRF_ERROR_BUSY | If session cannot be opened. |
NRF_ERROR_INTERNAL | If a new session could not be opened due to an internal error. |
NRF_SUCCESS | Otherwise. |
uint32_t sd_rand_application_bytes_available_get | ( | uint8_t * | p_bytes_available | ) |
Get number of random bytes available to the application.
[out] | p_bytes_available | The number of bytes currently available in the pool. |
NRF_SUCCESS |
uint32_t sd_rand_application_pool_capacity_get | ( | uint8_t * | p_pool_capacity | ) |
Query the capacity of the application random pool.
[out] | p_pool_capacity | The capacity of the pool. |
NRF_SUCCESS |
uint32_t sd_rand_application_vector_get | ( | uint8_t * | p_buff, |
uint8_t | length | ||
) |
Get random bytes from the application pool.
[out] | p_buff | Pointer to unit8_t buffer for storing the bytes. |
[in] | length | Number of bytes to take from pool and place in p_buff. |
NRF_SUCCESS | The requested bytes were written to p_buff. |
NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES | No bytes were written to the buffer, because there were not enough bytes available. |
uint32_t sd_temp_get | ( | int32_t * | p_temp | ) |
Get the temperature measured on the chip.
This function will block until the temperature measurement is done. It takes around 50 us from call to return.
[out] | p_temp | Result of temperature measurement. Die temperature in 0.25 degrees Celsius. |
NRF_SUCCESS | A temperature measurement was done, and the temperature was written to temp |