mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Tue Mar 18 12:30:07 2014 +0000
Revision:
123:8a356fb1000a
Parent:
targets/hal/TARGET_NORDIC/TARGET_NRF51822/Lib/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_API/include/nrf_soc.h@104:a6a92e2e5a92
Synchronized with git revision 3e40310534d854400e01b2e9612ef7edf44a2dc9

Full URL: https://github.com/mbedmicro/mbed/commit/3e40310534d854400e01b2e9612ef7edf44a2dc9/

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 104:a6a92e2e5a92 1 /* Copyright (c) 2011 Nordic Semiconductor. All Rights Reserved.
mbed_official 104:a6a92e2e5a92 2 *
mbed_official 104:a6a92e2e5a92 3 * The information contained herein is confidential property of Nordic Semiconductor. The use,
mbed_official 104:a6a92e2e5a92 4 * copying, transfer or disclosure of such information is prohibited except by express written
mbed_official 104:a6a92e2e5a92 5 * agreement with Nordic Semiconductor.
mbed_official 104:a6a92e2e5a92 6 *
mbed_official 104:a6a92e2e5a92 7 */
mbed_official 104:a6a92e2e5a92 8
mbed_official 104:a6a92e2e5a92 9 /**
mbed_official 104:a6a92e2e5a92 10 @defgroup nrf_soc_api SoC Library API
mbed_official 104:a6a92e2e5a92 11 @{
mbed_official 104:a6a92e2e5a92 12
mbed_official 104:a6a92e2e5a92 13 @brief APIs for the SoC library.
mbed_official 104:a6a92e2e5a92 14
mbed_official 104:a6a92e2e5a92 15 */
mbed_official 104:a6a92e2e5a92 16
mbed_official 104:a6a92e2e5a92 17 #ifndef NRF_SOC_H__
mbed_official 104:a6a92e2e5a92 18 #define NRF_SOC_H__
mbed_official 104:a6a92e2e5a92 19
mbed_official 104:a6a92e2e5a92 20 #include <stdint.h>
mbed_official 104:a6a92e2e5a92 21 #include <stdbool.h>
mbed_official 104:a6a92e2e5a92 22 #include "nrf_svc.h"
mbed_official 104:a6a92e2e5a92 23 #include "nrf51.h"
mbed_official 104:a6a92e2e5a92 24 #include "nrf51_bitfields.h"
mbed_official 104:a6a92e2e5a92 25 #include "nrf_error_soc.h"
mbed_official 104:a6a92e2e5a92 26
mbed_official 104:a6a92e2e5a92 27 /** @addtogroup NRF_SOC_DEFINES Defines
mbed_official 104:a6a92e2e5a92 28 * @{ */
mbed_official 104:a6a92e2e5a92 29
mbed_official 104:a6a92e2e5a92 30 /**@brief The number of the lowest SVC number reserved for the SoC library. */
mbed_official 104:a6a92e2e5a92 31 #define SOC_SVC_BASE 0x20
mbed_official 104:a6a92e2e5a92 32
mbed_official 104:a6a92e2e5a92 33 /**@brief Guranteed time for application to process radio inactive notification. */
mbed_official 104:a6a92e2e5a92 34 #define NRF_RADIO_NOTIFICATION_INACTIVE_GUARANTEED_TIME_US (62)
mbed_official 104:a6a92e2e5a92 35
mbed_official 104:a6a92e2e5a92 36 #define SOC_ECB_KEY_LENGTH (16) /**< ECB key length. */
mbed_official 104:a6a92e2e5a92 37 #define SOC_ECB_CLEARTEXT_LENGTH (16) /**< ECB cleartext length. */
mbed_official 104:a6a92e2e5a92 38 #define SOC_ECB_CIPHERTEXT_LENGTH (SOC_ECB_CLEARTEXT_LENGTH) /**< ECB ciphertext length. */
mbed_official 104:a6a92e2e5a92 39
mbed_official 104:a6a92e2e5a92 40 #define SD_EVT_IRQn (SWI2_IRQn) /**< SoftDevice Event IRQ number. Used for both protocol events and SoC events. */
mbed_official 104:a6a92e2e5a92 41 #define SD_EVT_IRQHandler (SWI2_IRQHandler) /**< SoftDevice Event IRQ handler. Used for both protocol events and SoC events. */
mbed_official 104:a6a92e2e5a92 42 #define RADIO_NOTIFICATION_IRQn (SWI1_IRQn) /**< The radio notification IRQ number. */
mbed_official 104:a6a92e2e5a92 43 #define RADIO_NOTIFICATION_IRQHandler (SWI1_IRQHandler) /**< The radio notification IRQ handler. */
mbed_official 104:a6a92e2e5a92 44
mbed_official 104:a6a92e2e5a92 45 /** @} */
mbed_official 104:a6a92e2e5a92 46
mbed_official 104:a6a92e2e5a92 47 /** @addtogroup NRF_SOC_TYPES Types
mbed_official 104:a6a92e2e5a92 48 * @{ */
mbed_official 104:a6a92e2e5a92 49
mbed_official 104:a6a92e2e5a92 50 /**@brief The SVC numbers used by the SVC functions in the SoC library. */
mbed_official 104:a6a92e2e5a92 51 enum NRF_SOC_SVCS
mbed_official 104:a6a92e2e5a92 52 {
mbed_official 104:a6a92e2e5a92 53 SD_MUTEX_NEW = SOC_SVC_BASE,
mbed_official 104:a6a92e2e5a92 54 SD_MUTEX_ACQUIRE,
mbed_official 104:a6a92e2e5a92 55 SD_MUTEX_RELEASE,
mbed_official 104:a6a92e2e5a92 56 SD_NVIC_ENABLEIRQ,
mbed_official 104:a6a92e2e5a92 57 SD_NVIC_DISABLEIRQ,
mbed_official 104:a6a92e2e5a92 58 SD_NVIC_GETPENDINGIRQ,
mbed_official 104:a6a92e2e5a92 59 SD_NVIC_SETPENDINGIRQ,
mbed_official 104:a6a92e2e5a92 60 SD_NVIC_CLEARPENDINGIRQ,
mbed_official 104:a6a92e2e5a92 61 SD_NVIC_SETPRIORITY,
mbed_official 104:a6a92e2e5a92 62 SD_NVIC_GETPRIORITY,
mbed_official 104:a6a92e2e5a92 63 SD_NVIC_SYSTEMRESET,
mbed_official 104:a6a92e2e5a92 64 SD_NVIC_CRITICAL_REGION_ENTER,
mbed_official 104:a6a92e2e5a92 65 SD_NVIC_CRITICAL_REGION_EXIT,
mbed_official 104:a6a92e2e5a92 66 SD_RAND_APPLICATION_POOL_CAPACITY,
mbed_official 104:a6a92e2e5a92 67 SD_RAND_APPLICATION_BYTES_AVAILABLE,
mbed_official 104:a6a92e2e5a92 68 SD_RAND_APPLICATION_GET_VECTOR,
mbed_official 104:a6a92e2e5a92 69 SD_POWER_MODE_SET,
mbed_official 104:a6a92e2e5a92 70 SD_POWER_SYSTEM_OFF,
mbed_official 104:a6a92e2e5a92 71 SD_POWER_RESET_REASON_GET,
mbed_official 104:a6a92e2e5a92 72 SD_POWER_RESET_REASON_CLR,
mbed_official 104:a6a92e2e5a92 73 SD_POWER_POF_ENABLE,
mbed_official 104:a6a92e2e5a92 74 SD_POWER_POF_THRESHOLD_SET,
mbed_official 104:a6a92e2e5a92 75 SD_POWER_RAMON_SET,
mbed_official 104:a6a92e2e5a92 76 SD_POWER_RAMON_CLR,
mbed_official 104:a6a92e2e5a92 77 SD_POWER_RAMON_GET,
mbed_official 104:a6a92e2e5a92 78 SD_POWER_GPREGRET_SET,
mbed_official 104:a6a92e2e5a92 79 SD_POWER_GPREGRET_CLR,
mbed_official 104:a6a92e2e5a92 80 SD_POWER_GPREGRET_GET,
mbed_official 104:a6a92e2e5a92 81 SD_POWER_DCDC_MODE_SET,
mbed_official 104:a6a92e2e5a92 82 SD_APP_EVT_WAIT,
mbed_official 104:a6a92e2e5a92 83 SD_CLOCK_HFCLK_REQUEST,
mbed_official 104:a6a92e2e5a92 84 SD_CLOCK_HFCLK_RELEASE,
mbed_official 104:a6a92e2e5a92 85 SD_CLOCK_HFCLK_IS_RUNNING,
mbed_official 104:a6a92e2e5a92 86 SD_PPI_CHANNEL_ENABLE_GET,
mbed_official 104:a6a92e2e5a92 87 SD_PPI_CHANNEL_ENABLE_SET,
mbed_official 104:a6a92e2e5a92 88 SD_PPI_CHANNEL_ENABLE_CLR,
mbed_official 104:a6a92e2e5a92 89 SD_PPI_CHANNEL_ASSIGN,
mbed_official 104:a6a92e2e5a92 90 SD_PPI_GROUP_TASK_ENABLE,
mbed_official 104:a6a92e2e5a92 91 SD_PPI_GROUP_TASK_DISABLE,
mbed_official 104:a6a92e2e5a92 92 SD_PPI_GROUP_ASSIGN,
mbed_official 104:a6a92e2e5a92 93 SD_PPI_GROUP_GET,
mbed_official 104:a6a92e2e5a92 94 SD_RADIO_NOTIFICATION_CFG_SET,
mbed_official 104:a6a92e2e5a92 95 SD_ECB_BLOCK_ENCRYPT,
mbed_official 104:a6a92e2e5a92 96 SD_RESERVED1,
mbed_official 104:a6a92e2e5a92 97 SD_RESERVED2,
mbed_official 104:a6a92e2e5a92 98 SD_RESERVED3,
mbed_official 104:a6a92e2e5a92 99 SD_EVT_GET,
mbed_official 104:a6a92e2e5a92 100 SD_TEMP_GET,
mbed_official 104:a6a92e2e5a92 101 SD_FLASH_ERASE_PAGE,
mbed_official 104:a6a92e2e5a92 102 SD_FLASH_WRITE,
mbed_official 104:a6a92e2e5a92 103 SD_FLASH_PROTECT,
mbed_official 104:a6a92e2e5a92 104 SVC_SOC_LAST
mbed_official 104:a6a92e2e5a92 105 };
mbed_official 104:a6a92e2e5a92 106
mbed_official 104:a6a92e2e5a92 107 /**@brief Possible values of a ::nrf_mutex_t. */
mbed_official 104:a6a92e2e5a92 108 enum NRF_MUTEX_VALUES
mbed_official 104:a6a92e2e5a92 109 {
mbed_official 104:a6a92e2e5a92 110 NRF_MUTEX_FREE,
mbed_official 104:a6a92e2e5a92 111 NRF_MUTEX_TAKEN
mbed_official 104:a6a92e2e5a92 112 };
mbed_official 104:a6a92e2e5a92 113
mbed_official 104:a6a92e2e5a92 114 /**@brief Possible values of ::nrf_app_irq_priority_t. */
mbed_official 104:a6a92e2e5a92 115 enum NRF_APP_PRIORITIES
mbed_official 104:a6a92e2e5a92 116 {
mbed_official 104:a6a92e2e5a92 117 NRF_APP_PRIORITY_HIGH = 1,
mbed_official 104:a6a92e2e5a92 118 NRF_APP_PRIORITY_LOW = 3
mbed_official 104:a6a92e2e5a92 119 };
mbed_official 104:a6a92e2e5a92 120
mbed_official 104:a6a92e2e5a92 121 /**@brief Possible values of ::nrf_power_mode_t. */
mbed_official 104:a6a92e2e5a92 122 enum NRF_POWER_MODES
mbed_official 104:a6a92e2e5a92 123 {
mbed_official 104:a6a92e2e5a92 124 NRF_POWER_MODE_CONSTLAT, /**< Constant latency mode. See power management in the reference manual. */
mbed_official 104:a6a92e2e5a92 125 NRF_POWER_MODE_LOWPWR /**< Low power mode. See power management in the reference manual. */
mbed_official 104:a6a92e2e5a92 126 };
mbed_official 104:a6a92e2e5a92 127
mbed_official 104:a6a92e2e5a92 128
mbed_official 104:a6a92e2e5a92 129 /**@brief Possible values of ::nrf_power_failure_threshold_t */
mbed_official 104:a6a92e2e5a92 130 enum NRF_POWER_THRESHOLDS
mbed_official 104:a6a92e2e5a92 131 {
mbed_official 104:a6a92e2e5a92 132 NRF_POWER_THRESHOLD_V21, /**< 2.1 Volts power failure threshold. */
mbed_official 104:a6a92e2e5a92 133 NRF_POWER_THRESHOLD_V23, /**< 2.3 Volts power failure threshold. */
mbed_official 104:a6a92e2e5a92 134 NRF_POWER_THRESHOLD_V25, /**< 2.5 Volts power failure threshold. */
mbed_official 104:a6a92e2e5a92 135 NRF_POWER_THRESHOLD_V27 /**< 2.7 Volts power failure threshold. */
mbed_official 104:a6a92e2e5a92 136 };
mbed_official 104:a6a92e2e5a92 137
mbed_official 104:a6a92e2e5a92 138
mbed_official 104:a6a92e2e5a92 139 /**@brief Possible values of ::nrf_power_dcdc_mode_t. */
mbed_official 104:a6a92e2e5a92 140 enum NRF_POWER_DCDC_MODES
mbed_official 104:a6a92e2e5a92 141 {
mbed_official 104:a6a92e2e5a92 142 NRF_POWER_DCDC_MODE_OFF, /**< The DCDC is always off. */
mbed_official 104:a6a92e2e5a92 143 NRF_POWER_DCDC_MODE_ON, /**< The DCDC is always on. */
mbed_official 104:a6a92e2e5a92 144 NRF_POWER_DCDC_MODE_AUTOMATIC /**< The DCDC is automatically managed. */
mbed_official 104:a6a92e2e5a92 145 };
mbed_official 104:a6a92e2e5a92 146
mbed_official 104:a6a92e2e5a92 147 /**@brief Possible values of ::nrf_radio_notification_distance_t. */
mbed_official 104:a6a92e2e5a92 148 enum NRF_RADIO_NOTIFICATION_DISTANCES
mbed_official 104:a6a92e2e5a92 149 {
mbed_official 104:a6a92e2e5a92 150 NRF_RADIO_NOTIFICATION_DISTANCE_NONE = 0, /**< The event does not have a notification. */
mbed_official 104:a6a92e2e5a92 151 NRF_RADIO_NOTIFICATION_DISTANCE_800US, /**< The distance from the active notification to start of radio activity. */
mbed_official 104:a6a92e2e5a92 152 NRF_RADIO_NOTIFICATION_DISTANCE_1740US, /**< The distance from the active notification to start of radio activity. */
mbed_official 104:a6a92e2e5a92 153 NRF_RADIO_NOTIFICATION_DISTANCE_2680US, /**< The distance from the active notification to start of radio activity. */
mbed_official 104:a6a92e2e5a92 154 NRF_RADIO_NOTIFICATION_DISTANCE_3620US, /**< The distance from the active notification to start of radio activity. */
mbed_official 104:a6a92e2e5a92 155 NRF_RADIO_NOTIFICATION_DISTANCE_4560US, /**< The distance from the active notification to start of radio activity. */
mbed_official 104:a6a92e2e5a92 156 NRF_RADIO_NOTIFICATION_DISTANCE_5500US /**< The distance from the active notification to start of radio activity. */
mbed_official 104:a6a92e2e5a92 157 };
mbed_official 104:a6a92e2e5a92 158
mbed_official 104:a6a92e2e5a92 159
mbed_official 104:a6a92e2e5a92 160 /**@brief Possible values of ::nrf_radio_notification_type_t. */
mbed_official 104:a6a92e2e5a92 161 enum NRF_RADIO_NOTIFICATION_TYPES
mbed_official 104:a6a92e2e5a92 162 {
mbed_official 104:a6a92e2e5a92 163 NRF_RADIO_NOTIFICATION_TYPE_NONE = 0, /**< The event does not have a radio notification signal. */
mbed_official 104:a6a92e2e5a92 164 NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE, /**< Using interrupt for notification when the radio will be enabled. */
mbed_official 104:a6a92e2e5a92 165 NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE, /**< Using interrupt for notification when the radio has been disabled. */
mbed_official 104:a6a92e2e5a92 166 NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH, /**< Using interrupt for notification both when the radio will be enabled and disabled. */
mbed_official 104:a6a92e2e5a92 167 };
mbed_official 104:a6a92e2e5a92 168
mbed_official 104:a6a92e2e5a92 169 /**@brief SoC Events. */
mbed_official 104:a6a92e2e5a92 170 enum NRF_SOC_EVTS
mbed_official 104:a6a92e2e5a92 171 {
mbed_official 104:a6a92e2e5a92 172 NRF_EVT_HFCLKSTARTED, /**< Event indicating that the HFCLK has started. */
mbed_official 104:a6a92e2e5a92 173 NRF_EVT_POWER_FAILURE_WARNING, /**< Event indicating that a power failure warning has occurred. */
mbed_official 104:a6a92e2e5a92 174 NRF_EVT_FLASH_OPERATION_SUCCESS, /**< Event indicating that the ongoing flash operation has completed successfully. */
mbed_official 104:a6a92e2e5a92 175 NRF_EVT_FLASH_OPERATION_ERROR, /**< Event indicating that the ongoing flash operation has timed out with an error. */
mbed_official 104:a6a92e2e5a92 176 NRF_EVT_RESERVED1,
mbed_official 104:a6a92e2e5a92 177 NRF_EVT_RESERVED2,
mbed_official 104:a6a92e2e5a92 178 NRF_EVT_RESERVED3,
mbed_official 104:a6a92e2e5a92 179 NRF_EVT_RESERVED4,
mbed_official 104:a6a92e2e5a92 180 NRF_EVT_RESERVED5,
mbed_official 104:a6a92e2e5a92 181 NRF_EVT_NUMBER_OF_EVTS
mbed_official 104:a6a92e2e5a92 182 };
mbed_official 104:a6a92e2e5a92 183
mbed_official 104:a6a92e2e5a92 184 /** @} */
mbed_official 104:a6a92e2e5a92 185
mbed_official 104:a6a92e2e5a92 186 /** @addtogroup NRF_SOC_TYPES Types
mbed_official 104:a6a92e2e5a92 187 * @{ */
mbed_official 104:a6a92e2e5a92 188
mbed_official 104:a6a92e2e5a92 189 /**@brief Represents a mutex for use with the nrf_mutex functions.
mbed_official 104:a6a92e2e5a92 190 * @note Accessing the value directly is not safe, use the mutex functions!
mbed_official 104:a6a92e2e5a92 191 */
mbed_official 104:a6a92e2e5a92 192 typedef volatile uint8_t nrf_mutex_t;
mbed_official 104:a6a92e2e5a92 193
mbed_official 104:a6a92e2e5a92 194 /**@brief The interrupt priorities available to the application while the softdevice is active. */
mbed_official 104:a6a92e2e5a92 195 typedef uint8_t nrf_app_irq_priority_t;
mbed_official 104:a6a92e2e5a92 196
mbed_official 104:a6a92e2e5a92 197 /**@brief Represents a power mode, used in power mode functions */
mbed_official 104:a6a92e2e5a92 198 typedef uint8_t nrf_power_mode_t;
mbed_official 104:a6a92e2e5a92 199
mbed_official 104:a6a92e2e5a92 200 /**@brief Represents a power failure threshold value. */
mbed_official 104:a6a92e2e5a92 201 typedef uint8_t nrf_power_failure_threshold_t;
mbed_official 104:a6a92e2e5a92 202
mbed_official 104:a6a92e2e5a92 203 /**@brief Represents a DCDC mode value. */
mbed_official 104:a6a92e2e5a92 204 typedef uint32_t nrf_power_dcdc_mode_t;
mbed_official 104:a6a92e2e5a92 205
mbed_official 104:a6a92e2e5a92 206 /**@brief Radio notification distances. */
mbed_official 104:a6a92e2e5a92 207 typedef uint8_t nrf_radio_notification_distance_t;
mbed_official 104:a6a92e2e5a92 208
mbed_official 104:a6a92e2e5a92 209 /**@brief Radio notification types. */
mbed_official 104:a6a92e2e5a92 210 typedef uint8_t nrf_radio_notification_type_t;
mbed_official 104:a6a92e2e5a92 211
mbed_official 104:a6a92e2e5a92 212
mbed_official 104:a6a92e2e5a92 213 /**@brief AES ECB data structure */
mbed_official 104:a6a92e2e5a92 214 typedef struct
mbed_official 104:a6a92e2e5a92 215 {
mbed_official 104:a6a92e2e5a92 216 uint8_t key[SOC_ECB_KEY_LENGTH]; /**< Encryption key. */
mbed_official 104:a6a92e2e5a92 217 uint8_t cleartext[SOC_ECB_CLEARTEXT_LENGTH]; /**< Clear Text data. */
mbed_official 104:a6a92e2e5a92 218 uint8_t ciphertext[SOC_ECB_CIPHERTEXT_LENGTH]; /**< Cipher Text data. */
mbed_official 104:a6a92e2e5a92 219 } nrf_ecb_hal_data_t;
mbed_official 104:a6a92e2e5a92 220
mbed_official 104:a6a92e2e5a92 221 /** @} */
mbed_official 104:a6a92e2e5a92 222
mbed_official 104:a6a92e2e5a92 223 /** @addtogroup NRF_SOC_FUNCTIONS Functions
mbed_official 104:a6a92e2e5a92 224 * @{ */
mbed_official 104:a6a92e2e5a92 225
mbed_official 104:a6a92e2e5a92 226 /**@brief Initialize a mutex.
mbed_official 104:a6a92e2e5a92 227 *
mbed_official 104:a6a92e2e5a92 228 * @param[in] p_mutex Pointer to the mutex to initialize.
mbed_official 104:a6a92e2e5a92 229 *
mbed_official 104:a6a92e2e5a92 230 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 231 */
mbed_official 104:a6a92e2e5a92 232 SVCALL(SD_MUTEX_NEW, uint32_t, sd_mutex_new(nrf_mutex_t * p_mutex));
mbed_official 104:a6a92e2e5a92 233
mbed_official 104:a6a92e2e5a92 234 /**@brief Attempt to acquire a mutex.
mbed_official 104:a6a92e2e5a92 235 *
mbed_official 104:a6a92e2e5a92 236 * @param[in] p_mutex Pointer to the mutex to acquire.
mbed_official 104:a6a92e2e5a92 237 *
mbed_official 104:a6a92e2e5a92 238 * @retval ::NRF_SUCCESS The mutex was successfully acquired.
mbed_official 104:a6a92e2e5a92 239 * @retval ::NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN The mutex could not be acquired.
mbed_official 104:a6a92e2e5a92 240 */
mbed_official 104:a6a92e2e5a92 241 SVCALL(SD_MUTEX_ACQUIRE, uint32_t, sd_mutex_acquire(nrf_mutex_t * p_mutex));
mbed_official 104:a6a92e2e5a92 242
mbed_official 104:a6a92e2e5a92 243 /**@brief Release a mutex.
mbed_official 104:a6a92e2e5a92 244 *
mbed_official 104:a6a92e2e5a92 245 * @param[in] p_mutex Pointer to the mutex to release.
mbed_official 104:a6a92e2e5a92 246 *
mbed_official 104:a6a92e2e5a92 247 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 248 */
mbed_official 104:a6a92e2e5a92 249 SVCALL(SD_MUTEX_RELEASE, uint32_t, sd_mutex_release(nrf_mutex_t * p_mutex));
mbed_official 104:a6a92e2e5a92 250
mbed_official 104:a6a92e2e5a92 251 /**@brief Enable External Interrupt.
mbed_official 104:a6a92e2e5a92 252 * @note Corresponds to NVIC_EnableIRQ in CMSIS.
mbed_official 104:a6a92e2e5a92 253 *
mbed_official 104:a6a92e2e5a92 254 * @pre{IRQn is valid and not reserved by the stack}
mbed_official 104:a6a92e2e5a92 255 *
mbed_official 104:a6a92e2e5a92 256 * @param[in] IRQn See the NVIC_EnableIRQ documentation in CMSIS.
mbed_official 104:a6a92e2e5a92 257 *
mbed_official 104:a6a92e2e5a92 258 * @retval ::NRF_SUCCESS The interrupt was enabled.
mbed_official 104:a6a92e2e5a92 259 * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application.
mbed_official 104:a6a92e2e5a92 260 * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt has a priority not available for the application.
mbed_official 104:a6a92e2e5a92 261 */
mbed_official 104:a6a92e2e5a92 262 SVCALL(SD_NVIC_ENABLEIRQ, uint32_t, sd_nvic_EnableIRQ(IRQn_Type IRQn));
mbed_official 104:a6a92e2e5a92 263
mbed_official 104:a6a92e2e5a92 264 /**@brief Disable External Interrupt.
mbed_official 104:a6a92e2e5a92 265 * @note Corresponds to NVIC_DisableIRQ in CMSIS.
mbed_official 104:a6a92e2e5a92 266 *
mbed_official 104:a6a92e2e5a92 267 * @pre{IRQn is valid and not reserved by the stack}
mbed_official 104:a6a92e2e5a92 268 *
mbed_official 104:a6a92e2e5a92 269 * @param[in] IRQn See the NVIC_DisableIRQ documentation in CMSIS
mbed_official 104:a6a92e2e5a92 270 *
mbed_official 104:a6a92e2e5a92 271 * @retval ::NRF_SUCCESS The interrupt was disabled.
mbed_official 104:a6a92e2e5a92 272 * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application.
mbed_official 104:a6a92e2e5a92 273 */
mbed_official 104:a6a92e2e5a92 274 SVCALL(SD_NVIC_DISABLEIRQ, uint32_t, sd_nvic_DisableIRQ(IRQn_Type IRQn));
mbed_official 104:a6a92e2e5a92 275
mbed_official 104:a6a92e2e5a92 276 /**@brief Get Pending Interrupt.
mbed_official 104:a6a92e2e5a92 277 * @note Corresponds to NVIC_GetPendingIRQ in CMSIS.
mbed_official 104:a6a92e2e5a92 278 *
mbed_official 104:a6a92e2e5a92 279 * @pre{IRQn is valid and not reserved by the stack}
mbed_official 104:a6a92e2e5a92 280 *
mbed_official 104:a6a92e2e5a92 281 * @param[in] IRQn See the NVIC_GetPendingIRQ documentation in CMSIS.
mbed_official 104:a6a92e2e5a92 282 * @param[out] p_pending_irq Return value from NVIC_GetPendingIRQ.
mbed_official 104:a6a92e2e5a92 283 *
mbed_official 104:a6a92e2e5a92 284 * @retval ::NRF_SUCCESS The interrupt is available for the application.
mbed_official 104:a6a92e2e5a92 285 * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.
mbed_official 104:a6a92e2e5a92 286 */
mbed_official 104:a6a92e2e5a92 287 SVCALL(SD_NVIC_GETPENDINGIRQ, uint32_t, sd_nvic_GetPendingIRQ(IRQn_Type IRQn, uint32_t * p_pending_irq));
mbed_official 104:a6a92e2e5a92 288
mbed_official 104:a6a92e2e5a92 289 /**@brief Set Pending Interrupt.
mbed_official 104:a6a92e2e5a92 290 * @note Corresponds to NVIC_SetPendingIRQ in CMSIS.
mbed_official 104:a6a92e2e5a92 291 *
mbed_official 104:a6a92e2e5a92 292 * @pre{IRQn is valid and not reserved by the stack}
mbed_official 104:a6a92e2e5a92 293 *
mbed_official 104:a6a92e2e5a92 294 * @param[in] IRQn See the NVIC_SetPendingIRQ documentation in CMSIS.
mbed_official 104:a6a92e2e5a92 295 *
mbed_official 104:a6a92e2e5a92 296 * @retval ::NRF_SUCCESS The interrupt is set pending.
mbed_official 104:a6a92e2e5a92 297 * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.
mbed_official 104:a6a92e2e5a92 298 */
mbed_official 104:a6a92e2e5a92 299 SVCALL(SD_NVIC_SETPENDINGIRQ, uint32_t, sd_nvic_SetPendingIRQ(IRQn_Type IRQn));
mbed_official 104:a6a92e2e5a92 300
mbed_official 104:a6a92e2e5a92 301 /**@brief Clear Pending Interrupt.
mbed_official 104:a6a92e2e5a92 302 * @note Corresponds to NVIC_ClearPendingIRQ in CMSIS.
mbed_official 104:a6a92e2e5a92 303 *
mbed_official 104:a6a92e2e5a92 304 * @pre{IRQn is valid and not reserved by the stack}
mbed_official 104:a6a92e2e5a92 305 *
mbed_official 104:a6a92e2e5a92 306 * @param[in] IRQn See the NVIC_ClearPendingIRQ documentation in CMSIS.
mbed_official 104:a6a92e2e5a92 307 *
mbed_official 104:a6a92e2e5a92 308 * @retval ::NRF_SUCCESS The interrupt pending flag is cleared.
mbed_official 104:a6a92e2e5a92 309 * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.
mbed_official 104:a6a92e2e5a92 310 */
mbed_official 104:a6a92e2e5a92 311 SVCALL(SD_NVIC_CLEARPENDINGIRQ, uint32_t, sd_nvic_ClearPendingIRQ(IRQn_Type IRQn));
mbed_official 104:a6a92e2e5a92 312
mbed_official 104:a6a92e2e5a92 313 /**@brief Set Interrupt Priority.
mbed_official 104:a6a92e2e5a92 314 * @note Corresponds to NVIC_SetPriority in CMSIS.
mbed_official 104:a6a92e2e5a92 315 *
mbed_official 104:a6a92e2e5a92 316 * @pre{IRQn is valid and not reserved by the stack}
mbed_official 104:a6a92e2e5a92 317 * @pre{priority is valid and not reserved by the stack}
mbed_official 104:a6a92e2e5a92 318 *
mbed_official 104:a6a92e2e5a92 319 * @param[in] IRQn See the NVIC_SetPriority documentation in CMSIS.
mbed_official 104:a6a92e2e5a92 320 * @param[in] priority A valid IRQ priority for use by the application.
mbed_official 104:a6a92e2e5a92 321 *
mbed_official 104:a6a92e2e5a92 322 * @retval ::NRF_SUCCESS The interrupt and priority level is available for the application.
mbed_official 104:a6a92e2e5a92 323 * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.
mbed_official 104:a6a92e2e5a92 324 * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt priority is not available for the application.
mbed_official 104:a6a92e2e5a92 325 */
mbed_official 104:a6a92e2e5a92 326 SVCALL(SD_NVIC_SETPRIORITY, uint32_t, sd_nvic_SetPriority(IRQn_Type IRQn, nrf_app_irq_priority_t priority));
mbed_official 104:a6a92e2e5a92 327
mbed_official 104:a6a92e2e5a92 328 /**@brief Get Interrupt Priority.
mbed_official 104:a6a92e2e5a92 329 * @note Corresponds to NVIC_GetPriority in CMSIS.
mbed_official 104:a6a92e2e5a92 330 *
mbed_official 104:a6a92e2e5a92 331 * @pre{IRQn is valid and not reserved by the stack}
mbed_official 104:a6a92e2e5a92 332 *
mbed_official 104:a6a92e2e5a92 333 * @param[in] IRQn See the NVIC_GetPriority documentation in CMSIS.
mbed_official 104:a6a92e2e5a92 334 * @param[out] p_priority Return value from NVIC_GetPriority.
mbed_official 104:a6a92e2e5a92 335 *
mbed_official 104:a6a92e2e5a92 336 * @retval ::NRF_SUCCESS The interrupt priority is returned in p_priority.
mbed_official 104:a6a92e2e5a92 337 * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE - IRQn is not available for the application.
mbed_official 104:a6a92e2e5a92 338 */
mbed_official 104:a6a92e2e5a92 339 SVCALL(SD_NVIC_GETPRIORITY, uint32_t, sd_nvic_GetPriority(IRQn_Type IRQn, nrf_app_irq_priority_t * p_priority));
mbed_official 104:a6a92e2e5a92 340
mbed_official 104:a6a92e2e5a92 341 /**@brief System Reset.
mbed_official 104:a6a92e2e5a92 342 * @note Corresponds to NVIC_SystemReset in CMSIS.
mbed_official 104:a6a92e2e5a92 343 *
mbed_official 104:a6a92e2e5a92 344 * @retval ::NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN
mbed_official 104:a6a92e2e5a92 345 */
mbed_official 104:a6a92e2e5a92 346 SVCALL(SD_NVIC_SYSTEMRESET, uint32_t, sd_nvic_SystemReset(void));
mbed_official 104:a6a92e2e5a92 347
mbed_official 104:a6a92e2e5a92 348 /**@brief Enters critical region.
mbed_official 104:a6a92e2e5a92 349 *
mbed_official 104:a6a92e2e5a92 350 * @post Application interrupts will be disabled.
mbed_official 104:a6a92e2e5a92 351 * @sa sd_nvic_critical_region_exit
mbed_official 104:a6a92e2e5a92 352 *
mbed_official 104:a6a92e2e5a92 353 * @param[out] p_is_nested_critical_region 1: If in a nested critical region.
mbed_official 104:a6a92e2e5a92 354 * 0: Otherwise.
mbed_official 104:a6a92e2e5a92 355 *
mbed_official 104:a6a92e2e5a92 356 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 357 */
mbed_official 104:a6a92e2e5a92 358 SVCALL(SD_NVIC_CRITICAL_REGION_ENTER, uint32_t, sd_nvic_critical_region_enter(uint8_t * p_is_nested_critical_region));
mbed_official 104:a6a92e2e5a92 359
mbed_official 104:a6a92e2e5a92 360 /**@brief Exit critical region.
mbed_official 104:a6a92e2e5a92 361 *
mbed_official 104:a6a92e2e5a92 362 * @pre Application has entered a critical region using ::sd_nvic_critical_region_enter.
mbed_official 104:a6a92e2e5a92 363 * @post If not in a nested critical region, the application interrupts will restored to the state before ::sd_nvic_critical_region_enter was called.
mbed_official 104:a6a92e2e5a92 364 *
mbed_official 104:a6a92e2e5a92 365 * @param[in] is_nested_critical_region If this is set to 1, the critical region won't be exited. @sa sd_nvic_critical_region_enter.
mbed_official 104:a6a92e2e5a92 366 *
mbed_official 104:a6a92e2e5a92 367 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 368 */
mbed_official 104:a6a92e2e5a92 369 SVCALL(SD_NVIC_CRITICAL_REGION_EXIT, uint32_t, sd_nvic_critical_region_exit(uint8_t is_nested_critical_region));
mbed_official 104:a6a92e2e5a92 370
mbed_official 104:a6a92e2e5a92 371 /**@brief Query the capacity of the application random pool.
mbed_official 104:a6a92e2e5a92 372 *
mbed_official 104:a6a92e2e5a92 373 * @param[out] p_pool_capacity The capacity of the pool.
mbed_official 104:a6a92e2e5a92 374 *
mbed_official 104:a6a92e2e5a92 375 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 376 */
mbed_official 104:a6a92e2e5a92 377 SVCALL(SD_RAND_APPLICATION_POOL_CAPACITY, uint32_t, sd_rand_application_pool_capacity_get(uint8_t * p_pool_capacity));
mbed_official 104:a6a92e2e5a92 378
mbed_official 104:a6a92e2e5a92 379 /**@brief Get number of random bytes available to the application.
mbed_official 104:a6a92e2e5a92 380 *
mbed_official 104:a6a92e2e5a92 381 * @param[out] p_bytes_available The number of bytes currently available in the pool.
mbed_official 104:a6a92e2e5a92 382 *
mbed_official 104:a6a92e2e5a92 383 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 384 */
mbed_official 104:a6a92e2e5a92 385 SVCALL(SD_RAND_APPLICATION_BYTES_AVAILABLE, uint32_t, sd_rand_application_bytes_available_get(uint8_t * p_bytes_available));
mbed_official 104:a6a92e2e5a92 386
mbed_official 104:a6a92e2e5a92 387 /**@brief Get random bytes from the application pool.
mbed_official 104:a6a92e2e5a92 388
mbed_official 104:a6a92e2e5a92 389 @param[out] p_buff Pointer to unit8_t buffer for storing the bytes.
mbed_official 104:a6a92e2e5a92 390 @param[in] length Number of bytes to take from pool and place in p_buff.
mbed_official 104:a6a92e2e5a92 391
mbed_official 104:a6a92e2e5a92 392 @retval ::NRF_SUCCESS The requested bytes were written to p_buff.
mbed_official 104:a6a92e2e5a92 393 @retval ::NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES No bytes were written to the buffer, because there were not enough bytes available.
mbed_official 104:a6a92e2e5a92 394 */
mbed_official 104:a6a92e2e5a92 395 SVCALL(SD_RAND_APPLICATION_GET_VECTOR, uint32_t, sd_rand_application_vector_get(uint8_t * p_buff, uint8_t length));
mbed_official 104:a6a92e2e5a92 396
mbed_official 104:a6a92e2e5a92 397 /**@brief Gets the reset reason register.
mbed_official 104:a6a92e2e5a92 398 *
mbed_official 104:a6a92e2e5a92 399 * @param[out] p_reset_reason Contents of the NRF_POWER->RESETREAS register.
mbed_official 104:a6a92e2e5a92 400 *
mbed_official 104:a6a92e2e5a92 401 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 402 */
mbed_official 104:a6a92e2e5a92 403 SVCALL(SD_POWER_RESET_REASON_GET, uint32_t, sd_power_reset_reason_get(uint32_t * p_reset_reason));
mbed_official 104:a6a92e2e5a92 404
mbed_official 104:a6a92e2e5a92 405 /**@brief Clears the bits of the reset reason register.
mbed_official 104:a6a92e2e5a92 406 *
mbed_official 104:a6a92e2e5a92 407 * @param[in] reset_reason_clr_msk Contains the bits to clear from the reset reason register.
mbed_official 104:a6a92e2e5a92 408 *
mbed_official 104:a6a92e2e5a92 409 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 410 */
mbed_official 104:a6a92e2e5a92 411 SVCALL(SD_POWER_RESET_REASON_CLR, uint32_t, sd_power_reset_reason_clr(uint32_t reset_reason_clr_msk));
mbed_official 104:a6a92e2e5a92 412
mbed_official 104:a6a92e2e5a92 413 /**@brief Sets the power mode when in CPU sleep.
mbed_official 104:a6a92e2e5a92 414 *
mbed_official 104:a6a92e2e5a92 415 * @param[in] power_mode The power mode to use when in CPU sleep. @sa sd_app_evt_wait
mbed_official 104:a6a92e2e5a92 416 *
mbed_official 104:a6a92e2e5a92 417 * @retval ::NRF_SUCCESS The power mode was set.
mbed_official 104:a6a92e2e5a92 418 * @retval ::NRF_ERROR_SOC_POWER_MODE_UNKNOWN The power mode was unknown.
mbed_official 104:a6a92e2e5a92 419 */
mbed_official 104:a6a92e2e5a92 420 SVCALL(SD_POWER_MODE_SET, uint32_t, sd_power_mode_set(nrf_power_mode_t power_mode));
mbed_official 104:a6a92e2e5a92 421
mbed_official 104:a6a92e2e5a92 422 /**@brief Puts the chip in System OFF mode.
mbed_official 104:a6a92e2e5a92 423 *
mbed_official 104:a6a92e2e5a92 424 * @retval ::NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN
mbed_official 104:a6a92e2e5a92 425 */
mbed_official 104:a6a92e2e5a92 426 SVCALL(SD_POWER_SYSTEM_OFF, uint32_t, sd_power_system_off(void));
mbed_official 104:a6a92e2e5a92 427
mbed_official 104:a6a92e2e5a92 428 /**@brief Enables or disables the power-fail comparator.
mbed_official 104:a6a92e2e5a92 429 *
mbed_official 104:a6a92e2e5a92 430 * Enabling this will give a softdevice event (NRF_EVT_POWER_FAILURE_WARNING) when the power failure warning occurs.
mbed_official 104:a6a92e2e5a92 431 * The event can be retrieved with sd_evt_get();
mbed_official 104:a6a92e2e5a92 432 *
mbed_official 104:a6a92e2e5a92 433 * @param[in] pof_enable True if the power-fail comparator should be enabled, false if it should be disabled.
mbed_official 104:a6a92e2e5a92 434 *
mbed_official 104:a6a92e2e5a92 435 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 436 */
mbed_official 104:a6a92e2e5a92 437 SVCALL(SD_POWER_POF_ENABLE, uint32_t, sd_power_pof_enable(uint8_t pof_enable));
mbed_official 104:a6a92e2e5a92 438
mbed_official 104:a6a92e2e5a92 439 /**@brief Sets the power-fail threshold value.
mbed_official 104:a6a92e2e5a92 440 *
mbed_official 104:a6a92e2e5a92 441 * @param[in] threshold The power-fail threshold value to use.
mbed_official 104:a6a92e2e5a92 442 *
mbed_official 104:a6a92e2e5a92 443 * @retval ::NRF_SUCCESS The power failure threshold was set.
mbed_official 104:a6a92e2e5a92 444 * @retval ::NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN The power failure threshold is unknown.
mbed_official 104:a6a92e2e5a92 445 */
mbed_official 104:a6a92e2e5a92 446 SVCALL(SD_POWER_POF_THRESHOLD_SET, uint32_t, sd_power_pof_threshold_set(nrf_power_failure_threshold_t threshold));
mbed_official 104:a6a92e2e5a92 447
mbed_official 104:a6a92e2e5a92 448 /**@brief Sets bits in the NRF_POWER->RAMON register.
mbed_official 104:a6a92e2e5a92 449 *
mbed_official 104:a6a92e2e5a92 450 * @param[in] ramon Contains the bits needed to be set in the NRF_POWER->RAMON register.
mbed_official 104:a6a92e2e5a92 451 *
mbed_official 104:a6a92e2e5a92 452 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 453 */
mbed_official 104:a6a92e2e5a92 454 SVCALL(SD_POWER_RAMON_SET, uint32_t, sd_power_ramon_set(uint32_t ramon));
mbed_official 104:a6a92e2e5a92 455
mbed_official 104:a6a92e2e5a92 456 /** @brief Clears bits in the NRF_POWER->RAMON register.
mbed_official 104:a6a92e2e5a92 457 *
mbed_official 104:a6a92e2e5a92 458 * @param ramon Contains the bits needed to be cleared in the NRF_POWER->RAMON register.
mbed_official 104:a6a92e2e5a92 459 *
mbed_official 104:a6a92e2e5a92 460 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 461 */
mbed_official 104:a6a92e2e5a92 462 SVCALL(SD_POWER_RAMON_CLR, uint32_t, sd_power_ramon_clr(uint32_t ramon));
mbed_official 104:a6a92e2e5a92 463
mbed_official 104:a6a92e2e5a92 464 /**@brief Get contents of NRF_POWER->RAMON register, indicates power status of ram blocks.
mbed_official 104:a6a92e2e5a92 465 *
mbed_official 104:a6a92e2e5a92 466 * @param[out] p_ramon Content of NRF_POWER->RAMON register.
mbed_official 104:a6a92e2e5a92 467 *
mbed_official 104:a6a92e2e5a92 468 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 469 */
mbed_official 104:a6a92e2e5a92 470 SVCALL(SD_POWER_RAMON_GET, uint32_t, sd_power_ramon_get(uint32_t * p_ramon));
mbed_official 104:a6a92e2e5a92 471
mbed_official 104:a6a92e2e5a92 472 /**@brief Set bits in the NRF_POWER->GPREGRET register.
mbed_official 104:a6a92e2e5a92 473 *
mbed_official 104:a6a92e2e5a92 474 * @param[in] gpregret_msk Bits to be set in the GPREGRET register.
mbed_official 104:a6a92e2e5a92 475 *
mbed_official 104:a6a92e2e5a92 476 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 477 */
mbed_official 104:a6a92e2e5a92 478 SVCALL(SD_POWER_GPREGRET_SET, uint32_t, sd_power_gpregret_set(uint32_t gpregret_msk));
mbed_official 104:a6a92e2e5a92 479
mbed_official 104:a6a92e2e5a92 480 /**@brief Clear bits in the NRF_POWER->GPREGRET register.
mbed_official 104:a6a92e2e5a92 481 *
mbed_official 104:a6a92e2e5a92 482 * @param[in] gpregret_msk Bits to be clear in the GPREGRET register.
mbed_official 104:a6a92e2e5a92 483 *
mbed_official 104:a6a92e2e5a92 484 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 485 */
mbed_official 104:a6a92e2e5a92 486 SVCALL(SD_POWER_GPREGRET_CLR, uint32_t, sd_power_gpregret_clr(uint32_t gpregret_msk));
mbed_official 104:a6a92e2e5a92 487
mbed_official 104:a6a92e2e5a92 488 /**@brief Get contents of the NRF_POWER->GPREGRET register.
mbed_official 104:a6a92e2e5a92 489 *
mbed_official 104:a6a92e2e5a92 490 * @param[out] p_gpregret Contents of the GPREGRET register.
mbed_official 104:a6a92e2e5a92 491 *
mbed_official 104:a6a92e2e5a92 492 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 493 */
mbed_official 104:a6a92e2e5a92 494 SVCALL(SD_POWER_GPREGRET_GET, uint32_t, sd_power_gpregret_get(uint32_t *p_gpregret));
mbed_official 104:a6a92e2e5a92 495
mbed_official 104:a6a92e2e5a92 496 /**@brief Sets the DCDC mode.
mbed_official 104:a6a92e2e5a92 497 *
mbed_official 104:a6a92e2e5a92 498 * Depending on the internal state of the SoftDevice, the mode change may not happen immediately.
mbed_official 104:a6a92e2e5a92 499 * The DCDC mode switch will be blocked when occurring in close proximity to radio transmissions. When
mbed_official 104:a6a92e2e5a92 500 * the radio transmission is done, the last mode will be used.
mbed_official 104:a6a92e2e5a92 501 *
mbed_official 104:a6a92e2e5a92 502 * @param[in] dcdc_mode The mode of the DCDC.
mbed_official 104:a6a92e2e5a92 503 *
mbed_official 104:a6a92e2e5a92 504 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 505 * @retval ::NRF_ERROR_INVALID_PARAM The DCDC mode is invalid.
mbed_official 104:a6a92e2e5a92 506 */
mbed_official 104:a6a92e2e5a92 507 SVCALL(SD_POWER_DCDC_MODE_SET, uint32_t, sd_power_dcdc_mode_set(nrf_power_dcdc_mode_t dcdc_mode));
mbed_official 104:a6a92e2e5a92 508
mbed_official 104:a6a92e2e5a92 509 /**@brief Request the high frequency crystal oscillator.
mbed_official 104:a6a92e2e5a92 510 *
mbed_official 104:a6a92e2e5a92 511 * Will start the high frequency crystal oscillator, the startup time of the crystal varies
mbed_official 104:a6a92e2e5a92 512 * and the ::sd_clock_hfclk_is_running function can be polled to check if it has started.
mbed_official 104:a6a92e2e5a92 513 *
mbed_official 104:a6a92e2e5a92 514 * @see sd_clock_hfclk_is_running
mbed_official 104:a6a92e2e5a92 515 * @see sd_clock_hfclk_release
mbed_official 104:a6a92e2e5a92 516 *
mbed_official 104:a6a92e2e5a92 517 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 518 */
mbed_official 104:a6a92e2e5a92 519 SVCALL(SD_CLOCK_HFCLK_REQUEST, uint32_t, sd_clock_hfclk_request(void));
mbed_official 104:a6a92e2e5a92 520
mbed_official 104:a6a92e2e5a92 521 /**@brief Releases the high frequency crystal oscillator.
mbed_official 104:a6a92e2e5a92 522 *
mbed_official 104:a6a92e2e5a92 523 * Will stop the high frequency crystal oscillator, this happens immediately.
mbed_official 104:a6a92e2e5a92 524 *
mbed_official 104:a6a92e2e5a92 525 * @see sd_clock_hfclk_is_running
mbed_official 104:a6a92e2e5a92 526 * @see sd_clock_hfclk_request
mbed_official 104:a6a92e2e5a92 527 *
mbed_official 104:a6a92e2e5a92 528 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 529 */
mbed_official 104:a6a92e2e5a92 530 SVCALL(SD_CLOCK_HFCLK_RELEASE, uint32_t, sd_clock_hfclk_release(void));
mbed_official 104:a6a92e2e5a92 531
mbed_official 104:a6a92e2e5a92 532 /**@brief Checks if the high frequency crystal oscillator is running.
mbed_official 104:a6a92e2e5a92 533 *
mbed_official 104:a6a92e2e5a92 534 * @see sd_clock_hfclk_request
mbed_official 104:a6a92e2e5a92 535 * @see sd_clock_hfclk_release
mbed_official 104:a6a92e2e5a92 536 *
mbed_official 104:a6a92e2e5a92 537 * @param[out] p_is_running 1 if the external crystal oscillator is running, 0 if not.
mbed_official 104:a6a92e2e5a92 538 *
mbed_official 104:a6a92e2e5a92 539 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 540 */
mbed_official 104:a6a92e2e5a92 541 SVCALL(SD_CLOCK_HFCLK_IS_RUNNING, uint32_t, sd_clock_hfclk_is_running(uint32_t * p_is_running));
mbed_official 104:a6a92e2e5a92 542
mbed_official 104:a6a92e2e5a92 543 /**@brief Waits for an application event.
mbed_official 104:a6a92e2e5a92 544 *
mbed_official 104:a6a92e2e5a92 545 * An application event is either an application interrupt or a pended interrupt when the
mbed_official 104:a6a92e2e5a92 546 * interrupt is disabled. When the interrupt is enabled it will be taken immediately since
mbed_official 104:a6a92e2e5a92 547 * this function will wait in thread mode, then the execution will return in the application's
mbed_official 104:a6a92e2e5a92 548 * main thread. When an interrupt is disabled and gets pended it will return to the application's
mbed_official 104:a6a92e2e5a92 549 * thread main. The application must ensure that the pended flag is cleared using
mbed_official 104:a6a92e2e5a92 550 * ::sd_nvic_ClearPendingIRQ in order to sleep using this function. This is only necessary for
mbed_official 104:a6a92e2e5a92 551 * disabled interrupts, as the interrupt handler will clear the pending flag automatically for
mbed_official 104:a6a92e2e5a92 552 * enabled interrupts.
mbed_official 104:a6a92e2e5a92 553 *
mbed_official 104:a6a92e2e5a92 554 * In order to wake up from disabled interrupts, the SEVONPEND flag has to be set in the Cortex-M0
mbed_official 104:a6a92e2e5a92 555 * System Control Register (SCR). @sa CMSIS_SCB
mbed_official 104:a6a92e2e5a92 556 *
mbed_official 104:a6a92e2e5a92 557 * @note If an application interrupt has happened since the last time sd_app_evt_wait was
mbed_official 104:a6a92e2e5a92 558 * called this function will return immediately and not go to sleep. This is to avoid race
mbed_official 104:a6a92e2e5a92 559 * conditions that can occur when a flag is updated in the interrupt handler and processed
mbed_official 104:a6a92e2e5a92 560 * in the main loop.
mbed_official 104:a6a92e2e5a92 561 *
mbed_official 104:a6a92e2e5a92 562 * @post An application interrupt has happened or a interrupt pending flag is set.
mbed_official 104:a6a92e2e5a92 563 *
mbed_official 104:a6a92e2e5a92 564 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 565 */
mbed_official 104:a6a92e2e5a92 566 SVCALL(SD_APP_EVT_WAIT, uint32_t, sd_app_evt_wait(void));
mbed_official 104:a6a92e2e5a92 567
mbed_official 104:a6a92e2e5a92 568 /**@brief Get PPI channel enable register contents.
mbed_official 104:a6a92e2e5a92 569 *
mbed_official 104:a6a92e2e5a92 570 * @param[out] p_channel_enable The contents of the PPI CHEN register.
mbed_official 104:a6a92e2e5a92 571 *
mbed_official 104:a6a92e2e5a92 572 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 573 */
mbed_official 104:a6a92e2e5a92 574 SVCALL(SD_PPI_CHANNEL_ENABLE_GET, uint32_t, sd_ppi_channel_enable_get(uint32_t * p_channel_enable));
mbed_official 104:a6a92e2e5a92 575
mbed_official 104:a6a92e2e5a92 576 /**@brief Set PPI channel enable register.
mbed_official 104:a6a92e2e5a92 577 *
mbed_official 104:a6a92e2e5a92 578 * @param[in] channel_enable_set_msk Mask containing the bits to set in the PPI CHEN register.
mbed_official 104:a6a92e2e5a92 579 *
mbed_official 104:a6a92e2e5a92 580 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 581 */
mbed_official 104:a6a92e2e5a92 582 SVCALL(SD_PPI_CHANNEL_ENABLE_SET, uint32_t, sd_ppi_channel_enable_set(uint32_t channel_enable_set_msk));
mbed_official 104:a6a92e2e5a92 583
mbed_official 104:a6a92e2e5a92 584 /**@brief Clear PPI channel enable register.
mbed_official 104:a6a92e2e5a92 585 *
mbed_official 104:a6a92e2e5a92 586 * @param[in] channel_enable_clr_msk Mask containing the bits to clear in the PPI CHEN register.
mbed_official 104:a6a92e2e5a92 587 *
mbed_official 104:a6a92e2e5a92 588 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 589 */
mbed_official 104:a6a92e2e5a92 590 SVCALL(SD_PPI_CHANNEL_ENABLE_CLR, uint32_t, sd_ppi_channel_enable_clr(uint32_t channel_enable_clr_msk));
mbed_official 104:a6a92e2e5a92 591
mbed_official 104:a6a92e2e5a92 592 /**@brief Assign endpoints to a PPI channel.
mbed_official 104:a6a92e2e5a92 593 *
mbed_official 104:a6a92e2e5a92 594 * @param[in] channel_num Number of the PPI channel to assign.
mbed_official 104:a6a92e2e5a92 595 * @param[in] evt_endpoint Event endpoint of the PPI channel.
mbed_official 104:a6a92e2e5a92 596 * @param[in] task_endpoint Task endpoint of the PPI channel.
mbed_official 104:a6a92e2e5a92 597 *
mbed_official 104:a6a92e2e5a92 598 * @retval ::NRF_ERROR_SOC_PPI_INVALID_CHANNEL The channel number is invalid.
mbed_official 104:a6a92e2e5a92 599 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 600 */
mbed_official 104:a6a92e2e5a92 601 SVCALL(SD_PPI_CHANNEL_ASSIGN, uint32_t, sd_ppi_channel_assign(uint8_t channel_num, const volatile void * evt_endpoint, const volatile void * task_endpoint));
mbed_official 104:a6a92e2e5a92 602
mbed_official 104:a6a92e2e5a92 603 /**@brief Task to enable a channel group.
mbed_official 104:a6a92e2e5a92 604 *
mbed_official 104:a6a92e2e5a92 605 * @param[in] group_num Number of the channel group.
mbed_official 104:a6a92e2e5a92 606 *
mbed_official 104:a6a92e2e5a92 607 * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid
mbed_official 104:a6a92e2e5a92 608 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 609 */
mbed_official 104:a6a92e2e5a92 610 SVCALL(SD_PPI_GROUP_TASK_ENABLE, uint32_t, sd_ppi_group_task_enable(uint8_t group_num));
mbed_official 104:a6a92e2e5a92 611
mbed_official 104:a6a92e2e5a92 612 /**@brief Task to disable a channel group.
mbed_official 104:a6a92e2e5a92 613 *
mbed_official 104:a6a92e2e5a92 614 * @param[in] group_num Number of the PPI group.
mbed_official 104:a6a92e2e5a92 615 *
mbed_official 104:a6a92e2e5a92 616 * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid.
mbed_official 104:a6a92e2e5a92 617 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 618 */
mbed_official 104:a6a92e2e5a92 619 SVCALL(SD_PPI_GROUP_TASK_DISABLE, uint32_t, sd_ppi_group_task_disable(uint8_t group_num));
mbed_official 104:a6a92e2e5a92 620
mbed_official 104:a6a92e2e5a92 621 /**@brief Assign PPI channels to a channel group.
mbed_official 104:a6a92e2e5a92 622 *
mbed_official 104:a6a92e2e5a92 623 * @param[in] group_num Number of the channel group.
mbed_official 104:a6a92e2e5a92 624 * @param[in] channel_msk Mask of the channels to assign to the group.
mbed_official 104:a6a92e2e5a92 625 *
mbed_official 104:a6a92e2e5a92 626 * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid.
mbed_official 104:a6a92e2e5a92 627 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 628 */
mbed_official 104:a6a92e2e5a92 629 SVCALL(SD_PPI_GROUP_ASSIGN, uint32_t, sd_ppi_group_assign(uint8_t group_num, uint32_t channel_msk));
mbed_official 104:a6a92e2e5a92 630
mbed_official 104:a6a92e2e5a92 631 /**@brief Gets the PPI channels of a channel group.
mbed_official 104:a6a92e2e5a92 632 *
mbed_official 104:a6a92e2e5a92 633 * @param[in] group_num Number of the channel group.
mbed_official 104:a6a92e2e5a92 634 * @param[out] p_channel_msk Mask of the channels assigned to the group.
mbed_official 104:a6a92e2e5a92 635 *
mbed_official 104:a6a92e2e5a92 636 * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid.
mbed_official 104:a6a92e2e5a92 637 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 638 */
mbed_official 104:a6a92e2e5a92 639 SVCALL(SD_PPI_GROUP_GET, uint32_t, sd_ppi_group_get(uint8_t group_num, uint32_t * p_channel_msk));
mbed_official 104:a6a92e2e5a92 640
mbed_official 104:a6a92e2e5a92 641 /**@brief Configures the Radio Notification signal.
mbed_official 104:a6a92e2e5a92 642 *
mbed_official 104:a6a92e2e5a92 643 * @note
mbed_official 104:a6a92e2e5a92 644 * - The notification signal latency depends on the interrupt priority settings of SWI used
mbed_official 104:a6a92e2e5a92 645 * for notification signal.
mbed_official 104:a6a92e2e5a92 646 * - In the period between the ACTIVE signal and the start of the Radio Event, the SoftDevice
mbed_official 104:a6a92e2e5a92 647 * will interrupt the application to do Radio Event preparation.
mbed_official 104:a6a92e2e5a92 648 * - Using the Radio Notification feature may limit the bandwidth, as the SoftDevice may have
mbed_official 104:a6a92e2e5a92 649 * to shorten the connection events to have time for the Radio Notification signals.
mbed_official 104:a6a92e2e5a92 650 *
mbed_official 104:a6a92e2e5a92 651 * @param[in] type Type of notification signal.
mbed_official 104:a6a92e2e5a92 652 * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE shall be used to turn off radio
mbed_official 104:a6a92e2e5a92 653 * notification. Using @ref NRF_RADIO_NOTIFICATION_DISTANCE_NONE is
mbed_official 104:a6a92e2e5a92 654 * recommended (but not required) to be used with
mbed_official 104:a6a92e2e5a92 655 * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE.
mbed_official 104:a6a92e2e5a92 656 *
mbed_official 104:a6a92e2e5a92 657 * @param[in] distance Distance between the notification signal and start of radio activity.
mbed_official 104:a6a92e2e5a92 658 * This parameter is ignored when @ref NRF_RADIO_NOTIFICATION_TYPE_NONE or
mbed_official 104:a6a92e2e5a92 659 * @ref NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE is used.
mbed_official 104:a6a92e2e5a92 660 *
mbed_official 104:a6a92e2e5a92 661 * @retval ::NRF_ERROR_INVALID_PARAM The group number is invalid.
mbed_official 104:a6a92e2e5a92 662 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 663 */
mbed_official 104:a6a92e2e5a92 664 SVCALL(SD_RADIO_NOTIFICATION_CFG_SET, uint32_t, sd_radio_notification_cfg_set(nrf_radio_notification_type_t type, nrf_radio_notification_distance_t distance));
mbed_official 104:a6a92e2e5a92 665
mbed_official 104:a6a92e2e5a92 666 /**@brief Encrypts a block according to the specified parameters.
mbed_official 104:a6a92e2e5a92 667 *
mbed_official 104:a6a92e2e5a92 668 * 128-bit AES encryption.
mbed_official 104:a6a92e2e5a92 669 *
mbed_official 104:a6a92e2e5a92 670 * @param[in, out] p_ecb_data Pointer to the ECB parameters' struct (two input
mbed_official 104:a6a92e2e5a92 671 * parameters and one output parameter).
mbed_official 104:a6a92e2e5a92 672 *
mbed_official 104:a6a92e2e5a92 673 * @retval ::NRF_SUCCESS
mbed_official 104:a6a92e2e5a92 674 */
mbed_official 104:a6a92e2e5a92 675 SVCALL(SD_ECB_BLOCK_ENCRYPT, uint32_t, sd_ecb_block_encrypt(nrf_ecb_hal_data_t * p_ecb_data));
mbed_official 104:a6a92e2e5a92 676
mbed_official 104:a6a92e2e5a92 677 /**@brief Gets any pending events generated by the SoC API.
mbed_official 104:a6a92e2e5a92 678 *
mbed_official 104:a6a92e2e5a92 679 * The application should keep calling this function to get events, until ::NRF_ERROR_NOT_FOUND is returned.
mbed_official 104:a6a92e2e5a92 680 *
mbed_official 104:a6a92e2e5a92 681 * @param[out] p_evt_id Set to one of the values in @ref NRF_SOC_EVTS, if any events are pending.
mbed_official 104:a6a92e2e5a92 682 *
mbed_official 104:a6a92e2e5a92 683 * @retval ::NRF_SUCCESS An event was pending. The event id is written in the p_evt_id parameter.
mbed_official 104:a6a92e2e5a92 684 * @retval ::NRF_ERROR_NOT_FOUND No pending events.
mbed_official 104:a6a92e2e5a92 685 */
mbed_official 104:a6a92e2e5a92 686 SVCALL(SD_EVT_GET, uint32_t, sd_evt_get(uint32_t * p_evt_id));
mbed_official 104:a6a92e2e5a92 687
mbed_official 104:a6a92e2e5a92 688 /**@brief Get the temperature measured on the chip
mbed_official 104:a6a92e2e5a92 689 *
mbed_official 104:a6a92e2e5a92 690 * This function will block until the temperature measurement is done.
mbed_official 104:a6a92e2e5a92 691 * It takes around 50us from call to return.
mbed_official 104:a6a92e2e5a92 692 *
mbed_official 104:a6a92e2e5a92 693 * @note Pan #28 in PAN-028 v 1.6 "Negative measured values are not represented correctly" is corrected by this function.
mbed_official 104:a6a92e2e5a92 694 *
mbed_official 104:a6a92e2e5a92 695 * @param[out] p_temp Result of temperature measurement. Die temperature in 0.25 degrees celsius.
mbed_official 104:a6a92e2e5a92 696 *
mbed_official 104:a6a92e2e5a92 697 * @retval ::NRF_SUCCESS A temperature measurement was done, and the temperature was written to temp
mbed_official 104:a6a92e2e5a92 698 */
mbed_official 104:a6a92e2e5a92 699 SVCALL(SD_TEMP_GET, uint32_t, sd_temp_get(int32_t * p_temp));
mbed_official 104:a6a92e2e5a92 700
mbed_official 104:a6a92e2e5a92 701 /**@brief Flash Write
mbed_official 104:a6a92e2e5a92 702 *
mbed_official 104:a6a92e2e5a92 703 * Commands to write a buffer to flash
mbed_official 104:a6a92e2e5a92 704 *
mbed_official 104:a6a92e2e5a92 705 * This call initiates the flash access command, and its completion will be communicated to the
mbed_official 104:a6a92e2e5a92 706 * application with exactly one of the following events:
mbed_official 104:a6a92e2e5a92 707 * - NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed.
mbed_official 104:a6a92e2e5a92 708 * - NRF_EVT_FLASH_OPERATION_ERROR - The command could not be started.
mbed_official 104:a6a92e2e5a92 709 *
mbed_official 104:a6a92e2e5a92 710 * @note
mbed_official 104:a6a92e2e5a92 711 * - This call takes control over the radio and the CPU during flash erase and write to make sure that
mbed_official 104:a6a92e2e5a92 712 * they will not interfere with the flash access. This means that all interrupts will be blocked
mbed_official 104:a6a92e2e5a92 713 * for a predictable time (depending on the NVMC specification in nRF51 Series Reference Manual
mbed_official 104:a6a92e2e5a92 714 * and the command parameters).
mbed_official 104:a6a92e2e5a92 715 *
mbed_official 104:a6a92e2e5a92 716 *
mbed_official 104:a6a92e2e5a92 717 * @param[in] p_dst Pointer to start of flash location to be written.
mbed_official 104:a6a92e2e5a92 718 * @param[in] p_src Pointer to buffer with data to be written
mbed_official 104:a6a92e2e5a92 719 * @param[in] size Number of 32-bit words to write. Maximum size is 256 32bit words.
mbed_official 104:a6a92e2e5a92 720 *
mbed_official 104:a6a92e2e5a92 721 * @retval ::NRF_ERROR_INVALID_ADDR Tried to write to a non existing flash address, or p_dst or p_src was unaligned.
mbed_official 104:a6a92e2e5a92 722 * @retval ::NRF_ERROR_BUSY The previous command has not yet completed.
mbed_official 104:a6a92e2e5a92 723 * @retval ::NRF_ERROR_INVALID_LENGTH Size was 0, or more than 256 words.
mbed_official 104:a6a92e2e5a92 724 * @retval ::NRF_ERROR_FORBIDDEN Tried to write to or read from protected location.
mbed_official 104:a6a92e2e5a92 725 * @retval ::NRF_SUCCESS The command was accepted.
mbed_official 104:a6a92e2e5a92 726 */
mbed_official 104:a6a92e2e5a92 727 SVCALL(SD_FLASH_WRITE, uint32_t, sd_flash_write(uint32_t * const p_dst, uint32_t const * const p_src, uint32_t size));
mbed_official 104:a6a92e2e5a92 728
mbed_official 104:a6a92e2e5a92 729
mbed_official 104:a6a92e2e5a92 730 /**@brief Flash Erase page
mbed_official 104:a6a92e2e5a92 731 *
mbed_official 104:a6a92e2e5a92 732 * Commands to erase a flash page
mbed_official 104:a6a92e2e5a92 733 *
mbed_official 104:a6a92e2e5a92 734 * This call initiates the flash access command, and its completion will be communicated to the
mbed_official 104:a6a92e2e5a92 735 * application with exactly one of the following events:
mbed_official 104:a6a92e2e5a92 736 * - NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed.
mbed_official 104:a6a92e2e5a92 737 * - NRF_EVT_FLASH_OPERATION_ERROR - The command could not be started.
mbed_official 104:a6a92e2e5a92 738 *
mbed_official 104:a6a92e2e5a92 739 * @note
mbed_official 104:a6a92e2e5a92 740 * - This call takes control over the radio and the CPU during flash erase and write to make sure that
mbed_official 104:a6a92e2e5a92 741 * they will not interfere with the flash access. This means that all interrupts will be blocked
mbed_official 104:a6a92e2e5a92 742 * for a predictable time (depending on the NVMC specification in nRF51 Series Reference Manual
mbed_official 104:a6a92e2e5a92 743 * and the command parameters).
mbed_official 104:a6a92e2e5a92 744 *
mbed_official 104:a6a92e2e5a92 745 *
mbed_official 104:a6a92e2e5a92 746 * @param[in] page_number Pagenumber of the page to erase
mbed_official 104:a6a92e2e5a92 747 * @retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error.
mbed_official 104:a6a92e2e5a92 748 * @retval ::NRF_ERROR_INVALID_ADDR Tried to erase to a non existing flash page.
mbed_official 104:a6a92e2e5a92 749 * @retval ::NRF_ERROR_BUSY The previous command has not yet completed.
mbed_official 104:a6a92e2e5a92 750 * @retval ::NRF_ERROR_FORBIDDEN Tried to erase a protected page.
mbed_official 104:a6a92e2e5a92 751 * @retval ::NRF_SUCCESS The command was accepted.
mbed_official 104:a6a92e2e5a92 752 */
mbed_official 104:a6a92e2e5a92 753 SVCALL(SD_FLASH_ERASE_PAGE, uint32_t, sd_flash_page_erase(uint32_t page_number));
mbed_official 104:a6a92e2e5a92 754
mbed_official 104:a6a92e2e5a92 755
mbed_official 104:a6a92e2e5a92 756 /**@brief Flash Protection set
mbed_official 104:a6a92e2e5a92 757 *
mbed_official 104:a6a92e2e5a92 758 * Commands to set the flash protection registers PROTENSETx
mbed_official 104:a6a92e2e5a92 759 *
mbed_official 104:a6a92e2e5a92 760 * @note To read the values in PROTENSETx you can read them directly. They are only write-protected.
mbed_official 104:a6a92e2e5a92 761 *
mbed_official 104:a6a92e2e5a92 762 * @param[in] protenset0 Value to be written to PROTENSET0
mbed_official 104:a6a92e2e5a92 763 * @param[in] protenset1 Value to be written to PROTENSET1
mbed_official 104:a6a92e2e5a92 764 *
mbed_official 104:a6a92e2e5a92 765 * @retval ::NRF_ERROR_FORBIDDEN Tried to protect the SoftDevice
mbed_official 104:a6a92e2e5a92 766 * @retval ::NRF_SUCCESS Values successfully written to PROTENSETx
mbed_official 104:a6a92e2e5a92 767 */
mbed_official 104:a6a92e2e5a92 768 SVCALL(SD_FLASH_PROTECT, uint32_t, sd_flash_protect(uint32_t protenset0, uint32_t protenset1));
mbed_official 104:a6a92e2e5a92 769
mbed_official 104:a6a92e2e5a92 770
mbed_official 104:a6a92e2e5a92 771 /** @} */
mbed_official 104:a6a92e2e5a92 772
mbed_official 104:a6a92e2e5a92 773 #endif // NRF_SOC_H__
mbed_official 104:a6a92e2e5a92 774
mbed_official 104:a6a92e2e5a92 775 /**
mbed_official 104:a6a92e2e5a92 776 @}
mbed_official 104:a6a92e2e5a92 777 */