Description
Secure Element Manager Core API.
API for initialization of SE Manager and SE command context with yield attribute.
Data Structures |
|
struct | sl_se_command_context_t |
SE mailbox command context.
|
|
Functions |
|
sl_status_t | sl_se_init (void) |
Initialize the SE Manager.
|
|
sl_status_t | sl_se_deinit (void) |
Denitialize the SE Manager.
|
|
sl_status_t | sl_se_init_command_context ( sl_se_command_context_t *cmd_ctx) |
Initialize an SE command context object.
|
|
sl_status_t | sl_se_deinit_command_context ( sl_se_command_context_t *cmd_ctx) |
De-initialize an SE command context.
|
|
sl_status_t | sl_se_set_yield ( sl_se_command_context_t *cmd_ctx, bool yield) |
Set the yield attribute of the SE command context object.
|
|
sl_status_t | sl_se_read_executed_command ( sl_se_command_context_t *cmd_ctx) |
From VSE mailbox read which command, if any, was executed.
|
|
sl_status_t | sl_se_ack_command ( sl_se_command_context_t *cmd_ctx) |
Acknowledge and get status and output data of a completed command.
|
|
Macros |
|
#define | SL_SE_COMMAND_CONTEXT_INIT { SE_COMMAND_DEFAULT(0), false } |
Context initialization values.
|
|
Function Documentation
◆ sl_se_init()
sl_status_t sl_se_init | ( | void |
|
) |
Initialize the SE Manager.
Initialize the SE Manager by checking hardware availability and setting up internal module specific resources like mutexes etc.
- Returns
- Status code, sl_status.h.
◆ sl_se_deinit()
sl_status_t sl_se_deinit | ( | void |
|
) |
Denitialize the SE Manager.
Free resources held by the SE Manager.
- Returns
- Status code, sl_status.h.
◆ sl_se_init_command_context()
sl_status_t sl_se_init_command_context | ( | sl_se_command_context_t * |
cmd_ctx
|
) |
Initialize an SE command context object.
Initialize an SE command context which can be used in subsequent calls to the SE Manager API in order to execute SE mailbox commands.
- Parameters
-
[in,out] cmd_ctx
Pointer to an SE command context object to be initialized. This context object should be used in subsequent calls to the SE Manager API in order to execute SE mailbox commands. The same command context object cannot be used concurrently, e.g. by two different threads. However a command context object may be reused for the next and any subsequent mailbox operatons, except when streaming commands are in progress in which case only streaming commands of the same operation type is allowed until the streaming operation is finished (i.e. the corresponding sl_se_xxx_finish is called).
- Returns
- Status code, sl_status.h.
◆ sl_se_deinit_command_context()
sl_status_t sl_se_deinit_command_context | ( | sl_se_command_context_t * |
cmd_ctx
|
) |
De-initialize an SE command context.
De-initialize an SE command context object.
- Parameters
-
[in,out] cmd_ctx
Pointer to an SE command context object to deinitialize.
- Returns
- Status code, sl_status.h.
◆ sl_se_set_yield()
sl_status_t sl_se_set_yield | ( | sl_se_command_context_t * |
cmd_ctx,
|
bool |
yield
|
||
) |
Set the yield attribute of the SE command context object.
- Parameters
-
[in,out] cmd_ctx
Pointer to an SE command context object. [in] yield
The user may set this parameter to true in order to tell the SE Manager to yield the cpu core while waiting for the SE mailbox command to complete. If false, the SE Manager will busy-wait, by polling the SE mailbox response register until the SE mailbox command completes.
- Returns
- Status code, sl_status.h.
◆ sl_se_read_executed_command()
sl_status_t sl_se_read_executed_command | ( | sl_se_command_context_t * |
cmd_ctx
|
) |
From VSE mailbox read which command, if any, was executed.
- Parameters
-
[in,out] cmd_ctx
Pointer to an SE command context object. If this function returns SL_STATUS_OK the command word of the SE command context object will be set.
- Returns
- Status code, sl_status.h.
◆ sl_se_ack_command()
sl_status_t sl_se_ack_command | ( | sl_se_command_context_t * |
cmd_ctx
|
) |
Acknowledge and get status and output data of a completed command.
This function acknowledges and gets the status and output data of a completed mailbox command. The acknowledge operation invalidates the contents of the output mailbox. The output data is copied into the linked list of output buffers pointed to in the given command data structure.
- Parameters
-
[in,out] cmd_ctx
Pointer to an SE command context object.
- Returns
- Status code, sl_status.h.
Macro Definition Documentation
◆ SL_SE_COMMAND_CONTEXT_INIT
#define SL_SE_COMMAND_CONTEXT_INIT { SE_COMMAND_DEFAULT(0), false } |
Context initialization values.
Some of the context values are not fully initialized. The user will need to call the corresponding initialization function in order to fully initialize the context objects for further use in the SE Manager API. The purpose of these initialization values is to set the context objects to a known safe state initially when the context object is declared.