Prusa MINI Firmware overview
|
Go to the documentation of this file.
37 #ifndef __STM32F4xx_HAL_GPIO_H
38 #define __STM32F4xx_HAL_GPIO_H
102 #define GPIO_PIN_0 ((uint16_t)0x0001)
103 #define GPIO_PIN_1 ((uint16_t)0x0002)
104 #define GPIO_PIN_2 ((uint16_t)0x0004)
105 #define GPIO_PIN_3 ((uint16_t)0x0008)
106 #define GPIO_PIN_4 ((uint16_t)0x0010)
107 #define GPIO_PIN_5 ((uint16_t)0x0020)
108 #define GPIO_PIN_6 ((uint16_t)0x0040)
109 #define GPIO_PIN_7 ((uint16_t)0x0080)
110 #define GPIO_PIN_8 ((uint16_t)0x0100)
111 #define GPIO_PIN_9 ((uint16_t)0x0200)
112 #define GPIO_PIN_10 ((uint16_t)0x0400)
113 #define GPIO_PIN_11 ((uint16_t)0x0800)
114 #define GPIO_PIN_12 ((uint16_t)0x1000)
115 #define GPIO_PIN_13 ((uint16_t)0x2000)
116 #define GPIO_PIN_14 ((uint16_t)0x4000)
117 #define GPIO_PIN_15 ((uint16_t)0x8000)
118 #define GPIO_PIN_All ((uint16_t)0xFFFF)
120 #define GPIO_PIN_MASK 0x0000FFFFU
135 #define GPIO_MODE_INPUT 0x00000000U
136 #define GPIO_MODE_OUTPUT_PP 0x00000001U
137 #define GPIO_MODE_OUTPUT_OD 0x00000011U
138 #define GPIO_MODE_AF_PP 0x00000002U
139 #define GPIO_MODE_AF_OD 0x00000012U
141 #define GPIO_MODE_ANALOG 0x00000003U
143 #define GPIO_MODE_IT_RISING 0x10110000U
144 #define GPIO_MODE_IT_FALLING 0x10210000U
145 #define GPIO_MODE_IT_RISING_FALLING 0x10310000U
147 #define GPIO_MODE_EVT_RISING 0x10120000U
148 #define GPIO_MODE_EVT_FALLING 0x10220000U
149 #define GPIO_MODE_EVT_RISING_FALLING 0x10320000U
158 #define GPIO_SPEED_FREQ_LOW 0x00000000U
159 #define GPIO_SPEED_FREQ_MEDIUM 0x00000001U
160 #define GPIO_SPEED_FREQ_HIGH 0x00000002U
161 #define GPIO_SPEED_FREQ_VERY_HIGH 0x00000003U
170 #define GPIO_NOPULL 0x00000000U
171 #define GPIO_PULLUP 0x00000001U
172 #define GPIO_PULLDOWN 0x00000002U
192 #define __HAL_GPIO_EXTI_GET_FLAG(__EXTI_LINE__) (EXTI->PR & (__EXTI_LINE__))
200 #define __HAL_GPIO_EXTI_CLEAR_FLAG(__EXTI_LINE__) (EXTI->PR = (__EXTI_LINE__))
208 #define __HAL_GPIO_EXTI_GET_IT(__EXTI_LINE__) (EXTI->PR & (__EXTI_LINE__))
216 #define __HAL_GPIO_EXTI_CLEAR_IT(__EXTI_LINE__) (EXTI->PR = (__EXTI_LINE__))
224 #define __HAL_GPIO_EXTI_GENERATE_SWIT(__EXTI_LINE__) (EXTI->SWIER |= (__EXTI_LINE__))
280 #define IS_GPIO_PIN_ACTION(ACTION) (((ACTION) == GPIO_PIN_RESET) || ((ACTION) == GPIO_PIN_SET))
281 #define IS_GPIO_PIN(PIN) ((((PIN) & GPIO_PIN_MASK ) != 0x00U) && (((PIN) & ~GPIO_PIN_MASK) == 0x00U))
282 #define IS_GPIO_MODE(MODE) (((MODE) == GPIO_MODE_INPUT) ||\
283 ((MODE) == GPIO_MODE_OUTPUT_PP) ||\
284 ((MODE) == GPIO_MODE_OUTPUT_OD) ||\
285 ((MODE) == GPIO_MODE_AF_PP) ||\
286 ((MODE) == GPIO_MODE_AF_OD) ||\
287 ((MODE) == GPIO_MODE_IT_RISING) ||\
288 ((MODE) == GPIO_MODE_IT_FALLING) ||\
289 ((MODE) == GPIO_MODE_IT_RISING_FALLING) ||\
290 ((MODE) == GPIO_MODE_EVT_RISING) ||\
291 ((MODE) == GPIO_MODE_EVT_FALLING) ||\
292 ((MODE) == GPIO_MODE_EVT_RISING_FALLING) ||\
293 ((MODE) == GPIO_MODE_ANALOG))
294 #define IS_GPIO_SPEED(SPEED) (((SPEED) == GPIO_SPEED_FREQ_LOW) || ((SPEED) == GPIO_SPEED_FREQ_MEDIUM) || \
295 ((SPEED) == GPIO_SPEED_FREQ_HIGH) || ((SPEED) == GPIO_SPEED_FREQ_VERY_HIGH))
296 #define IS_GPIO_PULL(PULL) (((PULL) == GPIO_NOPULL) || ((PULL) == GPIO_PULLUP) || \
297 ((PULL) == GPIO_PULLDOWN))
This file contains HAL common defines, enumeration, macros and structures definitions.
uint32_t Mode
Definition: stm32f4xx_hal_gpio.h:68
void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin)
uint32_t Alternate
Definition: stm32f4xx_hal_gpio.h:77
uint32_t Pull
Definition: stm32f4xx_hal_gpio.h:71
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
Definition: main.c:931
void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin)
GPIO_PinState
GPIO Bit SET and Bit RESET enumeration.
Definition: stm32f4xx_hal_gpio.h:84
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32f4xx_hal_def.h:55
Definition: stm32f4xx_hal_gpio.h:87
Definition: stm32f4xx_hal_gpio.h:86
HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
Header file of GPIO HAL Extension module.
uint32_t Pin
Definition: stm32f4xx_hal_gpio.h:65
uint32_t Speed
Definition: stm32f4xx_hal_gpio.h:74
void HAL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
GPIO Init structure definition.
Definition: stm32f4xx_hal_gpio.h:63