Fawwaz Nadzmy / mbed-STM

Fork of mbed-dev by mbed official

Committer:
<>
Date:
Fri Oct 28 11:17:30 2016 +0100
Revision:
149:156823d33999
This updates the lib to the mbed lib v128

NOTE: This release includes a restructuring of the file and directory locations and thus some
include paths in your code may need updating accordingly.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 149:156823d33999 1 /**
<> 149:156823d33999 2 ******************************************************************************
<> 149:156823d33999 3 * @file stm32l1xx_hal_cryp.h
<> 149:156823d33999 4 * @author MCD Application Team
<> 149:156823d33999 5 * @version V1.2.0
<> 149:156823d33999 6 * @date 01-July-2016
<> 149:156823d33999 7 * @brief Header file of CRYP HAL module.
<> 149:156823d33999 8 ******************************************************************************
<> 149:156823d33999 9 * @attention
<> 149:156823d33999 10 *
<> 149:156823d33999 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
<> 149:156823d33999 12 *
<> 149:156823d33999 13 * Redistribution and use in source and binary forms, with or without modification,
<> 149:156823d33999 14 * are permitted provided that the following conditions are met:
<> 149:156823d33999 15 * 1. Redistributions of source code must retain the above copyright notice,
<> 149:156823d33999 16 * this list of conditions and the following disclaimer.
<> 149:156823d33999 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
<> 149:156823d33999 18 * this list of conditions and the following disclaimer in the documentation
<> 149:156823d33999 19 * and/or other materials provided with the distribution.
<> 149:156823d33999 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
<> 149:156823d33999 21 * may be used to endorse or promote products derived from this software
<> 149:156823d33999 22 * without specific prior written permission.
<> 149:156823d33999 23 *
<> 149:156823d33999 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
<> 149:156823d33999 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
<> 149:156823d33999 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 149:156823d33999 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
<> 149:156823d33999 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
<> 149:156823d33999 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
<> 149:156823d33999 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 149:156823d33999 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
<> 149:156823d33999 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<> 149:156823d33999 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 149:156823d33999 34 *
<> 149:156823d33999 35 ******************************************************************************
<> 149:156823d33999 36 */
<> 149:156823d33999 37
<> 149:156823d33999 38 /* Define to prevent recursive inclusion -------------------------------------*/
<> 149:156823d33999 39 #ifndef __STM32L1xx_HAL_CRYP_H
<> 149:156823d33999 40 #define __STM32L1xx_HAL_CRYP_H
<> 149:156823d33999 41
<> 149:156823d33999 42 #ifdef __cplusplus
<> 149:156823d33999 43 extern "C" {
<> 149:156823d33999 44 #endif
<> 149:156823d33999 45
<> 149:156823d33999 46 #if defined(STM32L162xC) || defined(STM32L162xCA) || defined(STM32L162xD) || defined(STM32L162xE) || defined(STM32L162xDX)
<> 149:156823d33999 47
<> 149:156823d33999 48 /* Includes ------------------------------------------------------------------*/
<> 149:156823d33999 49 #include "stm32l1xx_hal_def.h"
<> 149:156823d33999 50
<> 149:156823d33999 51 /** @addtogroup STM32L1xx_HAL_Driver
<> 149:156823d33999 52 * @{
<> 149:156823d33999 53 */
<> 149:156823d33999 54
<> 149:156823d33999 55 /** @addtogroup CRYP
<> 149:156823d33999 56 * @{
<> 149:156823d33999 57 */
<> 149:156823d33999 58
<> 149:156823d33999 59 /* Exported types ------------------------------------------------------------*/
<> 149:156823d33999 60
<> 149:156823d33999 61 /** @defgroup CRYP_Exported_Types CRYP Exported Types
<> 149:156823d33999 62 * @{
<> 149:156823d33999 63 */
<> 149:156823d33999 64
<> 149:156823d33999 65 /**
<> 149:156823d33999 66 * @brief CRYP Configuration Structure definition
<> 149:156823d33999 67 */
<> 149:156823d33999 68 typedef struct
<> 149:156823d33999 69 {
<> 149:156823d33999 70 uint32_t DataType; /*!< 32-bit data, 16-bit data, 8-bit data or 1-bit string.
<> 149:156823d33999 71 This parameter can be a value of @ref CRYP_Data_Type */
<> 149:156823d33999 72
<> 149:156823d33999 73 uint8_t* pKey; /*!< The key used for encryption/decryption */
<> 149:156823d33999 74
<> 149:156823d33999 75 uint8_t* pInitVect; /*!< The initialization vector used also as initialization
<> 149:156823d33999 76 counter in CTR mode */
<> 149:156823d33999 77
<> 149:156823d33999 78 }CRYP_InitTypeDef;
<> 149:156823d33999 79
<> 149:156823d33999 80 /**
<> 149:156823d33999 81 * @brief HAL CRYP State structures definition
<> 149:156823d33999 82 */
<> 149:156823d33999 83 typedef enum
<> 149:156823d33999 84 {
<> 149:156823d33999 85 HAL_CRYP_STATE_RESET = 0x00, /*!< CRYP not yet initialized or disabled */
<> 149:156823d33999 86 HAL_CRYP_STATE_READY = 0x01, /*!< CRYP initialized and ready for use */
<> 149:156823d33999 87 HAL_CRYP_STATE_BUSY = 0x02, /*!< CRYP internal processing is ongoing */
<> 149:156823d33999 88 HAL_CRYP_STATE_TIMEOUT = 0x03, /*!< CRYP timeout state */
<> 149:156823d33999 89 HAL_CRYP_STATE_ERROR = 0x04 /*!< CRYP error state */
<> 149:156823d33999 90
<> 149:156823d33999 91 }HAL_CRYP_STATETypeDef;
<> 149:156823d33999 92
<> 149:156823d33999 93 /**
<> 149:156823d33999 94 * @brief HAL CRYP phase structures definition
<> 149:156823d33999 95 */
<> 149:156823d33999 96 typedef enum
<> 149:156823d33999 97 {
<> 149:156823d33999 98 HAL_CRYP_PHASE_READY = 0x01, /*!< CRYP peripheral is ready for initialization. */
<> 149:156823d33999 99 HAL_CRYP_PHASE_PROCESS = 0x02, /*!< CRYP peripheral is in processing phase */
<> 149:156823d33999 100 }HAL_PhaseTypeDef;
<> 149:156823d33999 101
<> 149:156823d33999 102 /**
<> 149:156823d33999 103 * @brief CRYP handle Structure definition
<> 149:156823d33999 104 */
<> 149:156823d33999 105 typedef struct
<> 149:156823d33999 106 {
<> 149:156823d33999 107 AES_TypeDef *Instance; /*!< Register base address */
<> 149:156823d33999 108
<> 149:156823d33999 109 CRYP_InitTypeDef Init; /*!< CRYP required parameters */
<> 149:156823d33999 110
<> 149:156823d33999 111 uint8_t *pCrypInBuffPtr; /*!< Pointer to CRYP processing (encryption, decryption,...) buffer */
<> 149:156823d33999 112
<> 149:156823d33999 113 uint8_t *pCrypOutBuffPtr; /*!< Pointer to CRYP processing (encryption, decryption,...) buffer */
<> 149:156823d33999 114
<> 149:156823d33999 115 __IO uint16_t CrypInCount; /*!< Counter of inputed data */
<> 149:156823d33999 116
<> 149:156823d33999 117 __IO uint16_t CrypOutCount; /*!< Counter of outputed data */
<> 149:156823d33999 118
<> 149:156823d33999 119 HAL_StatusTypeDef Status; /*!< CRYP peripheral status */
<> 149:156823d33999 120
<> 149:156823d33999 121 HAL_PhaseTypeDef Phase; /*!< CRYP peripheral phase */
<> 149:156823d33999 122
<> 149:156823d33999 123 DMA_HandleTypeDef *hdmain; /*!< CRYP In DMA handle parameters */
<> 149:156823d33999 124
<> 149:156823d33999 125 DMA_HandleTypeDef *hdmaout; /*!< CRYP Out DMA handle parameters */
<> 149:156823d33999 126
<> 149:156823d33999 127 HAL_LockTypeDef Lock; /*!< CRYP locking object */
<> 149:156823d33999 128
<> 149:156823d33999 129 __IO HAL_CRYP_STATETypeDef State; /*!< CRYP peripheral state */
<> 149:156823d33999 130
<> 149:156823d33999 131 }CRYP_HandleTypeDef;
<> 149:156823d33999 132
<> 149:156823d33999 133 /**
<> 149:156823d33999 134 * @}
<> 149:156823d33999 135 */
<> 149:156823d33999 136
<> 149:156823d33999 137 /* Exported constants --------------------------------------------------------*/
<> 149:156823d33999 138
<> 149:156823d33999 139 /** @defgroup CRYP_Exported_Constants CRYP Exported Constants
<> 149:156823d33999 140 * @{
<> 149:156823d33999 141 */
<> 149:156823d33999 142
<> 149:156823d33999 143 /** @defgroup CRYP_Data_Type CRYP Data Type
<> 149:156823d33999 144 * @{
<> 149:156823d33999 145 */
<> 149:156823d33999 146 #define CRYP_DATATYPE_32B ((uint32_t)0x00000000)
<> 149:156823d33999 147 #define CRYP_DATATYPE_16B AES_CR_DATATYPE_0
<> 149:156823d33999 148 #define CRYP_DATATYPE_8B AES_CR_DATATYPE_1
<> 149:156823d33999 149 #define CRYP_DATATYPE_1B AES_CR_DATATYPE
<> 149:156823d33999 150
<> 149:156823d33999 151 #define IS_CRYP_DATATYPE(DATATYPE) (((DATATYPE) == CRYP_DATATYPE_32B) || \
<> 149:156823d33999 152 ((DATATYPE) == CRYP_DATATYPE_16B) || \
<> 149:156823d33999 153 ((DATATYPE) == CRYP_DATATYPE_8B) || \
<> 149:156823d33999 154 ((DATATYPE) == CRYP_DATATYPE_1B))
<> 149:156823d33999 155 /**
<> 149:156823d33999 156 * @}
<> 149:156823d33999 157 */
<> 149:156823d33999 158
<> 149:156823d33999 159 /** @defgroup CRYP_AlgoModeDirection CRYP Algo Mode Direction
<> 149:156823d33999 160 * @{
<> 149:156823d33999 161 */
<> 149:156823d33999 162 #define CRYP_CR_ALGOMODE_DIRECTION (uint32_t)(AES_CR_MODE|AES_CR_CHMOD)
<> 149:156823d33999 163
<> 149:156823d33999 164 #define CRYP_CR_ALGOMODE_AES_ECB_ENCRYPT ((uint32_t)0x00000000)
<> 149:156823d33999 165 #define CRYP_CR_ALGOMODE_AES_ECB_KEYDERDECRYPT (AES_CR_MODE)
<> 149:156823d33999 166 #define CRYP_CR_ALGOMODE_AES_CBC_ENCRYPT (AES_CR_CHMOD_0)
<> 149:156823d33999 167 #define CRYP_CR_ALGOMODE_AES_CBC_KEYDERDECRYPT ((uint32_t)(AES_CR_CHMOD_0|AES_CR_MODE))
<> 149:156823d33999 168 #define CRYP_CR_ALGOMODE_AES_CTR_ENCRYPT (AES_CR_CHMOD_1)
<> 149:156823d33999 169 #define CRYP_CR_ALGOMODE_AES_CTR_DECRYPT ((uint32_t)(AES_CR_CHMOD_1 | AES_CR_MODE_1))
<> 149:156823d33999 170 /**
<> 149:156823d33999 171 * @}
<> 149:156823d33999 172 */
<> 149:156823d33999 173
<> 149:156823d33999 174 /** @defgroup CRYP_AES_Interrupts AES Interrupts
<> 149:156823d33999 175 * @{
<> 149:156823d33999 176 */
<> 149:156823d33999 177 #define CRYP_IT_CC AES_CR_CCIE /*!< Computation Complete interrupt */
<> 149:156823d33999 178 #define CRYP_IT_ERR AES_CR_ERRIE /*!< Error interrupt */
<> 149:156823d33999 179
<> 149:156823d33999 180 /**
<> 149:156823d33999 181 * @}
<> 149:156823d33999 182 */
<> 149:156823d33999 183
<> 149:156823d33999 184
<> 149:156823d33999 185 /** @defgroup CRYP_AES_Flags AES Flags
<> 149:156823d33999 186 * @{
<> 149:156823d33999 187 */
<> 149:156823d33999 188 #define CRYP_FLAG_CCF AES_SR_CCF /*!< Computation Complete Flag */
<> 149:156823d33999 189 #define CRYP_FLAG_RDERR AES_SR_RDERR /*!< Read Error Flag */
<> 149:156823d33999 190 #define CRYP_FLAG_WRERR AES_SR_WRERR /*!< Write Error Flag */
<> 149:156823d33999 191
<> 149:156823d33999 192 /**
<> 149:156823d33999 193 * @}
<> 149:156823d33999 194 */
<> 149:156823d33999 195
<> 149:156823d33999 196 /** @defgroup CRYP_AES_Clear_Flags AES Clear Flags
<> 149:156823d33999 197 * @{
<> 149:156823d33999 198 */
<> 149:156823d33999 199 #define CRYP_CLEARFLAG_CCF AES_CR_CCFC /*!< Computation Complete Flag Clear */
<> 149:156823d33999 200 #define CRYP_CLEARFLAG_RDERR AES_CR_ERRC /*!< Read Error Clear */
<> 149:156823d33999 201 #define CRYP_CLEARFLAG_WRERR AES_CR_ERRC /*!< Write Error Clear */
<> 149:156823d33999 202
<> 149:156823d33999 203 /**
<> 149:156823d33999 204 * @}
<> 149:156823d33999 205 */
<> 149:156823d33999 206
<> 149:156823d33999 207 /**
<> 149:156823d33999 208 * @}
<> 149:156823d33999 209 */
<> 149:156823d33999 210
<> 149:156823d33999 211 /* Exported macro ------------------------------------------------------------*/
<> 149:156823d33999 212
<> 149:156823d33999 213 /** @defgroup CRYP_Exported_Macros CRYP Exported Macros
<> 149:156823d33999 214 * @{
<> 149:156823d33999 215 */
<> 149:156823d33999 216
<> 149:156823d33999 217 /** @brief Reset CRYP handle state
<> 149:156823d33999 218 * @param __HANDLE__: specifies the CRYP handle.
<> 149:156823d33999 219 * @retval None
<> 149:156823d33999 220 */
<> 149:156823d33999 221 #define __HAL_CRYP_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CRYP_STATE_RESET)
<> 149:156823d33999 222
<> 149:156823d33999 223 /**
<> 149:156823d33999 224 * @brief Enable/Disable the CRYP peripheral.
<> 149:156823d33999 225 * @param __HANDLE__: specifies the CRYP handle.
<> 149:156823d33999 226 * @retval None
<> 149:156823d33999 227 */
<> 149:156823d33999 228 #define __HAL_CRYP_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, AES_CR_EN)
<> 149:156823d33999 229 #define __HAL_CRYP_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR, AES_CR_EN)
<> 149:156823d33999 230
<> 149:156823d33999 231 /**
<> 149:156823d33999 232 * @brief Set the algorithm mode: AES-ECB, AES-CBC, AES-CTR, DES-ECB, DES-CBC,...
<> 149:156823d33999 233 * @param __HANDLE__: specifies the CRYP handle.
<> 149:156823d33999 234 * @param __MODE__: The algorithm mode.
<> 149:156823d33999 235 * @retval None
<> 149:156823d33999 236 */
<> 149:156823d33999 237 #define __HAL_CRYP_SET_MODE(__HANDLE__,__MODE__) SET_BIT((__HANDLE__)->Instance->CR, (__MODE__))
<> 149:156823d33999 238
<> 149:156823d33999 239
<> 149:156823d33999 240 /** @brief Check whether the specified CRYP flag is set or not.
<> 149:156823d33999 241 * @param __HANDLE__: specifies the CRYP handle.
<> 149:156823d33999 242 * @param __FLAG__: specifies the flag to check.
<> 149:156823d33999 243 * This parameter can be one of the following values:
<> 149:156823d33999 244 * @arg CRYP_FLAG_CCF : Computation Complete Flag
<> 149:156823d33999 245 * @arg CRYP_FLAG_RDERR : Read Error Flag
<> 149:156823d33999 246 * @arg CRYP_FLAG_WRERR : Write Error Flag
<> 149:156823d33999 247 * @retval The new state of __FLAG__ (TRUE or FALSE).
<> 149:156823d33999 248 */
<> 149:156823d33999 249 #define __HAL_CRYP_GET_FLAG(__HANDLE__,__FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
<> 149:156823d33999 250
<> 149:156823d33999 251 /** @brief Clear the CRYP pending flag.
<> 149:156823d33999 252 * @param __HANDLE__: specifies the CRYP handle.
<> 149:156823d33999 253 * @param __FLAG__: specifies the flag to clear.
<> 149:156823d33999 254 * This parameter can be one of the following values:
<> 149:156823d33999 255 * @arg CRYP_CLEARFLAG_CCF : Computation Complete Clear Flag
<> 149:156823d33999 256 * @arg CRYP_CLEARFLAG_RDERR : Read Error Clear
<> 149:156823d33999 257 * @arg CRYP_CLEARFLAG_WRERR : Write Error Clear
<> 149:156823d33999 258 * @retval None
<> 149:156823d33999 259 */
<> 149:156823d33999 260 #define __HAL_CRYP_CLEAR_FLAG(__HANDLE__, __FLAG__) SET_BIT((__HANDLE__)->Instance->CR, (__FLAG__))
<> 149:156823d33999 261
<> 149:156823d33999 262 /**
<> 149:156823d33999 263 * @brief Enable the CRYP interrupt.
<> 149:156823d33999 264 * @param __HANDLE__: specifies the CRYP handle.
<> 149:156823d33999 265 * @param __INTERRUPT__: CRYP Interrupt.
<> 149:156823d33999 266 * @retval None
<> 149:156823d33999 267 */
<> 149:156823d33999 268 #define __HAL_CRYP_ENABLE_IT(__HANDLE__,__INTERRUPT__) SET_BIT((__HANDLE__)->Instance->CR, (__INTERRUPT__))
<> 149:156823d33999 269
<> 149:156823d33999 270 /**
<> 149:156823d33999 271 * @brief Disable the CRYP interrupt.
<> 149:156823d33999 272 * @param __HANDLE__: specifies the CRYP handle.
<> 149:156823d33999 273 * @param __INTERRUPT__: CRYP interrupt.
<> 149:156823d33999 274 * @retval None
<> 149:156823d33999 275 */
<> 149:156823d33999 276 #define __HAL_CRYP_DISABLE_IT(__HANDLE__,__INTERRUPT__) CLEAR_BIT((__HANDLE__)->Instance->CR, (__INTERRUPT__))
<> 149:156823d33999 277
<> 149:156823d33999 278 /** @brief Checks if the specified CRYP interrupt source is enabled or disabled.
<> 149:156823d33999 279 * @param __HANDLE__: specifies the CRYP handle.
<> 149:156823d33999 280 * @param __INTERRUPT__: CRYP interrupt source to check
<> 149:156823d33999 281 * This parameter can be one of the following values:
<> 149:156823d33999 282 * @arg CRYP_IT_CC : Computation Complete interrupt
<> 149:156823d33999 283 * @arg CRYP_IT_ERR : Error interrupt (used for RDERR and WRERR)
<> 149:156823d33999 284 * @retval State of interruption (SET or RESET)
<> 149:156823d33999 285 */
<> 149:156823d33999 286 #define __HAL_CRYP_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) \
<> 149:156823d33999 287 (( ((__HANDLE__)->Instance->CR & (__INTERRUPT__)) == (__INTERRUPT__) \
<> 149:156823d33999 288 )? SET : RESET \
<> 149:156823d33999 289 )
<> 149:156823d33999 290
<> 149:156823d33999 291 /** @brief Clear the CRYP pending IT.
<> 149:156823d33999 292 * @param __HANDLE__: specifies the CRYP handle.
<> 149:156823d33999 293 * @param __IT__: specifies the IT to clear.
<> 149:156823d33999 294 * This parameter can be one of the following values:
<> 149:156823d33999 295 * @arg CRYP_CLEARFLAG_CCF : Computation Complete Clear Flag
<> 149:156823d33999 296 * @arg CRYP_CLEARFLAG_RDERR : Read Error Clear
<> 149:156823d33999 297 * @arg CRYP_CLEARFLAG_WRERR : Write Error Clear
<> 149:156823d33999 298 * @retval None
<> 149:156823d33999 299 */
<> 149:156823d33999 300 #define __HAL_CRYP_CLEAR_IT(__HANDLE__, __IT__) SET_BIT((__HANDLE__)->Instance->CR, (__IT__))
<> 149:156823d33999 301
<> 149:156823d33999 302 /**
<> 149:156823d33999 303 * @}
<> 149:156823d33999 304 */
<> 149:156823d33999 305
<> 149:156823d33999 306 /* Include CRYP HAL Extension module */
<> 149:156823d33999 307 #include "stm32l1xx_hal_cryp_ex.h"
<> 149:156823d33999 308
<> 149:156823d33999 309 /* Exported functions --------------------------------------------------------*/
<> 149:156823d33999 310
<> 149:156823d33999 311 /** @addtogroup CRYP_Exported_Functions
<> 149:156823d33999 312 * @{
<> 149:156823d33999 313 */
<> 149:156823d33999 314
<> 149:156823d33999 315 /** @addtogroup CRYP_Exported_Functions_Group1
<> 149:156823d33999 316 * @{
<> 149:156823d33999 317 */
<> 149:156823d33999 318
<> 149:156823d33999 319 /* Initialization/de-initialization functions *********************************/
<> 149:156823d33999 320 HAL_StatusTypeDef HAL_CRYP_Init(CRYP_HandleTypeDef *hcryp);
<> 149:156823d33999 321 HAL_StatusTypeDef HAL_CRYP_DeInit(CRYP_HandleTypeDef *hcryp);
<> 149:156823d33999 322
<> 149:156823d33999 323 /* MSP functions *************************************************************/
<> 149:156823d33999 324 void HAL_CRYP_MspInit(CRYP_HandleTypeDef *hcryp);
<> 149:156823d33999 325 void HAL_CRYP_MspDeInit(CRYP_HandleTypeDef *hcryp);
<> 149:156823d33999 326
<> 149:156823d33999 327 /**
<> 149:156823d33999 328 * @}
<> 149:156823d33999 329 */
<> 149:156823d33999 330
<> 149:156823d33999 331 /** @addtogroup CRYP_Exported_Functions_Group2
<> 149:156823d33999 332 * @{
<> 149:156823d33999 333 */
<> 149:156823d33999 334
<> 149:156823d33999 335 /* AES encryption/decryption using polling ***********************************/
<> 149:156823d33999 336 HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);
<> 149:156823d33999 337 HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout);
<> 149:156823d33999 338 HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);
<> 149:156823d33999 339 HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout);
<> 149:156823d33999 340 HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);
<> 149:156823d33999 341 HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout);
<> 149:156823d33999 342
<> 149:156823d33999 343 /* AES encryption/decryption using interrupt *********************************/
<> 149:156823d33999 344 HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);
<> 149:156823d33999 345 HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);
<> 149:156823d33999 346 HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);
<> 149:156823d33999 347 HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);
<> 149:156823d33999 348 HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);
<> 149:156823d33999 349 HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);
<> 149:156823d33999 350
<> 149:156823d33999 351 /* AES encryption/decryption using DMA ***************************************/
<> 149:156823d33999 352 HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);
<> 149:156823d33999 353 HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);
<> 149:156823d33999 354 HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);
<> 149:156823d33999 355 HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);
<> 149:156823d33999 356 HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);
<> 149:156823d33999 357 HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);
<> 149:156823d33999 358
<> 149:156823d33999 359 /**
<> 149:156823d33999 360 * @}
<> 149:156823d33999 361 */
<> 149:156823d33999 362
<> 149:156823d33999 363 /** @addtogroup CRYP_Exported_Functions_Group3
<> 149:156823d33999 364 * @{
<> 149:156823d33999 365 */
<> 149:156823d33999 366
<> 149:156823d33999 367 /* CallBack functions ********************************************************/
<> 149:156823d33999 368 void HAL_CRYP_InCpltCallback(CRYP_HandleTypeDef *hcryp);
<> 149:156823d33999 369 void HAL_CRYP_OutCpltCallback(CRYP_HandleTypeDef *hcryp);
<> 149:156823d33999 370 void HAL_CRYP_ErrorCallback(CRYP_HandleTypeDef *hcryp);
<> 149:156823d33999 371
<> 149:156823d33999 372 /**
<> 149:156823d33999 373 * @}
<> 149:156823d33999 374 */
<> 149:156823d33999 375
<> 149:156823d33999 376 /** @addtogroup CRYP_Exported_Functions_Group4
<> 149:156823d33999 377 * @{
<> 149:156823d33999 378 */
<> 149:156823d33999 379
<> 149:156823d33999 380 /* Processing functions ********************************************************/
<> 149:156823d33999 381 void HAL_CRYP_IRQHandler(CRYP_HandleTypeDef *hcryp);
<> 149:156823d33999 382
<> 149:156823d33999 383 /**
<> 149:156823d33999 384 * @}
<> 149:156823d33999 385 */
<> 149:156823d33999 386
<> 149:156823d33999 387 /** @addtogroup CRYP_Exported_Functions_Group5
<> 149:156823d33999 388 * @{
<> 149:156823d33999 389 */
<> 149:156823d33999 390
<> 149:156823d33999 391 /* Peripheral State functions **************************************************/
<> 149:156823d33999 392 HAL_CRYP_STATETypeDef HAL_CRYP_GetState(CRYP_HandleTypeDef *hcryp);
<> 149:156823d33999 393
<> 149:156823d33999 394 /**
<> 149:156823d33999 395 * @}
<> 149:156823d33999 396 */
<> 149:156823d33999 397
<> 149:156823d33999 398 /**
<> 149:156823d33999 399 * @}
<> 149:156823d33999 400 */
<> 149:156823d33999 401
<> 149:156823d33999 402 /**
<> 149:156823d33999 403 * @}
<> 149:156823d33999 404 */
<> 149:156823d33999 405
<> 149:156823d33999 406 /**
<> 149:156823d33999 407 * @}
<> 149:156823d33999 408 */
<> 149:156823d33999 409
<> 149:156823d33999 410 #endif /* STM32L162xC || STM32L162xCA || STM32L162xD || STM32L162xE || STM32L162xDX*/
<> 149:156823d33999 411
<> 149:156823d33999 412 #ifdef __cplusplus
<> 149:156823d33999 413 }
<> 149:156823d33999 414 #endif
<> 149:156823d33999 415
<> 149:156823d33999 416 #endif /* __STM32L1xx_HAL_CRYP_H */
<> 149:156823d33999 417
<> 149:156823d33999 418 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/