STM32F4 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F4 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
Context swapping functions

Context swapping functions. More...

Functions

void HASH_SaveContext (HASH_Context *HASH_ContextSave)
 Save the Hash peripheral Context. More...
 
void HASH_RestoreContext (HASH_Context *HASH_ContextRestore)
 Restore the Hash peripheral Context. More...
 

Detailed Description

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.
  
  1. To save the current context, use HASH_SaveContext() function
  2. To restore the saved context, use HASH_RestoreContext() function 

Function Documentation

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
None
void HASH_SaveContext ( HASH_Context HASH_ContextSave)

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
None