stm32h7xx_hal_ramecc.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32H7xx_HAL_RAMECC_H
22 #define STM32H7xx_HAL_RAMECC_H
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32h7xx_hal_def.h"
30 
39 /* Exported types ------------------------------------------------------------*/
40 
49 typedef enum
50 {
56 
57 
62 typedef struct __RAMECC_HandleTypeDef
63 {
66  __IO uint32_t ErrorCode;
67  void (* DetectErrorCallback)( struct __RAMECC_HandleTypeDef *hramecc);
69 
75 /* Exported constants --------------------------------------------------------*/
76 
80 #define HAL_RAMECC_ERROR_NONE 0x00000000U
81 #define HAL_RAMECC_ERROR_TIMEOUT 0x00000001U
82 #define HAL_RAMECC_ERROR_BUSY 0x00000002U
83 #define HAL_RAMECC_ERROR_INVALID_CALLBACK 0x00000003U
91 #define RAMECC_IT_GLOBAL_ID 0x10000000UL
92 #define RAMECC_IT_MONITOR_ID 0x20000000UL
93 
94 #define RAMECC_IT_GLOBAL_ENABLE (RAMECC_IT_GLOBAL_ID | RAMECC_IER_GIE)
95 #define RAMECC_IT_GLOBAL_SINGLEERR_R (RAMECC_IT_GLOBAL_ID | RAMECC_IER_GECCSEIE)
96 #define RAMECC_IT_GLOBAL_DOUBLEERR_R (RAMECC_IT_GLOBAL_ID | RAMECC_IER_GECCDEIE)
97 #define RAMECC_IT_GLOBAL_DOUBLEERR_W (RAMECC_IT_GLOBAL_ID | RAMECC_IER_GECCDEBWIE)
98 #define RAMECC_IT_GLOBAL_ALL (RAMECC_IT_GLOBAL_ID | RAMECC_IER_GIE | RAMECC_IER_GECCSEIE | RAMECC_IER_GECCDEIE | RAMECC_IER_GECCDEBWIE)
99 
100 
101 #define RAMECC_IT_MONITOR_SINGLEERR_R (RAMECC_IT_MONITOR_ID | RAMECC_CR_ECCSEIE)
102 #define RAMECC_IT_MONITOR_DOUBLEERR_R (RAMECC_IT_MONITOR_ID | RAMECC_CR_ECCDEIE)
103 #define RAMECC_IT_MONITOR_DOUBLEERR_W (RAMECC_IT_MONITOR_ID | RAMECC_CR_ECCDEBWIE)
104 #define RAMECC_IT_MONITOR_ALL (RAMECC_IT_MONITOR_ID | RAMECC_CR_ECCDEBWIE | RAMECC_CR_ECCDEIE | RAMECC_CR_ECCSEIE)
105 
112 #define RAMECC_FLAG_SINGLEERR_R RAMECC_SR_SEDCF
113 #define RAMECC_FLAG_DOUBLEERR_R RAMECC_SR_DEDF
114 #define RAMECC_FLAG_DOUBLEERR_W RAMECC_SR_DEBWDF
115 #define RAMECC_FLAGS_ALL (RAMECC_SR_SEDCF | RAMECC_SR_DEDF | RAMECC_SR_DEBWDF)
116 
121 /* Exported macro ------------------------------------------------------------*/
126 #define __HAL_RAMECC_ENABLE_GLOBAL_IT(__HANDLE__, __INTERRUPT__) ((((RAMECC_TypeDef *)((uint32_t)(__HANDLE__)->Instance & 0xFFFFFF00U))->IER) |= ((__INTERRUPT__) & ~RAMECC_IT_GLOBAL_ID))
127 #define __HAL_RAMECC_ENABLE_MONITOR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= ((__INTERRUPT__) & ~RAMECC_IT_MONITOR_ID))
128 
145 #define __HAL_RAMECC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ( \
146 (IS_RAMECC_GLOBAL_INTERRUPT(__INTERRUPT__)) ? (__HAL_RAMECC_ENABLE_GLOBAL_IT((__HANDLE__), (__INTERRUPT__))) :\
147 (__HAL_RAMECC_ENABLE_MONITOR_IT((__HANDLE__), (__INTERRUPT__))))
148 
149 
150 #define __HAL_RAMECC_DISABLE_GLOBAL_IT(__HANDLE__, __INTERRUPT__) ((((RAMECC_TypeDef *)((uint32_t)(__HANDLE__)->Instance & 0xFFFFFF00U))->IER) &= ~((__INTERRUPT__) & ~RAMECC_IT_GLOBAL_ID))
151 #define __HAL_RAMECC_DISABLE_MONITOR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~((__INTERRUPT__) & ~RAMECC_IT_MONITOR_ID))
152 
169 #define __HAL_RAMECC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ( \
170 (IS_RAMECC_GLOBAL_INTERRUPT(__INTERRUPT__)) ? (__HAL_RAMECC_DISABLE_GLOBAL_IT((__HANDLE__), (__INTERRUPT__))) :\
171 (__HAL_RAMECC_DISABLE_MONITOR_IT((__HANDLE__), (__INTERRUPT__))))
172 
173 
174 #define __HAL_RAMECC_GET_GLOBAL_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((RAMECC_TypeDef *)((uint32_t)(__HANDLE__)->Instance & 0xFFFFFF00U))->IER) & ((__INTERRUPT__) & ~RAMECC_IT_GLOBAL_ID)) ? SET : RESET)
175 #define __HAL_RAMECC_GET_MONITOR_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR) & ((__INTERRUPT__) & ~RAMECC_IT_GLOBAL_ID)) ? SET : RESET)
176 
193 #define __HAL_RAMECC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ( \
194 (IS_RAMECC_GLOBAL_INTERRUPT(__INTERRUPT__)) ? (__HAL_RAMECC_GET_GLOBAL_IT_SOURCE((__HANDLE__), (__INTERRUPT__))) :\
195 (__HAL_RAMECC_GET_MONITOR_IT_SOURCE((__HANDLE__), (__INTERRUPT__))))
196 
197 
209 #define __HAL_RAMECC_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR &= (__FLAG__))
210 
211 
223 #define __HAL_RAMECC_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR &= ~(__FLAG__))
224 
230 #define __HAL_RAMECC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_RAMECC_STATE_RESET)
231 
235 /* Exported functions --------------------------------------------------------*/
236 
258 HAL_StatusTypeDef HAL_RAMECC_EnableNotification (RAMECC_HandleTypeDef *hramecc, uint32_t Notifications);
286 uint32_t HAL_RAMECC_GetError (RAMECC_HandleTypeDef *hramecc);
294 /* Private Constants -------------------------------------------------------------*/
303 /* Private macros ------------------------------------------------------------*/
309 #define IS_RAMECC_GLOBAL_INTERRUPT(INTERRUPT) (((INTERRUPT) == RAMECC_IT_GLOBAL_ENABLE) || \
310  ((INTERRUPT) == RAMECC_IT_GLOBAL_SINGLEERR_R) || \
311  ((INTERRUPT) == RAMECC_IT_GLOBAL_DOUBLEERR_R) || \
312  ((INTERRUPT) == RAMECC_IT_GLOBAL_DOUBLEERR_W) || \
313  ((INTERRUPT) == RAMECC_IT_GLOBAL_ALL))
314 
315 
316 #define IS_RAMECC_MONITOR_INTERRUPT(INTERRUPT) (((INTERRUPT) == RAMECC_IT_MONITOR_SINGLEERR_R) || \
317  ((INTERRUPT) == RAMECC_IT_MONITOR_DOUBLEERR_R) || \
318  ((INTERRUPT) == RAMECC_IT_MONITOR_DOUBLEERR_W) || \
319  ((INTERRUPT) == RAMECC_IT_MONITOR_ALL))
320 
321 #define IS_RAMECC_INTERRUPT(INTERRUPT) ((IS_RAMECC_GLOBAL_INTERRUPT(INTERRUPT)) || \
322  (IS_RAMECC_MONITOR_INTERRUPT(INTERRUPT)))
323 
332 /* Private functions ---------------------------------------------------------*/
352 #ifdef __cplusplus
353 }
354 #endif
355 
356 #endif /* STM32H7xx_HAL_RAMECC_H */
357 
358 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
HAL_RAMECC_DisableNotification
HAL_StatusTypeDef HAL_RAMECC_DisableNotification(RAMECC_HandleTypeDef *hramecc, uint32_t Notifications)
__IO
#define __IO
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:237
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
HAL_RAMECC_GetState
HAL_RAMECC_StateTypeDef HAL_RAMECC_GetState(RAMECC_HandleTypeDef *hramecc)
HAL_RAMECC_GetError
uint32_t HAL_RAMECC_GetError(RAMECC_HandleTypeDef *hramecc)
HAL_RAMECC_IRQHandler
void HAL_RAMECC_IRQHandler(RAMECC_HandleTypeDef *hramecc)
HAL_RAMECC_IsECCDoubleErrorDetected
uint32_t HAL_RAMECC_IsECCDoubleErrorDetected(RAMECC_HandleTypeDef *hramecc)
HAL_RAMECC_DeInit
HAL_StatusTypeDef HAL_RAMECC_DeInit(RAMECC_HandleTypeDef *hramecc)
__RAMECC_HandleTypeDef::ErrorCode
__IO uint32_t ErrorCode
Definition: stm32h7xx_hal_ramecc.h:66
RAMECC_MonitorTypeDef
RAM_ECC_Specific_Registers.
Definition: stm32h735xx.h:1648
HAL_RAMECC_EnableNotification
HAL_StatusTypeDef HAL_RAMECC_EnableNotification(RAMECC_HandleTypeDef *hramecc, uint32_t Notifications)
HAL_RAMECC_GetHammingErrorCode
uint32_t HAL_RAMECC_GetHammingErrorCode(RAMECC_HandleTypeDef *hramecc)
HAL_RAMECC_UnRegisterCallback
HAL_StatusTypeDef HAL_RAMECC_UnRegisterCallback(RAMECC_HandleTypeDef *hramecc)
HAL_RAMECC_Init
HAL_StatusTypeDef HAL_RAMECC_Init(RAMECC_HandleTypeDef *hramecc)
__RAMECC_HandleTypeDef::Instance
RAMECC_MonitorTypeDef * Instance
Definition: stm32h7xx_hal_ramecc.h:64
__RAMECC_HandleTypeDef::DetectErrorCallback
void(* DetectErrorCallback)(struct __RAMECC_HandleTypeDef *hramecc)
Definition: stm32h7xx_hal_ramecc.h:67
HAL_RAMECC_GetFailingDataLow
uint32_t HAL_RAMECC_GetFailingDataLow(RAMECC_HandleTypeDef *hramecc)
HAL_RAMECC_STATE_BUSY
@ HAL_RAMECC_STATE_BUSY
Definition: stm32h7xx_hal_ramecc.h:53
HAL_RAMECC_GetFailingAddress
uint32_t HAL_RAMECC_GetFailingAddress(RAMECC_HandleTypeDef *hramecc)
HAL_RAMECC_STATE_READY
@ HAL_RAMECC_STATE_READY
Definition: stm32h7xx_hal_ramecc.h:52
__RAMECC_HandleTypeDef
RAMECC handle Structure definition.
Definition: stm32h7xx_hal_ramecc.h:62
HAL_RAMECC_GetFailingDataHigh
uint32_t HAL_RAMECC_GetFailingDataHigh(RAMECC_HandleTypeDef *hramecc)
HAL_RAMECC_RegisterCallback
HAL_StatusTypeDef HAL_RAMECC_RegisterCallback(RAMECC_HandleTypeDef *hramecc, void(*pCallback)(RAMECC_HandleTypeDef *_hramecc))
stm32h7xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
RAMECC_HandleTypeDef
struct __RAMECC_HandleTypeDef RAMECC_HandleTypeDef
RAMECC handle Structure definition.
HAL_RAMECC_StartMonitor
HAL_StatusTypeDef HAL_RAMECC_StartMonitor(RAMECC_HandleTypeDef *hramecc)
HAL_RAMECC_StateTypeDef
HAL_RAMECC_StateTypeDef
HAL RAMECC State structures definition.
Definition: stm32h7xx_hal_ramecc.h:49
HAL_RAMECC_StopMonitor
HAL_StatusTypeDef HAL_RAMECC_StopMonitor(RAMECC_HandleTypeDef *hramecc)
__RAMECC_HandleTypeDef::State
__IO HAL_RAMECC_StateTypeDef State
Definition: stm32h7xx_hal_ramecc.h:65
HAL_RAMECC_STATE_ERROR
@ HAL_RAMECC_STATE_ERROR
Definition: stm32h7xx_hal_ramecc.h:54
HAL_RAMECC_STATE_RESET
@ HAL_RAMECC_STATE_RESET
Definition: stm32h7xx_hal_ramecc.h:51
HAL_RAMECC_IsECCSingleErrorDetected
uint32_t HAL_RAMECC_IsECCSingleErrorDetected(RAMECC_HandleTypeDef *hramecc)


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:54