1 /**
2   ******************************************************************************
3   * @file    stm32wbxx_ll_pka.h
4   * @author  MCD Application Team
5   * @brief   Header file of PKA LL module.
6   ******************************************************************************
7   * @attention
8   *
9   * <h2><center>&copy; Copyright (c) 2019 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 STM32WBxx_LL_PKA_H
22 #define STM32WBxx_LL_PKA_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32wbxx.h"
30 
31 /** @addtogroup STM32WBxx_LL_Driver
32   * @{
33   */
34 
35 #if defined(PKA)
36 
37 /** @defgroup PKA_LL PKA
38   * @{
39   */
40 
41 /* Private variables ---------------------------------------------------------*/
42 
43 /* Exported types ------------------------------------------------------------*/
44 #if defined(USE_FULL_LL_DRIVER)
45 /** @defgroup PKA_LL_ES_INIT PKA Exported Init structure
46   * @{
47   */
48 
49 /**
50   * @brief  PKA Init structures definition
51   */
52 typedef struct
53 {
54   uint32_t Mode;          /*!< Specifies the PKA operation mode.
55                                This parameter can be a value of @ref PKA_LL_EC_MODE.
56 
57                                This feature can be modified afterwards using unitary function @ref LL_PKA_SetMode(). */
58 } LL_PKA_InitTypeDef;
59 
60 /**
61   * @}
62   */
63 #endif /* USE_FULL_LL_DRIVER */
64 
65 /* Exported constants --------------------------------------------------------*/
66 /** @defgroup PKA_LL_Exported_Constants PKA Exported Constants
67   * @{
68   */
69 
70 /** @defgroup PKA_LL_EC_GET_FLAG Get Flags Defines
71   * @brief    Flags defines which can be used with LL_PKA_ReadReg function
72   * @{
73   */
74 #define LL_PKA_SR_ADDRERRF                 PKA_SR_ADDRERRF
75 #define LL_PKA_SR_RAMERRF                  PKA_SR_RAMERRF
76 #define LL_PKA_SR_PROCENDF                 PKA_SR_PROCENDF
77 #define LL_PKA_SR_BUSY                     PKA_SR_BUSY
78 /**
79   * @}
80   */
81 
82 /** @defgroup PKA_LL_EC_IT IT Defines
83   * @brief    IT defines which can be used with LL_PKA_ReadReg and  LL_PKA_WriteReg functions
84   * @{
85   */
86 #define LL_PKA_CR_ADDRERRIE                PKA_CR_ADDRERRIE
87 #define LL_PKA_CR_RAMERRIE                 PKA_CR_RAMERRIE
88 #define LL_PKA_CR_PROCENDIE                PKA_CR_PROCENDIE
89 #define LL_PKA_CLRFR_PROCENDFC             PKA_CLRFR_PROCENDFC
90 #define LL_PKA_CLRFR_RAMERRFC              PKA_CLRFR_RAMERRFC
91 #define LL_PKA_CLRFR_ADDRERRFC             PKA_CLRFR_ADDRERRFC
92 /**
93   * @}
94   */
95 
96 /** @defgroup PKA_LL_EC_MODE Operation Mode
97   * @brief    List of opearation mode.
98   * @{
99   */
100 #define LL_PKA_MODE_MONTGOMERY_PARAM_MOD_EXP ((uint32_t)0x00000000U) /*!< Compute Montgomery parameter and modular exponentiation */
101 #define LL_PKA_MODE_MONTGOMERY_PARAM         ((uint32_t)0x00000001U) /*!< Compute Montgomery parameter only */
102 #define LL_PKA_MODE_MODULAR_EXP              ((uint32_t)0x00000002U) /*!< Compute modular exponentiation only (Montgomery parameter should be loaded) */
103 #define LL_PKA_MODE_MONTGOMERY_PARAM_ECC     ((uint32_t)0x00000020U) /*!< Compute Montgomery parameter and compute ECC kP operation */
104 #define LL_PKA_MODE_ECC_KP_PRIMITIVE         ((uint32_t)0x00000022U) /*!< Compute the ECC kP primitive only (Montgomery parameter should be loaded) */
105 #define LL_PKA_MODE_ECDSA_SIGNATURE          ((uint32_t)0x00000024U) /*!< ECDSA signature */
106 #define LL_PKA_MODE_ECDSA_VERIFICATION       ((uint32_t)0x00000026U) /*!< ECDSA verification */
107 #define LL_PKA_MODE_POINT_CHECK              ((uint32_t)0x00000028U) /*!< Point check */
108 #define LL_PKA_MODE_RSA_CRT_EXP              ((uint32_t)0x00000007U) /*!< RSA CRT exponentiation */
109 #define LL_PKA_MODE_MODULAR_INV              ((uint32_t)0x00000008U) /*!< Modular inversion */
110 #define LL_PKA_MODE_ARITHMETIC_ADD           ((uint32_t)0x00000009U) /*!< Arithmetic addition */
111 #define LL_PKA_MODE_ARITHMETIC_SUB           ((uint32_t)0x0000000AU) /*!< Arithmetic subtraction */
112 #define LL_PKA_MODE_ARITHMETIC_MUL           ((uint32_t)0x0000000BU) /*!< Arithmetic multiplication */
113 #define LL_PKA_MODE_COMPARISON               ((uint32_t)0x0000000CU) /*!< Comparison */
114 #define LL_PKA_MODE_MODULAR_REDUC            ((uint32_t)0x0000000DU) /*!< Modular reduction */
115 #define LL_PKA_MODE_MODULAR_ADD              ((uint32_t)0x0000000EU) /*!< Modular addition */
116 #define LL_PKA_MODE_MODULAR_SUB              ((uint32_t)0x0000000FU) /*!< Modular subtraction */
117 #define LL_PKA_MODE_MONTGOMERY_MUL           ((uint32_t)0x00000010U) /*!< Montgomery multiplication */
118 
119 /**
120   * @}
121   */
122 
123 /**
124   * @}
125   */
126 
127 /* Exported macro ------------------------------------------------------------*/
128 /** @defgroup PKA_LL_Exported_Macros PKA Exported Macros
129   * @{
130   */
131 
132 /** @defgroup PKA_LL_EM_WRITE_READ Common Write and read registers Macros
133   * @{
134   */
135 
136 /**
137   * @brief  Write a value in PKA register
138   * @param  __INSTANCE__ PKA Instance
139   * @param  __REG__ Register to be written
140   * @param  __VALUE__ Value to be written in the register
141   * @retval None
142   */
143 #define LL_PKA_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
144 
145 /**
146   * @brief  Read a value in PKA register
147   * @param  __INSTANCE__ PKA Instance
148   * @param  __REG__ Register to be read
149   * @retval Register value
150   */
151 #define LL_PKA_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
152 /**
153   * @}
154   */
155 
156 /**
157   * @}
158   */
159 
160 /* Exported functions --------------------------------------------------------*/
161 /** @defgroup PKA_LL_Exported_Functions PKA Exported Functions
162   * @{
163   */
164 
165 /** @defgroup PKA_LL_EF_Configuration Configuration
166   * @{
167   */
168 
169 /**
170   * @brief  Configure PKA peripheral.
171   * @brief  Set PKA operating mode.
172   * @rmtoll CR           MODE          LL_PKA_Config
173   * @param  PKAx PKA Instance.
174   * @param  Mode This parameter can be one of the following values:
175   *         @arg @ref LL_PKA_MODE_MONTGOMERY_PARAM_MOD_EXP
176   *         @arg @ref LL_PKA_MODE_MONTGOMERY_PARAM
177   *         @arg @ref LL_PKA_MODE_MODULAR_EXP
178   *         @arg @ref LL_PKA_MODE_MONTGOMERY_PARAM_ECC
179   *         @arg @ref LL_PKA_MODE_ECC_KP_PRIMITIVE
180   *         @arg @ref LL_PKA_MODE_ECDSA_SIGNATURE
181   *         @arg @ref LL_PKA_MODE_ECDSA_VERIFICATION
182   *         @arg @ref LL_PKA_MODE_POINT_CHECK
183   *         @arg @ref LL_PKA_MODE_RSA_CRT_EXP
184   *         @arg @ref LL_PKA_MODE_MODULAR_INV
185   *         @arg @ref LL_PKA_MODE_ARITHMETIC_ADD
186   *         @arg @ref LL_PKA_MODE_ARITHMETIC_SUB
187   *         @arg @ref LL_PKA_MODE_ARITHMETIC_MUL
188   *         @arg @ref LL_PKA_MODE_COMPARISON
189   *         @arg @ref LL_PKA_MODE_MODULAR_REDUC
190   *         @arg @ref LL_PKA_MODE_MODULAR_ADD
191   *         @arg @ref LL_PKA_MODE_MODULAR_SUB
192   *         @arg @ref LL_PKA_MODE_MONTGOMERY_MUL
193   */
LL_PKA_Config(PKA_TypeDef * PKAx,uint32_t Mode)194 __STATIC_INLINE void LL_PKA_Config(PKA_TypeDef *PKAx, uint32_t Mode)
195 {
196   MODIFY_REG(PKAx->CR, (PKA_CR_MODE), (Mode << PKA_CR_MODE_Pos));
197 }
198 
199 /**
200   * @brief  Enable PKA peripheral.
201   * @rmtoll CR           EN            LL_PKA_Enable
202   * @param  PKAx PKA Instance.
203   * @retval None
204   */
LL_PKA_Enable(PKA_TypeDef * PKAx)205 __STATIC_INLINE void LL_PKA_Enable(PKA_TypeDef *PKAx)
206 {
207   SET_BIT(PKAx->CR, PKA_CR_EN);
208 }
209 
210 /**
211   * @brief  Disable PKA peripheral.
212   * @rmtoll CR           EN            LL_PKA_Disable
213   * @param  PKAx PKA Instance.
214   * @retval None
215   */
LL_PKA_Disable(PKA_TypeDef * PKAx)216 __STATIC_INLINE void LL_PKA_Disable(PKA_TypeDef *PKAx)
217 {
218   CLEAR_BIT(PKAx->CR, PKA_CR_EN);
219 }
220 
221 /**
222   * @brief  Check if the PKA peripheral is enabled or disabled.
223   * @rmtoll CR           EN            LL_PKA_IsEnabled
224   * @param  PKAx PKA Instance.
225   * @retval State of bit (1 or 0).
226   */
LL_PKA_IsEnabled(PKA_TypeDef * PKAx)227 __STATIC_INLINE uint32_t LL_PKA_IsEnabled(PKA_TypeDef *PKAx)
228 {
229   return ((READ_BIT(PKAx->CR, PKA_CR_EN) == (PKA_CR_EN)) ? 1UL : 0UL);
230 }
231 
232 /**
233   * @brief  Set PKA operating mode.
234   * @rmtoll CR           MODE          LL_PKA_SetMode
235   * @param  PKAx PKA Instance.
236   * @param  Mode This parameter can be one of the following values:
237   *         @arg @ref LL_PKA_MODE_MONTGOMERY_PARAM_MOD_EXP
238   *         @arg @ref LL_PKA_MODE_MONTGOMERY_PARAM
239   *         @arg @ref LL_PKA_MODE_MODULAR_EXP
240   *         @arg @ref LL_PKA_MODE_MONTGOMERY_PARAM_ECC
241   *         @arg @ref LL_PKA_MODE_ECC_KP_PRIMITIVE
242   *         @arg @ref LL_PKA_MODE_ECDSA_SIGNATURE
243   *         @arg @ref LL_PKA_MODE_ECDSA_VERIFICATION
244   *         @arg @ref LL_PKA_MODE_POINT_CHECK
245   *         @arg @ref LL_PKA_MODE_RSA_CRT_EXP
246   *         @arg @ref LL_PKA_MODE_MODULAR_INV
247   *         @arg @ref LL_PKA_MODE_ARITHMETIC_ADD
248   *         @arg @ref LL_PKA_MODE_ARITHMETIC_SUB
249   *         @arg @ref LL_PKA_MODE_ARITHMETIC_MUL
250   *         @arg @ref LL_PKA_MODE_COMPARISON
251   *         @arg @ref LL_PKA_MODE_MODULAR_REDUC
252   *         @arg @ref LL_PKA_MODE_MODULAR_ADD
253   *         @arg @ref LL_PKA_MODE_MODULAR_SUB
254   *         @arg @ref LL_PKA_MODE_MONTGOMERY_MUL
255   * @retval None
256   */
LL_PKA_SetMode(PKA_TypeDef * PKAx,uint32_t Mode)257 __STATIC_INLINE void LL_PKA_SetMode(PKA_TypeDef *PKAx, uint32_t Mode)
258 {
259   MODIFY_REG(PKAx->CR, PKA_CR_MODE, Mode << PKA_CR_MODE_Pos);
260 }
261 
262 /**
263   * @brief  Get PKA operating mode.
264   * @rmtoll CR           MODE          LL_PKA_GetMode
265   * @param  PKAx PKA Instance.
266   * @retval Returned value can be one of the following values:
267   *         @arg @ref LL_PKA_MODE_MONTGOMERY_PARAM_MOD_EXP
268   *         @arg @ref LL_PKA_MODE_MONTGOMERY_PARAM
269   *         @arg @ref LL_PKA_MODE_MODULAR_EXP
270   *         @arg @ref LL_PKA_MODE_MONTGOMERY_PARAM_ECC
271   *         @arg @ref LL_PKA_MODE_ECC_KP_PRIMITIVE
272   *         @arg @ref LL_PKA_MODE_ECDSA_SIGNATURE
273   *         @arg @ref LL_PKA_MODE_ECDSA_VERIFICATION
274   *         @arg @ref LL_PKA_MODE_POINT_CHECK
275   *         @arg @ref LL_PKA_MODE_RSA_CRT_EXP
276   *         @arg @ref LL_PKA_MODE_MODULAR_INV
277   *         @arg @ref LL_PKA_MODE_ARITHMETIC_ADD
278   *         @arg @ref LL_PKA_MODE_ARITHMETIC_SUB
279   *         @arg @ref LL_PKA_MODE_ARITHMETIC_MUL
280   *         @arg @ref LL_PKA_MODE_COMPARISON
281   *         @arg @ref LL_PKA_MODE_MODULAR_REDUC
282   *         @arg @ref LL_PKA_MODE_MODULAR_ADD
283   *         @arg @ref LL_PKA_MODE_MODULAR_SUB
284   *         @arg @ref LL_PKA_MODE_MONTGOMERY_MUL
285   */
LL_PKA_GetMode(PKA_TypeDef * PKAx)286 __STATIC_INLINE uint32_t LL_PKA_GetMode(PKA_TypeDef *PKAx)
287 {
288   return (uint32_t)(READ_BIT(PKAx->CR, PKA_CR_MODE) >> PKA_CR_MODE_Pos);
289 }
290 
291 /**
292   * @brief  Start the operation selected using LL_PKA_SetMode.
293   * @rmtoll CR           START         LL_PKA_Start
294   * @param  PKAx PKA Instance.
295   * @retval None
296   */
LL_PKA_Start(PKA_TypeDef * PKAx)297 __STATIC_INLINE void LL_PKA_Start(PKA_TypeDef *PKAx)
298 {
299   SET_BIT(PKAx->CR, PKA_CR_START);
300 }
301 
302 /**
303   * @}
304   */
305 
306 /** @defgroup PKA_LL_EF_IT_Management IT_Management
307   * @{
308   */
309 
310 /**
311   * @brief  Enable address error interrupt.
312   * @rmtoll CR           ADDRERRIE     LL_PKA_EnableIT_ADDRERR
313   * @param  PKAx PKA Instance.
314   * @retval None
315   */
LL_PKA_EnableIT_ADDRERR(PKA_TypeDef * PKAx)316 __STATIC_INLINE void LL_PKA_EnableIT_ADDRERR(PKA_TypeDef *PKAx)
317 {
318   SET_BIT(PKAx->CR, PKA_CR_ADDRERRIE);
319 }
320 
321 /**
322   * @brief  Enable RAM error interrupt.
323   * @rmtoll CR           RAMERRIE      LL_PKA_EnableIT_RAMERR
324   * @param  PKAx PKA Instance.
325   * @retval None
326   */
LL_PKA_EnableIT_RAMERR(PKA_TypeDef * PKAx)327 __STATIC_INLINE void LL_PKA_EnableIT_RAMERR(PKA_TypeDef *PKAx)
328 {
329   SET_BIT(PKAx->CR, PKA_CR_RAMERRIE);
330 }
331 
332 
333 /**
334   * @brief  Enable end of operation interrupt.
335   * @rmtoll CR           PROCENDIE     LL_PKA_EnableIT_PROCEND
336   * @param  PKAx PKA Instance.
337   * @retval None
338   */
LL_PKA_EnableIT_PROCEND(PKA_TypeDef * PKAx)339 __STATIC_INLINE void LL_PKA_EnableIT_PROCEND(PKA_TypeDef *PKAx)
340 {
341   SET_BIT(PKAx->CR, PKA_CR_PROCENDIE);
342 }
343 
344 /**
345   * @brief  Disable address error interrupt.
346   * @rmtoll CR           ADDRERRIE     LL_PKA_DisableIT_ADDERR
347   * @param  PKAx PKA Instance.
348   * @retval None
349   */
LL_PKA_DisableIT_ADDERR(PKA_TypeDef * PKAx)350 __STATIC_INLINE void LL_PKA_DisableIT_ADDERR(PKA_TypeDef *PKAx)
351 {
352   CLEAR_BIT(PKAx->CR, PKA_CR_ADDRERRIE);
353 }
354 
355 /**
356   * @brief  Disable RAM error interrupt.
357   * @rmtoll CR           RAMERRIE      LL_PKA_DisableIT_RAMERR
358   * @param  PKAx PKA Instance.
359   * @retval None
360   */
LL_PKA_DisableIT_RAMERR(PKA_TypeDef * PKAx)361 __STATIC_INLINE void LL_PKA_DisableIT_RAMERR(PKA_TypeDef *PKAx)
362 {
363   CLEAR_BIT(PKAx->CR, PKA_CR_RAMERRIE);
364 }
365 
366 /**
367   * @brief  Disable End of operation interrupt.
368   * @rmtoll CR           PROCENDIE     LL_PKA_DisableIT_PROCEND
369   * @param  PKAx PKA Instance.
370   * @retval None
371   */
LL_PKA_DisableIT_PROCEND(PKA_TypeDef * PKAx)372 __STATIC_INLINE void LL_PKA_DisableIT_PROCEND(PKA_TypeDef *PKAx)
373 {
374   CLEAR_BIT(PKAx->CR, PKA_CR_PROCENDIE);
375 }
376 
377 /**
378   * @brief  Check if address error interrupt is enabled.
379   * @rmtoll CR           ADDRERRIE     LL_PKA_IsEnabledIT_ADDRERR
380   * @param  PKAx PKA Instance.
381   * @retval State of bit (1 or 0).
382   */
LL_PKA_IsEnabledIT_ADDRERR(PKA_TypeDef * PKAx)383 __STATIC_INLINE uint32_t LL_PKA_IsEnabledIT_ADDRERR(PKA_TypeDef *PKAx)
384 {
385   return ((READ_BIT(PKAx->CR, PKA_CR_ADDRERRIE) == (PKA_CR_ADDRERRIE)) ? 1UL : 0UL);
386 }
387 
388 /**
389   * @brief  Check if RAM error interrupt is enabled.
390   * @rmtoll CR           RAMERRIE      LL_PKA_IsEnabledIT_RAMERR
391   * @param  PKAx PKA Instance.
392   * @retval State of bit (1 or 0).
393   */
LL_PKA_IsEnabledIT_RAMERR(PKA_TypeDef * PKAx)394 __STATIC_INLINE uint32_t LL_PKA_IsEnabledIT_RAMERR(PKA_TypeDef *PKAx)
395 {
396   return ((READ_BIT(PKAx->CR, PKA_CR_RAMERRIE) == (PKA_CR_RAMERRIE)) ? 1UL : 0UL);
397 }
398 
399 
400 /**
401   * @brief  Check if end of operation interrupt is enabled.
402   * @rmtoll CR           PROCENDIE     LL_PKA_IsEnabledIT_PROCEND
403   * @param  PKAx PKA Instance.
404   * @retval State of bit (1 or 0).
405   */
LL_PKA_IsEnabledIT_PROCEND(PKA_TypeDef * PKAx)406 __STATIC_INLINE uint32_t LL_PKA_IsEnabledIT_PROCEND(PKA_TypeDef *PKAx)
407 {
408   return ((READ_BIT(PKAx->CR, PKA_CR_PROCENDIE) == (PKA_CR_PROCENDIE)) ? 1UL : 0UL);
409 }
410 
411 /**
412   * @}
413   */
414 
415 /** @defgroup PKA_LL_EF_FLAG_Management PKA flag management
416   * @{
417   */
418 
419 /**
420   * @brief  Get PKA address error flag.
421   * @rmtoll SR           ADDRERRF      LL_PKA_IsActiveFlag_ADDRERR
422   * @param  PKAx PKA Instance.
423   * @retval State of bit (1 or 0).
424   */
LL_PKA_IsActiveFlag_ADDRERR(PKA_TypeDef * PKAx)425 __STATIC_INLINE uint32_t LL_PKA_IsActiveFlag_ADDRERR(PKA_TypeDef *PKAx)
426 {
427   return ((READ_BIT(PKAx->SR, PKA_SR_ADDRERRF) == (PKA_SR_ADDRERRF)) ? 1UL : 0UL);
428 }
429 
430 /**
431   * @brief  Get PKA RAM error flag.
432   * @rmtoll SR           RAMERRF       LL_PKA_IsActiveFlag_RAMERR
433   * @param  PKAx PKA Instance.
434   * @retval State of bit (1 or 0).
435   */
LL_PKA_IsActiveFlag_RAMERR(PKA_TypeDef * PKAx)436 __STATIC_INLINE uint32_t LL_PKA_IsActiveFlag_RAMERR(PKA_TypeDef *PKAx)
437 {
438   return ((READ_BIT(PKAx->SR, PKA_SR_RAMERRF) == (PKA_SR_RAMERRF)) ? 1UL : 0UL);
439 }
440 
441 
442 /**
443   * @brief  Get PKA end of operation flag.
444   * @rmtoll SR           PROCENDF      LL_PKA_IsActiveFlag_PROCEND
445   * @param  PKAx PKA Instance.
446   * @retval State of bit (1 or 0).
447   */
LL_PKA_IsActiveFlag_PROCEND(PKA_TypeDef * PKAx)448 __STATIC_INLINE uint32_t LL_PKA_IsActiveFlag_PROCEND(PKA_TypeDef *PKAx)
449 {
450   return ((READ_BIT(PKAx->SR, PKA_SR_PROCENDF) == (PKA_SR_PROCENDF)) ? 1UL : 0UL);
451 }
452 
453 /**
454   * @brief  Get PKA busy flag.
455   * @rmtoll SR           BUSY          LL_PKA_IsActiveFlag_BUSY
456   * @param  PKAx PKA Instance.
457   * @retval State of bit (1 or 0).
458   */
LL_PKA_IsActiveFlag_BUSY(PKA_TypeDef * PKAx)459 __STATIC_INLINE uint32_t LL_PKA_IsActiveFlag_BUSY(PKA_TypeDef *PKAx)
460 {
461   return ((READ_BIT(PKAx->SR, PKA_SR_BUSY) == (PKA_SR_BUSY)) ? 1UL : 0UL);
462 }
463 
464 /**
465   * @brief  Clear PKA address error flag.
466   * @rmtoll CLRFR        ADDRERRFC     LL_PKA_ClearFlag_ADDERR
467   * @param  PKAx PKA Instance.
468   * @retval None
469   */
LL_PKA_ClearFlag_ADDERR(PKA_TypeDef * PKAx)470 __STATIC_INLINE void LL_PKA_ClearFlag_ADDERR(PKA_TypeDef *PKAx)
471 {
472   SET_BIT(PKAx->CLRFR, PKA_CLRFR_ADDRERRFC);
473 }
474 
475 /**
476   * @brief  Clear PKA RAM error flag.
477   * @rmtoll CLRFR        RAMERRFC      LL_PKA_ClearFlag_RAMERR
478   * @param  PKAx PKA Instance.
479   * @retval None
480   */
LL_PKA_ClearFlag_RAMERR(PKA_TypeDef * PKAx)481 __STATIC_INLINE void LL_PKA_ClearFlag_RAMERR(PKA_TypeDef *PKAx)
482 {
483   SET_BIT(PKAx->CLRFR, PKA_CLRFR_RAMERRFC);
484 }
485 
486 
487 /**
488   * @brief  Clear PKA end of operation flag.
489   * @rmtoll CLRFR        PROCENDFC     LL_PKA_ClearFlag_PROCEND
490   * @param  PKAx PKA Instance.
491   * @retval None
492   */
LL_PKA_ClearFlag_PROCEND(PKA_TypeDef * PKAx)493 __STATIC_INLINE void LL_PKA_ClearFlag_PROCEND(PKA_TypeDef *PKAx)
494 {
495   SET_BIT(PKAx->CLRFR, PKA_CLRFR_PROCENDFC);
496 }
497 
498 /**
499   * @}
500   */
501 
502 #if defined(USE_FULL_LL_DRIVER)
503 
504 /** @defgroup PKA_LL_EF_Init Initialization and de-initialization functions
505   * @{
506   */
507 
508 ErrorStatus LL_PKA_DeInit(PKA_TypeDef *PKAx);
509 ErrorStatus LL_PKA_Init(PKA_TypeDef *PKAx, LL_PKA_InitTypeDef *PKA_InitStruct);
510 void LL_PKA_StructInit(LL_PKA_InitTypeDef *PKA_InitStruct);
511 
512 /**
513   * @}
514   */
515 
516 #endif /* USE_FULL_LL_DRIVER */
517 /**
518   * @}
519   */
520 
521 /**
522   * @}
523   */
524 
525 #endif /* defined(PKA) */
526 
527 /**
528   * @}
529   */
530 
531 #ifdef __cplusplus
532 }
533 #endif
534 
535 #endif /* STM32WBxx_LL_PKA_H */
536 
537 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
538