extern
porcupine
demo
mcu
stm32h747
stm32h747i-disco
CM7
Drivers
STM32H7xx_HAL_Driver
Inc
stm32h747/stm32h747i-disco/CM7/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h
Go to the documentation of this file.
1
21
/* Define to prevent recursive inclusion -------------------------------------*/
22
#ifndef STM32H7xx_HAL_DEF
23
#define STM32H7xx_HAL_DEF
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
/* Includes ------------------------------------------------------------------*/
30
#include "stm32h7xx.h"
31
#include "Legacy/stm32_hal_legacy.h"
32
#include <stddef.h>
33
#include <math.h>
34
35
/* Exported types ------------------------------------------------------------*/
36
40
typedef
enum
41
{
42
HAL_OK
= 0x00,
43
HAL_ERROR
= 0x01,
44
HAL_BUSY
= 0x02,
45
HAL_TIMEOUT
= 0x03
46
}
HAL_StatusTypeDef
;
47
51
typedef
enum
52
{
53
HAL_UNLOCKED
= 0x00,
54
HAL_LOCKED
= 0x01
55
}
HAL_LockTypeDef
;
56
57
/* Exported macro ------------------------------------------------------------*/
58
59
#define HAL_MAX_DELAY 0xFFFFFFFFU
60
61
#define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) == (BIT))
62
#define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == 0U)
63
64
#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \
65
do{ \
66
(__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \
67
(__DMA_HANDLE__).Parent = (__HANDLE__); \
68
} while(0)
69
70
#define UNUSED(x) ((void)(x))
71
87
#define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0)
88
89
#if (USE_RTOS == 1)
90
#error " USE_RTOS should be 0 in the current HAL release "
91
#else
92
#define __HAL_LOCK(__HANDLE__) \
93
do{ \
94
if((__HANDLE__)->Lock == HAL_LOCKED) \
95
{ \
96
return HAL_BUSY; \
97
} \
98
else \
99
{ \
100
(__HANDLE__)->Lock = HAL_LOCKED; \
101
} \
102
}while (0)
103
104
#define __HAL_UNLOCK(__HANDLE__) \
105
do{ \
106
(__HANDLE__)->Lock = HAL_UNLOCKED; \
107
}while (0)
108
#endif
/* USE_RTOS */
109
110
#if defined ( __GNUC__ )
111
#ifndef __weak
112
#define __weak __attribute__((weak))
113
#endif
/* __weak */
114
#ifndef __packed
115
#define __packed __attribute__((__packed__))
116
#endif
/* __packed */
117
#endif
/* __GNUC__ */
118
119
120
/* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */
121
#if defined (__GNUC__)
/* GNU Compiler */
122
#ifndef __ALIGN_END
123
#define __ALIGN_END __attribute__ ((aligned (4)))
124
#endif
/* __ALIGN_END */
125
#ifndef __ALIGN_BEGIN
126
#define __ALIGN_BEGIN
127
#endif
/* __ALIGN_BEGIN */
128
#else
129
#ifndef __ALIGN_END
130
#define __ALIGN_END
131
#endif
/* __ALIGN_END */
132
#ifndef __ALIGN_BEGIN
133
#if defined (__CC_ARM)
/* ARM Compiler */
134
#define __ALIGN_BEGIN __align(4)
135
#elif defined (__ICCARM__)
/* IAR Compiler */
136
#define __ALIGN_BEGIN
137
#endif
/* __CC_ARM */
138
#endif
/* __ALIGN_BEGIN */
139
#endif
/* __GNUC__ */
140
141
/* Macro to get variable aligned on 32-bytes,needed for cache maintenance purpose */
142
#if defined (__GNUC__)
/* GNU Compiler */
143
#define ALIGN_32BYTES(buf) buf __attribute__ ((aligned (32)))
144
#elif defined (__ICCARM__)
/* IAR Compiler */
145
#define ALIGN_32BYTES(buf) _Pragma("data_alignment=32") buf
146
#elif defined (__CC_ARM)
/* ARM Compiler */
147
#define ALIGN_32BYTES(buf) __align(32) buf
148
#endif
149
153
#if defined ( __CC_ARM )
154
/* ARM Compiler
155
------------
156
RAM functions are defined using the toolchain options.
157
Functions that are executed in RAM should reside in a separate source module.
158
Using the 'Options for File' dialog you can simply change the 'Code / Const'
159
area of a module to a memory space in physical RAM.
160
Available memory areas are declared in the 'Target' tab of the 'Options for Target'
161
dialog.
162
*/
163
#define __RAM_FUNC
164
165
#elif defined ( __ICCARM__ )
166
/* ICCARM Compiler
167
---------------
168
RAM functions are defined using a specific toolchain keyword "__ramfunc".
169
*/
170
#define __RAM_FUNC __ramfunc
171
172
#elif defined ( __GNUC__ )
173
/* GNU Compiler
174
------------
175
RAM functions are defined using a specific toolchain attribute
176
"__attribute__((section(".RamFunc")))".
177
*/
178
#define __RAM_FUNC __attribute__((section(".RamFunc")))
179
180
#endif
181
182
#ifdef __cplusplus
183
}
184
#endif
185
186
#endif
/* STM32H7xx_HAL_DEF */
187
188
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
HAL_OK
@ HAL_OK
Definition:
stm32h747/stm32h747i-disco/CM7/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:42
HAL_LockTypeDef
HAL_LockTypeDef
HAL Lock structures definition.
Definition:
stm32h747/stm32h747i-disco/CM7/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:51
HAL_BUSY
@ HAL_BUSY
Definition:
stm32h747/stm32h747i-disco/CM7/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:44
HAL_TIMEOUT
@ HAL_TIMEOUT
Definition:
stm32h747/stm32h747i-disco/CM7/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:45
HAL_ERROR
@ HAL_ERROR
Definition:
stm32h747/stm32h747i-disco/CM7/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:43
HAL_LOCKED
@ HAL_LOCKED
Definition:
stm32h747/stm32h747i-disco/CM7/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:54
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition.
Definition:
stm32h747/stm32h747i-disco/CM7/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:40
HAL_UNLOCKED
@ HAL_UNLOCKED
Definition:
stm32h747/stm32h747i-disco/CM7/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:53
picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:54