STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
Initialization and de-initialization functions

Initialization, configuration and call-back functions. More...

Collaboration diagram for Initialization and de-initialization functions:

Functions

HAL_StatusTypeDef HAL_HASH_Init (HASH_HandleTypeDef *hhash)
 Initialize the HASH according to the specified parameters in the HASH_HandleTypeDef and create the associated handle.
 
HAL_StatusTypeDef HAL_HASH_DeInit (HASH_HandleTypeDef *hhash)
 DeInitialize the HASH peripheral.
 
void HAL_HASH_MspInit (HASH_HandleTypeDef *hhash)
 Initialize the HASH MSP.
 
void HAL_HASH_MspDeInit (HASH_HandleTypeDef *hhash)
 DeInitialize the HASH MSP.
 
void HAL_HASH_InCpltCallback (HASH_HandleTypeDef *hhash)
 Input data transfer complete call back.
 
void HAL_HASH_DgstCpltCallback (HASH_HandleTypeDef *hhash)
 Digest computation complete call back.
 
void HAL_HASH_ErrorCallback (HASH_HandleTypeDef *hhash)
 Error callback.
 

Detailed Description

Initialization, configuration and call-back functions.

 ===============================================================================
              ##### Initialization and de-initialization functions #####
 ===============================================================================
    [..]  This section provides functions allowing to:
      (+) Initialize the HASH according to the specified parameters
          in the HASH_InitTypeDef and create the associated handle
      (+) DeInitialize the HASH peripheral
      (+) Initialize the HASH MCU Specific Package (MSP)
      (+) DeInitialize the HASH MSP

    [..]  This section provides as well call back functions definitions for user
          code to manage:
      (+) Input data transfer to Peripheral completion
      (+) Calculated digest retrieval completion
      (+) Error management

Function Documentation

◆ HAL_HASH_Init()

HAL_StatusTypeDef HAL_HASH_Init ( HASH_HandleTypeDef * hhash)

#include <stm32f4xx_hal_hash.h>

Initialize the HASH according to the specified parameters in the HASH_HandleTypeDef and create the associated handle.

Note
Only MDMAT and DATATYPE bits of HASH Peripheral are set by HAL_HASH_Init(), other configuration bits are set by HASH or HMAC processing APIs.
MDMAT bit is systematically reset by HAL_HASH_Init(). To set it for multi-buffer HASH processing, user needs to resort to __HAL_HASH_SET_MDMAT() macro. For HMAC multi-buffer processing, the relevant APIs manage themselves the MDMAT bit.
Parameters
hhashHASH handle
Return values
HALstatus

Definition at line 328 of file stm32f4xx_hal_hash.c.

References __HAL_HASH_RESET_MDMAT, assert_param, HASH_InitTypeDef::DataType, HASH_HandleTypeDef::DigestCalculationDisable, HASH_HandleTypeDef::ErrorCode, HAL_ERROR, HAL_HASH_DgstCpltCallback(), HAL_HASH_ERROR_NONE, HAL_HASH_ErrorCallback(), HAL_HASH_InCpltCallback(), HAL_HASH_MspInit(), HAL_HASH_PHASE_READY, HAL_HASH_STATE_BUSY, HAL_HASH_STATE_READY, HAL_HASH_STATE_RESET, HAL_HASH_SUSPEND_NONE, HAL_OK, HAL_UNLOCKED, HASH_HandleTypeDef::HashBuffSize, HASH_HandleTypeDef::HashInCount, HASH_HandleTypeDef::HashITCounter, HASH_HandleTypeDef::Init, IS_HASH_DATATYPE, HASH_HandleTypeDef::Lock, HASH_HandleTypeDef::NbWordsAlreadyPushed, HASH_HandleTypeDef::Phase, HASH_HandleTypeDef::State, HASH_HandleTypeDef::Status, and HASH_HandleTypeDef::SuspendRequest.

◆ HAL_HASH_DeInit()

◆ HAL_HASH_MspInit()

__weak void HAL_HASH_MspInit ( HASH_HandleTypeDef * hhash)

#include <stm32f4xx_hal_hash.h>

Initialize the HASH MSP.

Parameters
hhashHASH handle.
Return values
None

Definition at line 464 of file stm32f4xx_hal_hash.c.

References UNUSED.

Referenced by HAL_HASH_Init().

◆ HAL_HASH_MspDeInit()

__weak void HAL_HASH_MspDeInit ( HASH_HandleTypeDef * hhash)

#include <stm32f4xx_hal_hash.h>

DeInitialize the HASH MSP.

Parameters
hhashHASH handle.
Return values
None

Definition at line 479 of file stm32f4xx_hal_hash.c.

References UNUSED.

Referenced by HAL_HASH_DeInit().

◆ HAL_HASH_InCpltCallback()

__weak void HAL_HASH_InCpltCallback ( HASH_HandleTypeDef * hhash)

#include <stm32f4xx_hal_hash.h>

Input data transfer complete call back.

Note
HAL_HASH_InCpltCallback() is called when the complete input message has been fed to the Peripheral. This API is invoked only when input data are entered under interruption or through DMA.
In case of HASH or HMAC multi-buffer DMA feeding case (MDMAT bit set), HAL_HASH_InCpltCallback() is called at the end of each buffer feeding to the Peripheral.
Parameters
hhashHASH handle.
Return values
None

Definition at line 500 of file stm32f4xx_hal_hash.c.

References UNUSED.

Referenced by HAL_HASH_Init(), HASH_DMAXferCplt(), HASH_IT(), and HASH_Write_Block_Data().

◆ HAL_HASH_DgstCpltCallback()

__weak void HAL_HASH_DgstCpltCallback ( HASH_HandleTypeDef * hhash)

#include <stm32f4xx_hal_hash.h>

Digest computation complete call back.

Note
HAL_HASH_DgstCpltCallback() is used under interruption, is not relevant with DMA.
Parameters
hhashHASH handle.
Return values
None

Definition at line 517 of file stm32f4xx_hal_hash.c.

References UNUSED.

Referenced by HAL_HASH_Init(), and HASH_IT().

◆ HAL_HASH_ErrorCallback()

__weak void HAL_HASH_ErrorCallback ( HASH_HandleTypeDef * hhash)

#include <stm32f4xx_hal_hash.h>

Error callback.

Note
Code user can resort to hhash->Status (HAL_ERROR, HAL_TIMEOUT,...) to retrieve the error type.
Parameters
hhashHASH handle.
Return values
None

Definition at line 534 of file stm32f4xx_hal_hash.c.

References UNUSED.

Referenced by HAL_HASH_Init(), HAL_HASH_IRQHandler(), and HASH_DMAError().