1 /**
2   ******************************************************************************
3   * @file    stm32h7xx_hal_otfdec.h
4   * @author  MCD Application Team
5   * @brief   Header file of OTFDEC HAL module.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2018 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software is licensed under terms that can be found in the LICENSE file
13   * in the root directory of this software component.
14   * If no LICENSE file comes with this software, it is provided AS-IS.
15   *
16   ******************************************************************************
17   */
18 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef STM32H7xx_HAL_OTFDEC_H
21 #define STM32H7xx_HAL_OTFDEC_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /* Includes ------------------------------------------------------------------*/
28 #include "stm32h7xx_hal_def.h"
29 
30 /** @addtogroup STM32H7xx_HAL_Driver
31   * @{
32   */
33 
34 #if defined(OTFDEC1)
35 
36 /** @addtogroup OTFDEC
37   * @{
38   */
39 
40 /* Exported types ------------------------------------------------------------*/
41 
42 /** @defgroup OTFDEC_Exported_Types OTFDEC Exported Types
43   * @{
44   */
45 
46 /** @defgroup OTFDEC_Exported_Types_Group1 OTFDEC region configuration definitions
47   * @{
48   */
49 
50 /**
51   * @brief OTFDEC region configuration structure definition
52   */
53 typedef struct
54 {
55   uint32_t          Nonce[2];        /*!< OTFDEC region nonce */
56 
57   uint32_t          StartAddress;    /*!< OTFDEC region start address */
58 
59   uint32_t          EndAddress;      /*!< OTFDEC region end address */
60 
61   uint16_t          Version;         /*!< OTFDEC region firmware version */
62 
63 } OTFDEC_RegionConfigTypeDef;
64 
65 /**
66   * @}
67   */
68 
69 /** @defgroup OTFDEC_Exported_Types_Group2 OTFDEC Peripheral handle definitions
70   * @{
71   */
72 
73 /**
74   * @brief OTFDEC states structure definition
75   */
76 typedef enum
77 {
78   HAL_OTFDEC_STATE_RESET             = 0x00U,  /*!< OTFDEC not yet initialized or disabled */
79   HAL_OTFDEC_STATE_READY             = 0x01U,  /*!< OTFDEC initialized and ready for use   */
80   HAL_OTFDEC_STATE_BUSY              = 0x02U,  /*!< OTFDEC internal processing is ongoing  */
81 } HAL_OTFDEC_StateTypeDef;
82 
83 /**
84   * @brief OTFDEC handle structure definition
85   */
86 #if (USE_HAL_OTFDEC_REGISTER_CALLBACKS == 1)
87 typedef struct __OTFDEC_HandleTypeDef
88 #else
89 typedef struct
90 #endif /* USE_HAL_OTFDEC_REGISTER_CALLBACKS */
91 {
92   OTFDEC_TypeDef             *Instance;  /*!< OTFDEC registers base address */
93 
94   HAL_OTFDEC_StateTypeDef    State;      /*!< OTFDEC state */
95 
96   HAL_LockTypeDef            Lock;       /*!< OTFDEC locking object */
97 
98   __IO uint32_t              ErrorCode;  /*!< OTFDEC error code */
99 
100 #if (USE_HAL_OTFDEC_REGISTER_CALLBACKS == 1)
101   void (* ErrorCallback)(struct __OTFDEC_HandleTypeDef *hotfdec);     /*!< OTFDEC error callback */
102 
103   void (* MspInitCallback)(struct __OTFDEC_HandleTypeDef *hotfdec);   /*!< OTFDEC Msp Init callback */
104 
105   void (* MspDeInitCallback)(struct __OTFDEC_HandleTypeDef *hotfdec); /*!< OTFDEC Msp DeInit callback */
106 #endif /* USE_HAL_OTFDEC_REGISTER_CALLBACKS */
107 
108 } OTFDEC_HandleTypeDef;
109 
110 #if (USE_HAL_OTFDEC_REGISTER_CALLBACKS == 1)
111 /**
112   * @brief  HAL OTFDEC Callback ID enumeration definition
113   */
114 typedef enum
115 {
116   HAL_OTFDEC_ERROR_CB_ID       = 0x00U,  /*!< OTFDEC error callback ID      */
117   HAL_OTFDEC_MSPINIT_CB_ID     = 0x01U,  /*!< OTFDEC Msp DeInit callback ID */
118   HAL_OTFDEC_MSPDEINIT_CB_ID   = 0x02U   /*!< OTFDEC Msp DeInit callback ID */
119 } HAL_OTFDEC_CallbackIDTypeDef;
120 
121 /**
122   * @brief  HAL OTFDEC Callback pointer definition
123   */
124 typedef  void (*pOTFDEC_CallbackTypeDef)(OTFDEC_HandleTypeDef *hotfdec); /*!< pointer to a OTFDEC callback function */
125 
126 #endif /* USE_HAL_OTFDEC_REGISTER_CALLBACKS */
127 
128 /**
129   * @}
130   */
131 
132 /**
133   * @}
134   */
135 
136 /* Exported constants --------------------------------------------------------*/
137 /** @defgroup OTFDEC_Exported_Constants OTFDEC Exported Constants
138   * @{
139   */
140 
141 /** @defgroup OTFDEC_Interrupts    OTFDEC Interrupts
142   * @{
143   */
144 #define OTFDEC_SEC_ERROR_INT     (OTFDEC_IER_SEIE                                  )  /*!< OTFDEC security error interrupt                  */
145 #define OTFDEC_EXE_ERROR_INT     (               OTFDEC_IER_XONEIE                 )  /*!< OTFDEC execution error interrupt                 */
146 #define OTFDEC_KEY_ERROR_INT     (                                  OTFDEC_IER_KEIE)  /*!< OTFDEC key error interrupt                       */
147 #define OTFDEC_SEC_EXE_ERROR_INT (OTFDEC_IER_SEIE|OTFDEC_IER_XONEIE                )  /*!< OTFDEC security and execution errors interrupts  */
148 #define OTFDEC_SEC_KEY_ERROR_INT (OTFDEC_IER_SEIE|                  OTFDEC_IER_KEIE)  /*!< OTFDEC security and key errors interrupts        */
149 #define OTFDEC_EXE_KEY_ERROR_INT (                OTFDEC_IER_XONEIE|OTFDEC_IER_KEIE)  /*!< OTFDEC execution and key errors interrupts       */
150 #define OTFDEC_ALL_INT           (OTFDEC_IER_SEIE|OTFDEC_IER_XONEIE|OTFDEC_IER_KEIE)  /*!< OTFDEC all interrupts                            */
151 /**
152   * @}
153   */
154 
155 /** @defgroup OTFDEC_Region_Enable   OTFDEC Region Enable
156   * @{
157   */
158 #define OTFDEC_REG_CONFIGR_REG_DISABLE   0x00000000U                /*!< OTFDEC region encryption or on-the-fly decryption disable */
159 #define OTFDEC_REG_CONFIGR_REG_ENABLE    OTFDEC_REG_CONFIGR_REG_EN  /*!< OTFDEC region encryption or on-the-fly decryption enable  */
160 /**
161   * @}
162   */
163 
164 /** @defgroup OTFDEC_Region_Configuration_Lock    OTFDEC Region Configuration Lock
165   * @{
166   */
167 #define OTFDEC_REG_CONFIGR_LOCK_DISABLE   0x00000000U                     /*!< OTFDEC region configuration lock disable */
168 #define OTFDEC_REG_CONFIGR_LOCK_ENABLE    OTFDEC_REG_CONFIGR_CONFIGLOCK   /*!< OTFDEC region configuration lock enable  */
169 /**
170   * @}
171   */
172 
173 /** @defgroup OTFDEC_Region_Operating_Mode    OTFDEC Region Operating Mode
174   * @{
175   */
176 #define OTFDEC_REG_MODE_INSTRUCTION_ACCESSES_ONLY              0x00000000U                /*!< Only instruction accesses are decrypted                                   */
177 #define OTFDEC_REG_MODE_DATA_ACCESSES_ONLY                     OTFDEC_REG_CONFIGR_MODE_0  /*!< Only data accesses are decrypted                                          */
178 #define OTFDEC_REG_MODE_INSTRUCTION_OR_DATA_ACCESSES           OTFDEC_REG_CONFIGR_MODE_1  /*!< All read accesses are decrypted                                           */
179 #define OTFDEC_REG_MODE_INSTRUCTION_ACCESSES_ONLY_WITH_CIPHER  OTFDEC_REG_CONFIGR_MODE    /*!< Only instruction accesses are decrypted with proprietary cipher activated */
180 /**
181   * @}
182   */
183 
184 /** @defgroup OTFDEC_Error_Definition   OTFDEC Error Definition
185   * @{
186   */
187 #define  HAL_OTFDEC_ERROR_NONE             ((uint32_t)0x00000000U)    /*!< No error                         */
188 #define  HAL_OTFDEC_SECURITY_ERROR         ((uint32_t)0x00000001U)    /*!< Security error                   */
189 #define  HAL_OTFDEC_EXECUTE_ERROR          ((uint32_t)0x00000002U)    /*!< Execute-only Execute-Never error */
190 #define  HAL_OTFDEC_KEY_ERROR              ((uint32_t)0x00000004U)    /*!< Key error                        */
191 #if (USE_HAL_OTFDEC_REGISTER_CALLBACKS == 1)
192 #define HAL_OTFDEC_ERROR_INVALID_CALLBACK  ((uint32_t)0x00000008U)   /*!< Invalid Callback error            */
193 #endif /* USE_HAL_OTFDEC_REGISTER_CALLBACKS */
194 /**
195   * @}
196   */
197 
198 /** @defgroup OTFDEC_Regions_Index   OTFDEC Regions Index
199   * @{
200   */
201 #define  OTFDEC_REGION1            ((uint32_t)0x00000000U)    /*!< OTFDEC region 1 */
202 #define  OTFDEC_REGION2            ((uint32_t)0x00000001U)    /*!< OTFDEC region 2 */
203 #define  OTFDEC_REGION3            ((uint32_t)0x00000002U)    /*!< OTFDEC region 3 */
204 #define  OTFDEC_REGION4            ((uint32_t)0x00000003U)    /*!< OTFDEC region 4 */
205 /**
206   * @}
207   */
208 
209 /**
210   * @}
211   */
212 
213 /* Exported macro ------------------------------------------------------------*/
214 /** @defgroup OTFDEC_Exported_Macros OTFDEC Exported Macros
215   * @{
216   */
217 
218 /** @brief  Reset OTFDEC handle state.
219   * @param  __HANDLE__ pointer to an OTFDEC_HandleTypeDef structure that contains
220   *         the configuration information for OTFDEC module
221   * @retval None
222   */
223 #if (USE_HAL_OTFDEC_REGISTER_CALLBACKS == 1)
224 #define __HAL_OTFDEC_RESET_HANDLE_STATE(__HANDLE__)                            \
225   do{                                                                          \
226     (__HANDLE__)->State = HAL_OTFDEC_STATE_RESET;                              \
227     (__HANDLE__)->MspInitCallback = NULL;                                      \
228     (__HANDLE__)->MspDeInitCallback = NULL;                                    \
229   } while(0)
230 #else
231 #define __HAL_OTFDEC_RESET_HANDLE_STATE(__HANDLE__)                            \
232   ((__HANDLE__)->State = HAL_OTFDEC_STATE_RESET)
233 #endif /* USE_HAL_OTFDEC_REGISTER_CALLBACKS */
234 
235 /**
236   * @brief  Enable OTFDEC peripheral interrupts combination
237   * @param  __HANDLE__ pointer to an OTFDEC_HandleTypeDef structure that contains
238   *         the configuration information for OTFDEC module
239   * @param  __INTERRUPT__ mask on enabled interrupts
240   *          This parameter can be one of the following values:
241   *            @arg @ref OTFDEC_SEC_ERROR_INT        OTFDEC security error interrupt
242   *            @arg @ref OTFDEC_EXE_ERROR_INT        OTFDEC execution error interrupt
243   *            @arg @ref OTFDEC_KEY_ERROR_INT        OTFDEC key error interrupt
244   *            @arg @ref OTFDEC_SEC_EXE_ERROR_INT    OTFDEC security and execution errors interrupts
245   *            @arg @ref OTFDEC_SEC_KEY_ERROR_INT    OTFDEC security and key errors interrupts
246   *            @arg @ref OTFDEC_EXE_KEY_ERROR_INT    OTFDEC execution and key errors interrupts
247   *            @arg @ref OTFDEC_ALL_INT              OTFDEC all interrupts
248   * @retval None
249   */
250 #define __HAL_OTFDEC_ENABLE_IT(__HANDLE__, __INTERRUPT__)  SET_BIT(((__HANDLE__)->Instance->IER), (__INTERRUPT__))
251 
252 /**
253   * @brief  Disable OTFDEC peripheral interrupts combination
254   * @param  __HANDLE__ pointer to an OTFDEC_HandleTypeDef structure that contains
255   *         the configuration information for OTFDEC module
256   * @param  __INTERRUPT__ mask on disabled interrupts
257   *          This parameter can be one of the following values:
258   *            @arg @ref OTFDEC_SEC_ERROR_INT        OTFDEC security error interrupt
259   *            @arg @ref OTFDEC_EXE_ERROR_INT        OTFDEC execution error interrupt
260   *            @arg @ref OTFDEC_KEY_ERROR_INT        OTFDEC key error interrupt
261   *            @arg @ref OTFDEC_SEC_EXE_ERROR_INT    OTFDEC security and execution errors interrupts
262   *            @arg @ref OTFDEC_SEC_KEY_ERROR_INT    OTFDEC security and key errors interrupts
263   *            @arg @ref OTFDEC_EXE_KEY_ERROR_INT    OTFDEC execution and key errors interrupts
264   *            @arg @ref OTFDEC_ALL_INT              OTFDEC all interrupts
265   * @retval None
266   */
267 #define __HAL_OTFDEC_DISABLE_IT(__HANDLE__, __INTERRUPT__)  CLEAR_BIT(((__HANDLE__)->Instance->IER), (__INTERRUPT__))
268 
269 /** @brief  Check whether the specified combination of OTFDEC interrupt flags is set or not.
270   * @param  __HANDLE__ pointer to an OTFDEC_HandleTypeDef structure that contains
271   *         the configuration information for OTFDEC module
272   * @param  __FLAG__ mask on combination of interrupts flags
273   *          This parameter can be one of the following values:
274   *            @arg @ref OTFDEC_SEC_ERROR_INT        OTFDEC security error interrupt flag
275   *            @arg @ref OTFDEC_EXE_ERROR_INT        OTFDEC execution error interrupt flag
276   *            @arg @ref OTFDEC_KEY_ERROR_INT        OTFDEC key error interrupt flag
277   *            @arg @ref OTFDEC_SEC_EXE_ERROR_INT    OTFDEC security and execution errors interrupts flags
278   *            @arg @ref OTFDEC_SEC_KEY_ERROR_INT    OTFDEC security and key errors interrupts flags
279   *            @arg @ref OTFDEC_EXE_KEY_ERROR_INT    OTFDEC execution and key errors interrupts flag
280   *            @arg @ref OTFDEC_ALL_INT              OTFDEC all interrupts flags
281   * @retval The state of __FLAG__ (TRUE or FALSE).
282   */
283 #define __HAL_OTFDEC_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))
284 
285 /** @brief  Clear the specified combination of OTFDEC interrupt flags.
286   * @param  __HANDLE__ pointer to an OTFDEC_HandleTypeDef structure that contains
287   *         the configuration information for OTFDEC module
288   * @param  __FLAG__ mask on combination of interrupts flags
289   *          This parameter can be one of the following values:
290   *            @arg @ref OTFDEC_SEC_ERROR_INT        OTFDEC security error interrupt flag
291   *            @arg @ref OTFDEC_EXE_ERROR_INT        OTFDEC execution error interrupt flag
292   *            @arg @ref OTFDEC_KEY_ERROR_INT        OTFDEC key error interrupt flag
293   *            @arg @ref OTFDEC_SEC_EXE_ERROR_INT    OTFDEC security and execution errors interrupts flags
294   *            @arg @ref OTFDEC_SEC_KEY_ERROR_INT    OTFDEC security and key errors interrupts flags
295   *            @arg @ref OTFDEC_EXE_KEY_ERROR_INT    OTFDEC execution and key errors interrupts flag
296   *            @arg @ref OTFDEC_ALL_INT              OTFDEC all interrupts flags
297   * @retval None
298   */
299 #define __HAL_OTFDEC_CLEAR_FLAG(__HANDLE__, __FLAG__) SET_BIT((__HANDLE__)->Instance->ICR, (__FLAG__))
300 
301 /**
302   * @}
303   */
304 
305 /* Exported functions --------------------------------------------------------*/
306 /** @defgroup OTFDEC_Exported_Functions OTFDEC Exported Functions
307   * @{
308   */
309 
310 /** @addtogroup OTFDEC_Exported_Functions_Group1 Initialization and de-initialization functions
311   * @{
312   */
313 HAL_StatusTypeDef HAL_OTFDEC_Init(OTFDEC_HandleTypeDef *hotfdec);
314 HAL_StatusTypeDef HAL_OTFDEC_DeInit(OTFDEC_HandleTypeDef *hotfdec);
315 void HAL_OTFDEC_MspInit(OTFDEC_HandleTypeDef *hotfdec);
316 void HAL_OTFDEC_MspDeInit(OTFDEC_HandleTypeDef *hotfdec);
317 
318 #if (USE_HAL_OTFDEC_REGISTER_CALLBACKS == 1)
319 /* Callbacks Register/UnRegister functions  ***********************************/
320 HAL_StatusTypeDef HAL_OTFDEC_RegisterCallback(OTFDEC_HandleTypeDef *hotfdec, HAL_OTFDEC_CallbackIDTypeDef CallbackID,
321                                               pOTFDEC_CallbackTypeDef pCallback);
322 HAL_StatusTypeDef HAL_OTFDEC_UnRegisterCallback(OTFDEC_HandleTypeDef *hotfdec, HAL_OTFDEC_CallbackIDTypeDef CallbackID);
323 #endif /* USE_HAL_OTFDEC_REGISTER_CALLBACKS */
324 /**
325   * @}
326   */
327 
328 
329 /** @addtogroup OTFDEC_Exported_Functions_Group2 OTFDEC IRQ handler management
330   * @{
331   */
332 void HAL_OTFDEC_IRQHandler(OTFDEC_HandleTypeDef *hotfdec);
333 void HAL_OTFDEC_ErrorCallback(OTFDEC_HandleTypeDef *hotfdec);
334 /**
335   * @}
336   */
337 
338 /** @addtogroup OTFDEC_Exported_Functions_Group3 Peripheral Control functions
339   * @{
340   */
341 HAL_StatusTypeDef HAL_OTFDEC_RegionKeyLock(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex);
342 HAL_StatusTypeDef HAL_OTFDEC_RegionSetKey(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex, uint32_t *pKey);
343 HAL_StatusTypeDef HAL_OTFDEC_RegionSetMode(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex, uint32_t mode);
344 HAL_StatusTypeDef HAL_OTFDEC_RegionConfig(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex,
345                                           OTFDEC_RegionConfigTypeDef *Config, uint32_t lock);
346 uint32_t HAL_OTFDEC_KeyCRCComputation(uint32_t *pKey);
347 HAL_StatusTypeDef HAL_OTFDEC_RegionEnable(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex);
348 HAL_StatusTypeDef HAL_OTFDEC_RegionDisable(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex);
349 /**
350   * @}
351   */
352 
353 /** @addtogroup @addtogroup OTFDEC_Exported_Functions_Group4 Peripheral State and Status functions
354   * @{
355   */
356 HAL_OTFDEC_StateTypeDef HAL_OTFDEC_GetState(OTFDEC_HandleTypeDef *hotfdec);
357 uint32_t HAL_OTFDEC_RegionGetKeyCRC(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex);
358 HAL_StatusTypeDef HAL_OTFDEC_RegionGetConfig(OTFDEC_HandleTypeDef *hotfdec, uint32_t RegionIndex,
359                                              OTFDEC_RegionConfigTypeDef *Config);
360 /**
361   * @}
362   */
363 
364 /**
365   * @}
366   */
367 
368 /* Private types -------------------------------------------------------------*/
369 /** @defgroup OTFDEC_Private_Types OTFDEC Private Types
370   * @{
371   */
372 
373 /**
374   * @}
375   */
376 
377 /* Private variables ---------------------------------------------------------*/
378 /** @defgroup OTFDEC_Private_Variables OTFDEC Private Variables
379   * @{
380   */
381 
382 /**
383   * @}
384   */
385 
386 /* Private constants ---------------------------------------------------------*/
387 /** @defgroup OTFDEC_Private_Constants OTFDEC Private Constants
388   * @{
389   */
390 /**
391   * @}
392   */
393 
394 /* Private macros ------------------------------------------------------------*/
395 /** @defgroup OTFDEC_Private_Macros OTFDEC Private Macros
396   * @{
397   */
398 
399 /**
400   * @brief Verify the OTFDEC peripheral interrupts parameter.
401   * @param __INT__ OTFDEC peripheral set of interrupts parameter
402   * @retval SET (__INT__ is valid) or RESET (__INT__ is invalid)
403   */
404 #define IS_OTFDEC_INTERRUPTS(__INT__) (((__INT__) == OTFDEC_SEC_ERROR_INT)     || \
405                                        ((__INT__) == OTFDEC_EXE_ERROR_INT)     || \
406                                        ((__INT__) == OTFDEC_KEY_ERROR_INT)     || \
407                                        ((__INT__) == OTFDEC_SEC_EXE_ERROR_INT) || \
408                                        ((__INT__) == OTFDEC_SEC_KEY_ERROR_INT) || \
409                                        ((__INT__) == OTFDEC_EXE_KEY_ERROR_INT) || \
410                                        ((__INT__) == OTFDEC_ALL_INT)  )
411 
412 /**
413   * @brief Verify the OTFDEC region configuration lock parameter.
414   * @param __LOCK__ OTFDEC region lock parameter.
415   * @retval SET (__LOCK__ is valid) or RESET (__LOCK__ is invalid)
416   */
417 #define IS_OTFDEC_REGION_CONFIG_LOCK(__LOCK__) (((__LOCK__) == OTFDEC_REG_CONFIGR_LOCK_DISABLE) || \
418                                                 ((__LOCK__) == OTFDEC_REG_CONFIGR_LOCK_ENABLE)  )
419 
420 /**
421   * @brief Verify the OTFDEC region operating mode.
422   * @param __MODE__ OTFDEC region operating mode parameter.
423   * @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
424   */
425 #define IS_OTFDEC_REGION_OPERATING_MODE(__MODE__) \
426   (((__MODE__)== OTFDEC_REG_MODE_INSTRUCTION_ACCESSES_ONLY)    || \
427    ((__MODE__) == OTFDEC_REG_MODE_DATA_ACCESSES_ONLY)           || \
428    ((__MODE__) == OTFDEC_REG_MODE_INSTRUCTION_OR_DATA_ACCESSES) || \
429    ((__MODE__) == OTFDEC_REG_MODE_INSTRUCTION_ACCESSES_ONLY_WITH_CIPHER))
430 
431 /**
432   * @brief Verify the OTFDEC region index.
433   * @param __INDEX__ OTFDEC region index
434   * @retval SET (__INDEX__ is valid) or RESET (__INDEX__ is invalid)
435   */
436 #define IS_OTFDEC_REGIONINDEX(__INDEX__) (((__INDEX__) == OTFDEC_REGION1)     || \
437                                           ((__INDEX__) == OTFDEC_REGION2)     || \
438                                           ((__INDEX__) == OTFDEC_REGION3)     || \
439                                           ((__INDEX__) == OTFDEC_REGION4)  )
440 
441 /**
442   * @brief Verify the OTFDEC configuration attributes.
443   * @param __ATTRIBUTE__ OTFDEC region index
444   * @retval SET (__ATTRIBUTE__ is valid) or RESET (__ATTRIBUTE__ is invalid)
445   */
446 #define IS_OTFDEC_ATTRIBUTE(__ATTRIBUTE__) (((__ATTRIBUTE__) == OTFDEC_ATTRIBUTE_PRIV)   || \
447                                             ((__ATTRIBUTE__) == OTFDEC_ATTRIBUTE_NPRIV)  )
448 
449 /**
450   * @}
451   */
452 
453 /* Private functions ---------------------------------------------------------*/
454 /** @defgroup OTFDEC_Private_Functions OTFDEC Private Functions
455   * @{
456   */
457 
458 /**
459   * @}
460   */
461 
462 /**
463   * @}
464   */
465 
466 #endif /* OTFDEC1 */
467 
468 /**
469   * @}
470   */
471 
472 #ifdef __cplusplus
473 }
474 #endif
475 
476 #endif /* STM32H7xx_HAL_OTFDEC_H */
477