xref: /btstack/port/stm32-l451-miromico-sx1280/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_cryp_ex.h (revision 2fd737d36a1de5d778cacc671d4b4d8c4f3fed82)
1 /**
2   ******************************************************************************
3   * @file    stm32l4xx_hal_cryp_ex.h
4   * @author  MCD Application Team
5   * @brief   Header file of CRYPEx HAL module.
6   ******************************************************************************
7   * @attention
8   *
9   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
10   * All rights reserved.</center></h2>
11   *
12   * This software component is licensed by ST under BSD 3-Clause license,
13   * the "License"; You may not use this file except in compliance with the
14   * License. You may obtain a copy of the License at:
15   *                        opensource.org/licenses/BSD-3-Clause
16   *
17   ******************************************************************************
18   */
19 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32L4xx_HAL_CRYP_EX_H
22 #define STM32L4xx_HAL_CRYP_EX_H
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
28 #if defined(AES)
29 
30 /* Includes ------------------------------------------------------------------*/
31 #include "stm32l4xx_hal_def.h"
32 
33 /** @addtogroup STM32L4xx_HAL_Driver
34   * @{
35   */
36 
37 /** @addtogroup CRYPEx
38   * @{
39   */
40 
41 /* Exported types ------------------------------------------------------------*/
42 /* Exported constants --------------------------------------------------------*/
43 /* Exported functions --------------------------------------------------------*/
44 
45 /** @addtogroup CRYPEx_Exported_Functions
46   * @{
47   */
48 
49 /** @addtogroup CRYPEx_Exported_Functions_Group1
50   * @{
51   */
52 
53 /* CallBack functions  ********************************************************/
54 void HAL_CRYPEx_ComputationCpltCallback(CRYP_HandleTypeDef *hcryp);
55 
56 /**
57   * @}
58   */
59 
60 /** @addtogroup CRYPEx_Exported_Functions_Group2
61   * @{
62   */
63 
64 /* AES encryption/decryption processing functions  ****************************/
65 HAL_StatusTypeDef HAL_CRYPEx_AES(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData, uint32_t Timeout);
66 HAL_StatusTypeDef HAL_CRYPEx_AES_IT(CRYP_HandleTypeDef *hcryp,  uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData);
67 HAL_StatusTypeDef HAL_CRYPEx_AES_DMA(CRYP_HandleTypeDef *hcryp,  uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData);
68 
69 /* AES encryption/decryption/authentication processing functions  *************/
70 HAL_StatusTypeDef HAL_CRYPEx_AES_Auth(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData, uint32_t Timeout);
71 HAL_StatusTypeDef HAL_CRYPEx_AES_Auth_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData);
72 HAL_StatusTypeDef HAL_CRYPEx_AES_Auth_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData);
73 
74 /**
75   * @}
76   */
77 
78 /** @addtogroup CRYPEx_Exported_Functions_Group3
79   * @{
80   */
81 
82 /* AES suspension/resumption functions  ***************************************/
83 void HAL_CRYPEx_Read_IVRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Output);
84 void HAL_CRYPEx_Write_IVRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Input);
85 void HAL_CRYPEx_Read_SuspendRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Output);
86 void HAL_CRYPEx_Write_SuspendRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Input);
87 void HAL_CRYPEx_Read_KeyRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Output, uint32_t KeySize);
88 void HAL_CRYPEx_Write_KeyRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Input, uint32_t KeySize);
89 void HAL_CRYPEx_Read_ControlRegister(CRYP_HandleTypeDef *hcryp, uint8_t* Output);
90 void HAL_CRYPEx_Write_ControlRegister(CRYP_HandleTypeDef *hcryp, uint8_t* Input);
91 void HAL_CRYPEx_ProcessSuspend(CRYP_HandleTypeDef *hcryp);
92 
93 /**
94   * @}
95   */
96 
97 
98 /**
99   * @}
100   */
101 
102 /* Private functions -----------------------------------------------------------*/
103 /** @addtogroup CRYPEx_Private_Functions CRYPEx Private Functions
104   * @{
105   */
106 HAL_StatusTypeDef CRYP_AES_Auth_IT(CRYP_HandleTypeDef *hcryp);
107 
108 /**
109   * @}
110   */
111 
112 
113 /**
114   * @}
115   */
116 
117 /**
118   * @}
119   */
120 
121 #endif /* AES */
122 
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 #endif /* STM32L4xx_HAL_CRYP_EX_H */
128 
129 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
130