Context swapping functions.
More...
Context swapping functions.
===============================================================================
##### Context swapping functions #####
===============================================================================
[..] This section provides functions allowing to save and store HASH Context
[..] It is possible to interrupt a HASH/HMAC process to perform another processing
with a higher priority, and to complete the interrupted process later on, when
the higher priority task is complete. To do so, the context of the interrupted
task must be saved from the HASH registers to memory, and then be restored
from memory to the HASH registers.
(#) To save the current context, use HASH_SaveContext() function
(#) To restore the saved context, use HASH_RestoreContext() function
void HASH_RestoreContext |
( |
HASH_Context * |
HASH_ContextRestore | ) |
|
Restore the Hash peripheral Context.
- Note
- After calling this function, user can restart the processing from the point where it has been interrupted.
- Parameters
-
HASH_ContextRestore | pointer to a HASH_Context structure that contains the repository for saved context. |
- Return values
-
Definition at line 418 of file stm32f4xx_hash.c.
Save the Hash peripheral Context.
- Note
- The context can be saved only when no block is currently being processed. So user must wait for DINIS = 1 (the last block has been processed and the input FIFO is empty) or NBW != 0 (the FIFO is not full and no processing is ongoing).
- Parameters
-
HASH_ContextSave | pointer to a HASH_Context structure that contains the repository for current context. |
- Return values
-
Definition at line 396 of file stm32f4xx_hash.c.