Macros to create Supervisor functions. More...
Data Structures |
|
| struct | nrf_svc_func_reg_t |
|
Type holding the SVC number, SVCI number, and the pointer to the corresponding handler function.
More...
|
|
Macros |
|
| #define | NRF_SVC_FUNCTION_REGISTER (svc_number, name, func) |
|
Macro for registering a structure holding SVC number and SVC handler function pointer.
More...
|
|
| #define | NRF_SVCI_FUNCTION_REGISTER (svci_number, name, func) |
|
Macro for registering a structure holding SVC number, SVCI number, and SVCI handler function pointer.
More...
|
|
Typedefs |
|
| typedef uint32_t(* | nrf_svc_func_t )() |
|
Function to be called from an SVC handler.
More...
|
|
Functions |
|
| STATIC_ASSERT (sizeof( nrf_svc_func_reg_t )%4==0) | |
Detailed Description
Macros to create Supervisor functions.
Macro Definition Documentation
| #define NRF_SVC_FUNCTION_REGISTER | ( | svc_number, | |
| name, | |||
| func | |||
| ) |
Value:
STATIC_ASSERT
(svc_number != 0); \
NRF_SECTION_ITEM_REGISTER(svc_data,
nrf_svc_func_reg_t
const
name) = \
{ \
.svc_num = svc_number, \
.svci_num =
NRF_SVCI_SVC_NUM_INVALID
, \
.func_ptr = (
nrf_svc_func_t
)func \
}
Macro for registering a structure holding SVC number and SVC handler function pointer.
This macro places a variable in a section named "svc_data" that the SVC handler uses during regular operation.
- Note
- This macro must be invoked from a source file. There should only be one registration by a given SVC number. SVC number 0 (zero) is invalid input and will cause a compile time assertion.
- Parameters
-
[in] name Name of the structure. Logically accessible from the source file. [in] svc_number SVC number to register. [in] func Function to call for a given SVC number.
- Return values
-
Variable registration in Experimental: Section variables named svc_data.
| #define NRF_SVCI_FUNCTION_REGISTER | ( | svci_number, | |
| name, | |||
| func | |||
| ) |
Value:
{ \
.svc_num =
NRF_SVCI_SVC_NUM
, \
.svci_num = svci_number, \
.func_ptr = (
nrf_svc_func_t
)func \
}
Macro for registering a structure holding SVC number, SVCI number, and SVCI handler function pointer.
This macro places a variable in a section named "svc_data" that the SVC handler uses during regular operation.
- Note
- This macro must be invoked from a source file. There should only be one registration for a given SVC indirect number.
- Parameters
-
[in] name Name of the structure. Logically accessible from the source file. [in] svci_number SVC indirect number to register. [in] func Function to call for a given SVC indirect number.
- Return values
-
Variable registration in Experimental: Section variables named svc_data.
Typedef Documentation
| typedef uint32_t(* nrf_svc_func_t)() |
Function to be called from an SVC handler.
- Warning
- This function prototype has no arguments. It will be cast to a function prototype that has 0 to 4 arguments. 4 arguments is the highest number of allowed arguments in a Supervisor call.
- The nrf_svc_func_t function prototype should not have void as parameter list as there will be 0 to 4 arguments after casting.