A simple 128x32 graphical LCD program to quickstart with LCD on ARM mbed IoT Starter Kit. This requires mbed Applciation Shield with FRDM-K64F platform.

Dependencies:   C12832

Committer:
tushki7
Date:
Sun Apr 12 15:45:52 2015 +0000
Revision:
1:eb68c94a8ee5
Parent:
0:60d829a0353a
A simple 128x32 LCD program with ARM mbed IoT Starter Kit;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tushki7 0:60d829a0353a 1 /**
tushki7 0:60d829a0353a 2 ******************************************************************************
tushki7 0:60d829a0353a 3 * @file stm32f4xx_hal_hash.h
tushki7 0:60d829a0353a 4 * @author MCD Application Team
tushki7 0:60d829a0353a 5 * @version V1.1.0
tushki7 0:60d829a0353a 6 * @date 19-June-2014
tushki7 0:60d829a0353a 7 * @brief Header file of HASH HAL module.
tushki7 0:60d829a0353a 8 ******************************************************************************
tushki7 0:60d829a0353a 9 * @attention
tushki7 0:60d829a0353a 10 *
tushki7 0:60d829a0353a 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
tushki7 0:60d829a0353a 12 *
tushki7 0:60d829a0353a 13 * Redistribution and use in source and binary forms, with or without modification,
tushki7 0:60d829a0353a 14 * are permitted provided that the following conditions are met:
tushki7 0:60d829a0353a 15 * 1. Redistributions of source code must retain the above copyright notice,
tushki7 0:60d829a0353a 16 * this list of conditions and the following disclaimer.
tushki7 0:60d829a0353a 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
tushki7 0:60d829a0353a 18 * this list of conditions and the following disclaimer in the documentation
tushki7 0:60d829a0353a 19 * and/or other materials provided with the distribution.
tushki7 0:60d829a0353a 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
tushki7 0:60d829a0353a 21 * may be used to endorse or promote products derived from this software
tushki7 0:60d829a0353a 22 * without specific prior written permission.
tushki7 0:60d829a0353a 23 *
tushki7 0:60d829a0353a 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
tushki7 0:60d829a0353a 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
tushki7 0:60d829a0353a 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
tushki7 0:60d829a0353a 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
tushki7 0:60d829a0353a 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
tushki7 0:60d829a0353a 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
tushki7 0:60d829a0353a 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
tushki7 0:60d829a0353a 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
tushki7 0:60d829a0353a 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
tushki7 0:60d829a0353a 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
tushki7 0:60d829a0353a 34 *
tushki7 0:60d829a0353a 35 ******************************************************************************
tushki7 0:60d829a0353a 36 */
tushki7 0:60d829a0353a 37
tushki7 0:60d829a0353a 38 /* Define to prevent recursive inclusion -------------------------------------*/
tushki7 0:60d829a0353a 39 #ifndef __STM32F4xx_HAL_HASH_H
tushki7 0:60d829a0353a 40 #define __STM32F4xx_HAL_HASH_H
tushki7 0:60d829a0353a 41
tushki7 0:60d829a0353a 42 #ifdef __cplusplus
tushki7 0:60d829a0353a 43 extern "C" {
tushki7 0:60d829a0353a 44 #endif
tushki7 0:60d829a0353a 45
tushki7 0:60d829a0353a 46 #if defined(STM32F415xx) || defined(STM32F417xx) || defined(STM32F437xx) || defined(STM32F439xx)
tushki7 0:60d829a0353a 47
tushki7 0:60d829a0353a 48 /* Includes ------------------------------------------------------------------*/
tushki7 0:60d829a0353a 49 #include "stm32f4xx_hal_def.h"
tushki7 0:60d829a0353a 50
tushki7 0:60d829a0353a 51 /** @addtogroup STM32F4xx_HAL_Driver
tushki7 0:60d829a0353a 52 * @{
tushki7 0:60d829a0353a 53 */
tushki7 0:60d829a0353a 54
tushki7 0:60d829a0353a 55 /** @addtogroup HASH
tushki7 0:60d829a0353a 56 * @{
tushki7 0:60d829a0353a 57 */
tushki7 0:60d829a0353a 58
tushki7 0:60d829a0353a 59 /* Exported types ------------------------------------------------------------*/
tushki7 0:60d829a0353a 60
tushki7 0:60d829a0353a 61 /**
tushki7 0:60d829a0353a 62 * @brief HASH Configuration Structure definition
tushki7 0:60d829a0353a 63 */
tushki7 0:60d829a0353a 64 typedef struct
tushki7 0:60d829a0353a 65 {
tushki7 0:60d829a0353a 66 uint32_t DataType; /*!< 32-bit data, 16-bit data, 8-bit data or 1-bit string.
tushki7 0:60d829a0353a 67 This parameter can be a value of @ref HASH_Data_Type */
tushki7 0:60d829a0353a 68
tushki7 0:60d829a0353a 69 uint32_t KeySize; /*!< The key size is used only in HMAC operation */
tushki7 0:60d829a0353a 70
tushki7 0:60d829a0353a 71 uint8_t* pKey; /*!< The key is used only in HMAC operation */
tushki7 0:60d829a0353a 72 }HASH_InitTypeDef;
tushki7 0:60d829a0353a 73
tushki7 0:60d829a0353a 74 /**
tushki7 0:60d829a0353a 75 * @brief HAL State structures definition
tushki7 0:60d829a0353a 76 */
tushki7 0:60d829a0353a 77 typedef enum
tushki7 0:60d829a0353a 78 {
tushki7 0:60d829a0353a 79 HAL_HASH_STATE_RESET = 0x00, /*!< HASH not yet initialized or disabled */
tushki7 0:60d829a0353a 80 HAL_HASH_STATE_READY = 0x01, /*!< HASH initialized and ready for use */
tushki7 0:60d829a0353a 81 HAL_HASH_STATE_BUSY = 0x02, /*!< HASH internal process is ongoing */
tushki7 0:60d829a0353a 82 HAL_HASH_STATE_TIMEOUT = 0x03, /*!< HASH timeout state */
tushki7 0:60d829a0353a 83 HAL_HASH_STATE_ERROR = 0x04 /*!< HASH error state */
tushki7 0:60d829a0353a 84 }HAL_HASH_STATETypeDef;
tushki7 0:60d829a0353a 85
tushki7 0:60d829a0353a 86 /**
tushki7 0:60d829a0353a 87 * @brief HAL phase structures definition
tushki7 0:60d829a0353a 88 */
tushki7 0:60d829a0353a 89 typedef enum
tushki7 0:60d829a0353a 90 {
tushki7 0:60d829a0353a 91 HAL_HASH_PHASE_READY = 0x01, /*!< HASH peripheral is ready for initialization */
tushki7 0:60d829a0353a 92 HAL_HASH_PHASE_PROCESS = 0x02, /*!< HASH peripheral is in processing phase */
tushki7 0:60d829a0353a 93 }HAL_HASHPhaseTypeDef;
tushki7 0:60d829a0353a 94
tushki7 0:60d829a0353a 95 /**
tushki7 0:60d829a0353a 96 * @brief HASH Handle Structure definition
tushki7 0:60d829a0353a 97 */
tushki7 0:60d829a0353a 98 typedef struct
tushki7 0:60d829a0353a 99 {
tushki7 0:60d829a0353a 100 HASH_InitTypeDef Init; /*!< HASH required parameters */
tushki7 0:60d829a0353a 101
tushki7 0:60d829a0353a 102 uint8_t *pHashInBuffPtr; /*!< Pointer to input buffer */
tushki7 0:60d829a0353a 103
tushki7 0:60d829a0353a 104 uint8_t *pHashOutBuffPtr; /*!< Pointer to input buffer */
tushki7 0:60d829a0353a 105
tushki7 0:60d829a0353a 106 __IO uint32_t HashBuffSize; /*!< Size of buffer to be processed */
tushki7 0:60d829a0353a 107
tushki7 0:60d829a0353a 108 __IO uint32_t HashInCount; /*!< Counter of inputed data */
tushki7 0:60d829a0353a 109
tushki7 0:60d829a0353a 110 __IO uint32_t HashITCounter; /*!< Counter of issued interrupts */
tushki7 0:60d829a0353a 111
tushki7 0:60d829a0353a 112 HAL_StatusTypeDef Status; /*!< HASH peripheral status */
tushki7 0:60d829a0353a 113
tushki7 0:60d829a0353a 114 HAL_HASHPhaseTypeDef Phase; /*!< HASH peripheral phase */
tushki7 0:60d829a0353a 115
tushki7 0:60d829a0353a 116 DMA_HandleTypeDef *hdmain; /*!< HASH In DMA handle parameters */
tushki7 0:60d829a0353a 117
tushki7 0:60d829a0353a 118 HAL_LockTypeDef Lock; /*!< HASH locking object */
tushki7 0:60d829a0353a 119
tushki7 0:60d829a0353a 120 __IO HAL_HASH_STATETypeDef State; /*!< HASH peripheral state */
tushki7 0:60d829a0353a 121 } HASH_HandleTypeDef;
tushki7 0:60d829a0353a 122
tushki7 0:60d829a0353a 123 /* Exported constants --------------------------------------------------------*/
tushki7 0:60d829a0353a 124
tushki7 0:60d829a0353a 125 /** @defgroup HASH_Exported_Constants
tushki7 0:60d829a0353a 126 * @{
tushki7 0:60d829a0353a 127 */
tushki7 0:60d829a0353a 128
tushki7 0:60d829a0353a 129 /** @defgroup HASH_Algo_Selection
tushki7 0:60d829a0353a 130 * @{
tushki7 0:60d829a0353a 131 */
tushki7 0:60d829a0353a 132 #define HASH_AlgoSelection_SHA1 ((uint32_t)0x0000) /*!< HASH function is SHA1 */
tushki7 0:60d829a0353a 133 #define HASH_AlgoSelection_SHA224 HASH_CR_ALGO_1 /*!< HASH function is SHA224 */
tushki7 0:60d829a0353a 134 #define HASH_AlgoSelection_SHA256 HASH_CR_ALGO /*!< HASH function is SHA256 */
tushki7 0:60d829a0353a 135 #define HASH_AlgoSelection_MD5 HASH_CR_ALGO_0 /*!< HASH function is MD5 */
tushki7 0:60d829a0353a 136
tushki7 0:60d829a0353a 137 #define IS_HASH_ALGOSELECTION(ALGOSELECTION) (((ALGOSELECTION) == HASH_AlgoSelection_SHA1) || \
tushki7 0:60d829a0353a 138 ((ALGOSELECTION) == HASH_AlgoSelection_SHA224) || \
tushki7 0:60d829a0353a 139 ((ALGOSELECTION) == HASH_AlgoSelection_SHA256) || \
tushki7 0:60d829a0353a 140 ((ALGOSELECTION) == HASH_AlgoSelection_MD5))
tushki7 0:60d829a0353a 141 /**
tushki7 0:60d829a0353a 142 * @}
tushki7 0:60d829a0353a 143 */
tushki7 0:60d829a0353a 144
tushki7 0:60d829a0353a 145 /** @defgroup HASH_Algorithm_Mode
tushki7 0:60d829a0353a 146 * @{
tushki7 0:60d829a0353a 147 */
tushki7 0:60d829a0353a 148 #define HASH_AlgoMode_HASH ((uint32_t)0x00000000) /*!< Algorithm is HASH */
tushki7 0:60d829a0353a 149 #define HASH_AlgoMode_HMAC HASH_CR_MODE /*!< Algorithm is HMAC */
tushki7 0:60d829a0353a 150
tushki7 0:60d829a0353a 151 #define IS_HASH_ALGOMODE(ALGOMODE) (((ALGOMODE) == HASH_AlgoMode_HASH) || \
tushki7 0:60d829a0353a 152 ((ALGOMODE) == HASH_AlgoMode_HMAC))
tushki7 0:60d829a0353a 153 /**
tushki7 0:60d829a0353a 154 * @}
tushki7 0:60d829a0353a 155 */
tushki7 0:60d829a0353a 156
tushki7 0:60d829a0353a 157 /** @defgroup HASH_Data_Type
tushki7 0:60d829a0353a 158 * @{
tushki7 0:60d829a0353a 159 */
tushki7 0:60d829a0353a 160 #define HASH_DATATYPE_32B ((uint32_t)0x0000) /*!< 32-bit data. No swapping */
tushki7 0:60d829a0353a 161 #define HASH_DATATYPE_16B HASH_CR_DATATYPE_0 /*!< 16-bit data. Each half word is swapped */
tushki7 0:60d829a0353a 162 #define HASH_DATATYPE_8B HASH_CR_DATATYPE_1 /*!< 8-bit data. All bytes are swapped */
tushki7 0:60d829a0353a 163 #define HASH_DATATYPE_1B HASH_CR_DATATYPE /*!< 1-bit data. In the word all bits are swapped */
tushki7 0:60d829a0353a 164
tushki7 0:60d829a0353a 165 #define IS_HASH_DATATYPE(DATATYPE) (((DATATYPE) == HASH_DATATYPE_32B)|| \
tushki7 0:60d829a0353a 166 ((DATATYPE) == HASH_DATATYPE_16B)|| \
tushki7 0:60d829a0353a 167 ((DATATYPE) == HASH_DATATYPE_8B) || \
tushki7 0:60d829a0353a 168 ((DATATYPE) == HASH_DATATYPE_1B))
tushki7 0:60d829a0353a 169 /**
tushki7 0:60d829a0353a 170 * @}
tushki7 0:60d829a0353a 171 */
tushki7 0:60d829a0353a 172
tushki7 0:60d829a0353a 173 /** @defgroup HASH_HMAC_Long_key_only_for_HMAC_mode
tushki7 0:60d829a0353a 174 * @{
tushki7 0:60d829a0353a 175 */
tushki7 0:60d829a0353a 176 #define HASH_HMACKeyType_ShortKey ((uint32_t)0x00000000) /*!< HMAC Key is <= 64 bytes */
tushki7 0:60d829a0353a 177 #define HASH_HMACKeyType_LongKey HASH_CR_LKEY /*!< HMAC Key is > 64 bytes */
tushki7 0:60d829a0353a 178
tushki7 0:60d829a0353a 179 #define IS_HASH_HMAC_KEYTYPE(KEYTYPE) (((KEYTYPE) == HASH_HMACKeyType_ShortKey) || \
tushki7 0:60d829a0353a 180 ((KEYTYPE) == HASH_HMACKeyType_LongKey))
tushki7 0:60d829a0353a 181 /**
tushki7 0:60d829a0353a 182 * @}
tushki7 0:60d829a0353a 183 */
tushki7 0:60d829a0353a 184
tushki7 0:60d829a0353a 185 /** @defgroup HASH_flags_definition
tushki7 0:60d829a0353a 186 * @{
tushki7 0:60d829a0353a 187 */
tushki7 0:60d829a0353a 188 #define HASH_FLAG_DINIS HASH_SR_DINIS /*!< 16 locations are free in the DIN : A new block can be entered into the input buffer */
tushki7 0:60d829a0353a 189 #define HASH_FLAG_DCIS HASH_SR_DCIS /*!< Digest calculation complete */
tushki7 0:60d829a0353a 190 #define HASH_FLAG_DMAS HASH_SR_DMAS /*!< DMA interface is enabled (DMAE=1) or a transfer is ongoing */
tushki7 0:60d829a0353a 191 #define HASH_FLAG_BUSY HASH_SR_BUSY /*!< The hash core is Busy : processing a block of data */
tushki7 0:60d829a0353a 192 #define HASH_FLAG_DINNE HASH_CR_DINNE /*!< DIN not empty : The input buffer contains at least one word of data */
tushki7 0:60d829a0353a 193 /**
tushki7 0:60d829a0353a 194 * @}
tushki7 0:60d829a0353a 195 */
tushki7 0:60d829a0353a 196
tushki7 0:60d829a0353a 197 /** @defgroup HASH_interrupts_definition
tushki7 0:60d829a0353a 198 * @{
tushki7 0:60d829a0353a 199 */
tushki7 0:60d829a0353a 200 #define HASH_IT_DINI HASH_IMR_DINIM /*!< A new block can be entered into the input buffer (DIN) */
tushki7 0:60d829a0353a 201 #define HASH_IT_DCI HASH_IMR_DCIM /*!< Digest calculation complete */
tushki7 0:60d829a0353a 202 /**
tushki7 0:60d829a0353a 203 * @}
tushki7 0:60d829a0353a 204 */
tushki7 0:60d829a0353a 205
tushki7 0:60d829a0353a 206 /**
tushki7 0:60d829a0353a 207 * @}
tushki7 0:60d829a0353a 208 */
tushki7 0:60d829a0353a 209
tushki7 0:60d829a0353a 210 /* Exported macro ------------------------------------------------------------*/
tushki7 0:60d829a0353a 211
tushki7 0:60d829a0353a 212 /** @brief Reset HASH handle state
tushki7 0:60d829a0353a 213 * @param __HANDLE__: specifies the HASH handle.
tushki7 0:60d829a0353a 214 * @retval None
tushki7 0:60d829a0353a 215 */
tushki7 0:60d829a0353a 216 #define __HAL_HASH_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_HASH_STATE_RESET)
tushki7 0:60d829a0353a 217
tushki7 0:60d829a0353a 218 /** @brief Check whether the specified HASH flag is set or not.
tushki7 0:60d829a0353a 219 * @param __FLAG__: specifies the flag to check.
tushki7 0:60d829a0353a 220 * This parameter can be one of the following values:
tushki7 0:60d829a0353a 221 * @arg HASH_FLAG_DINIS: A new block can be entered into the input buffer.
tushki7 0:60d829a0353a 222 * @arg HASH_FLAG_DCIS: Digest calculation complete
tushki7 0:60d829a0353a 223 * @arg HASH_FLAG_DMAS: DMA interface is enabled (DMAE=1) or a transfer is ongoing
tushki7 0:60d829a0353a 224 * @arg HASH_FLAG_BUSY: The hash core is Busy : processing a block of data
tushki7 0:60d829a0353a 225 * @arg HASH_FLAG_DINNE: DIN not empty : The input buffer contains at least one word of data
tushki7 0:60d829a0353a 226 * @retval The new state of __FLAG__ (TRUE or FALSE).
tushki7 0:60d829a0353a 227 */
tushki7 0:60d829a0353a 228 #define __HAL_HASH_GET_FLAG(__FLAG__) ((HASH->SR & (__FLAG__)) == (__FLAG__))
tushki7 0:60d829a0353a 229
tushki7 0:60d829a0353a 230 /**
tushki7 0:60d829a0353a 231 * @brief Macros for HMAC finish.
tushki7 0:60d829a0353a 232 * @param None
tushki7 0:60d829a0353a 233 * @retval None
tushki7 0:60d829a0353a 234 */
tushki7 0:60d829a0353a 235 #define HAL_HMAC_MD5_Finish HAL_HASH_MD5_Finish
tushki7 0:60d829a0353a 236 #define HAL_HMAC_SHA1_Finish HAL_HASH_SHA1_Finish
tushki7 0:60d829a0353a 237 #define HAL_HMAC_SHA224_Finish HAL_HASH_SHA224_Finish
tushki7 0:60d829a0353a 238 #define HAL_HMAC_SHA256_Finish HAL_HASH_SHA256_Finish
tushki7 0:60d829a0353a 239
tushki7 0:60d829a0353a 240 /**
tushki7 0:60d829a0353a 241 * @brief Enable the multiple DMA mode.
tushki7 0:60d829a0353a 242 * This feature is available only in STM32F429x and STM32F439x devices.
tushki7 0:60d829a0353a 243 * @param None
tushki7 0:60d829a0353a 244 * @retval None
tushki7 0:60d829a0353a 245 */
tushki7 0:60d829a0353a 246 #define __HAL_HASH_SET_MDMAT() HASH->CR |= HASH_CR_MDMAT
tushki7 0:60d829a0353a 247
tushki7 0:60d829a0353a 248 /**
tushki7 0:60d829a0353a 249 * @brief Disable the multiple DMA mode.
tushki7 0:60d829a0353a 250 * @param None
tushki7 0:60d829a0353a 251 * @retval None
tushki7 0:60d829a0353a 252 */
tushki7 0:60d829a0353a 253 #define __HAL_HASH_RESET_MDMAT() HASH->CR &= (uint32_t)(~HASH_CR_MDMAT)
tushki7 0:60d829a0353a 254
tushki7 0:60d829a0353a 255 /**
tushki7 0:60d829a0353a 256 * @brief Start the digest computation
tushki7 0:60d829a0353a 257 * @param None
tushki7 0:60d829a0353a 258 * @retval None
tushki7 0:60d829a0353a 259 */
tushki7 0:60d829a0353a 260 #define __HAL_HASH_START_DIGEST() HASH->STR |= HASH_STR_DCAL
tushki7 0:60d829a0353a 261
tushki7 0:60d829a0353a 262 /**
tushki7 0:60d829a0353a 263 * @brief Set the number of valid bits in last word written in Data register
tushki7 0:60d829a0353a 264 * @param SIZE: size in byte of last data written in Data register.
tushki7 0:60d829a0353a 265 * @retval None
tushki7 0:60d829a0353a 266 */
tushki7 0:60d829a0353a 267 #define __HAL_HASH_SET_NBVALIDBITS(SIZE) do{HASH->STR &= ~(HASH_STR_NBW);\
tushki7 0:60d829a0353a 268 HASH->STR |= 8 * ((SIZE) % 4);\
tushki7 0:60d829a0353a 269 }while(0)
tushki7 0:60d829a0353a 270
tushki7 0:60d829a0353a 271 /* Include HASH HAL Extension module */
tushki7 0:60d829a0353a 272 #include "stm32f4xx_hal_hash_ex.h"
tushki7 0:60d829a0353a 273
tushki7 0:60d829a0353a 274 /* Exported functions --------------------------------------------------------*/
tushki7 0:60d829a0353a 275
tushki7 0:60d829a0353a 276 /* Initialization and de-initialization functions **********************************/
tushki7 0:60d829a0353a 277 HAL_StatusTypeDef HAL_HASH_Init(HASH_HandleTypeDef *hhash);
tushki7 0:60d829a0353a 278 HAL_StatusTypeDef HAL_HASH_DeInit(HASH_HandleTypeDef *hhash);
tushki7 0:60d829a0353a 279
tushki7 0:60d829a0353a 280 /* HASH processing using polling *********************************************/
tushki7 0:60d829a0353a 281 HAL_StatusTypeDef HAL_HASH_SHA1_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
tushki7 0:60d829a0353a 282 HAL_StatusTypeDef HAL_HASH_MD5_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
tushki7 0:60d829a0353a 283 HAL_StatusTypeDef HAL_HASH_MD5_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
tushki7 0:60d829a0353a 284 HAL_StatusTypeDef HAL_HASH_SHA1_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
tushki7 0:60d829a0353a 285
tushki7 0:60d829a0353a 286 /* HASH-MAC processing using polling *****************************************/
tushki7 0:60d829a0353a 287 HAL_StatusTypeDef HAL_HMAC_SHA1_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
tushki7 0:60d829a0353a 288 HAL_StatusTypeDef HAL_HMAC_MD5_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
tushki7 0:60d829a0353a 289
tushki7 0:60d829a0353a 290 /* HASH processing using interrupt *******************************************/
tushki7 0:60d829a0353a 291 HAL_StatusTypeDef HAL_HASH_SHA1_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);
tushki7 0:60d829a0353a 292 HAL_StatusTypeDef HAL_HASH_MD5_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);
tushki7 0:60d829a0353a 293
tushki7 0:60d829a0353a 294 /* HASH processing using DMA *************************************************/
tushki7 0:60d829a0353a 295 HAL_StatusTypeDef HAL_HASH_SHA1_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
tushki7 0:60d829a0353a 296 HAL_StatusTypeDef HAL_HASH_SHA1_Finish(HASH_HandleTypeDef *hhash, uint8_t* pOutBuffer, uint32_t Timeout);
tushki7 0:60d829a0353a 297 HAL_StatusTypeDef HAL_HASH_MD5_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
tushki7 0:60d829a0353a 298 HAL_StatusTypeDef HAL_HASH_MD5_Finish(HASH_HandleTypeDef *hhash, uint8_t* pOutBuffer, uint32_t Timeout);
tushki7 0:60d829a0353a 299
tushki7 0:60d829a0353a 300 /* HASH-HMAC processing using DMA ********************************************/
tushki7 0:60d829a0353a 301 HAL_StatusTypeDef HAL_HMAC_SHA1_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
tushki7 0:60d829a0353a 302 HAL_StatusTypeDef HAL_HMAC_MD5_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
tushki7 0:60d829a0353a 303
tushki7 0:60d829a0353a 304 /* Processing functions ******************************************************/
tushki7 0:60d829a0353a 305 void HAL_HASH_IRQHandler(HASH_HandleTypeDef *hhash);
tushki7 0:60d829a0353a 306
tushki7 0:60d829a0353a 307 /* Peripheral State functions ************************************************/
tushki7 0:60d829a0353a 308 HAL_HASH_STATETypeDef HAL_HASH_GetState(HASH_HandleTypeDef *hhash);
tushki7 0:60d829a0353a 309 void HAL_HASH_MspInit(HASH_HandleTypeDef *hhash);
tushki7 0:60d829a0353a 310 void HAL_HASH_MspDeInit(HASH_HandleTypeDef *hhash);
tushki7 0:60d829a0353a 311 void HAL_HASH_InCpltCallback(HASH_HandleTypeDef *hhash);
tushki7 0:60d829a0353a 312 void HAL_HASH_DgstCpltCallback(HASH_HandleTypeDef *hhash);
tushki7 0:60d829a0353a 313 void HAL_HASH_ErrorCallback(HASH_HandleTypeDef *hhash);
tushki7 0:60d829a0353a 314
tushki7 0:60d829a0353a 315 #endif /* STM32F415xx || STM32F417xx || STM32F437xx || STM32F439xx */
tushki7 0:60d829a0353a 316 /**
tushki7 0:60d829a0353a 317 * @}
tushki7 0:60d829a0353a 318 */
tushki7 0:60d829a0353a 319
tushki7 0:60d829a0353a 320 /**
tushki7 0:60d829a0353a 321 * @}
tushki7 0:60d829a0353a 322 */
tushki7 0:60d829a0353a 323
tushki7 0:60d829a0353a 324 #ifdef __cplusplus
tushki7 0:60d829a0353a 325 }
tushki7 0:60d829a0353a 326 #endif
tushki7 0:60d829a0353a 327
tushki7 0:60d829a0353a 328
tushki7 0:60d829a0353a 329 #endif /* __STM32F4xx_HAL_HASH_H */
tushki7 0:60d829a0353a 330
tushki7 0:60d829a0353a 331 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/