Macros to create Supervisor functions.
More...
|
struct | nrf_svc_func_reg_t |
| Type holding the SVC number, SVCI number, and the pointer to the corresponding handler function. More...
|
|
Macros to create Supervisor functions.
#define NRF_SVC_FUNCTION_REGISTER |
( |
|
svc_number, |
|
|
|
name, |
|
|
|
func |
|
) |
| |
Value:
{ \
.svc_num = svc_number, \
}
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
-
#define NRF_SVCI_FUNCTION_REGISTER |
( |
|
svci_number, |
|
|
|
name, |
|
|
|
func |
|
) |
| |
Value:
{ \
.svci_num = svci_number, \
}
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
-
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.