Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 5 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /** |
1 | /** |
2 | ****************************************************************************** |
2 | ****************************************************************************** |
3 | * @file stm32f1xx_hal_gpio.h |
3 | * @file stm32f1xx_hal_gpio.h |
4 | * @author MCD Application Team |
4 | * @author MCD Application Team |
5 | * @version V1.0.1 |
5 | * @version V1.0.4 |
6 | * @date 31-July-2015 |
6 | * @date 29-April-2016 |
7 | * @brief Header file of GPIO HAL module. |
7 | * @brief Header file of GPIO HAL module. |
8 | ****************************************************************************** |
8 | ****************************************************************************** |
9 | * @attention |
9 | * @attention |
10 | * |
10 | * |
11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
11 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
12 | * |
12 | * |
13 | * Redistribution and use in source and binary forms, with or without modification, |
13 | * Redistribution and use in source and binary forms, with or without modification, |
14 | * are permitted provided that the following conditions are met: |
14 | * are permitted provided that the following conditions are met: |
15 | * 1. Redistributions of source code must retain the above copyright notice, |
15 | * 1. Redistributions of source code must retain the above copyright notice, |
16 | * this list of conditions and the following disclaimer. |
16 | * this list of conditions and the following disclaimer. |
Line 158... | Line 158... | ||
158 | 158 | ||
159 | /** @defgroup GPIO_speed_define GPIO speed define |
159 | /** @defgroup GPIO_speed_define GPIO speed define |
160 | * @brief GPIO Output Maximum frequency |
160 | * @brief GPIO Output Maximum frequency |
161 | * @{ |
161 | * @{ |
162 | */ |
162 | */ |
163 | #define GPIO_SPEED_LOW (GPIO_CRL_MODE0_1) /*!< Low speed */ |
163 | #define GPIO_SPEED_FREQ_LOW (GPIO_CRL_MODE0_1) /*!< Low speed */ |
164 | #define GPIO_SPEED_MEDIUM (GPIO_CRL_MODE0_0) /*!< Medium speed */ |
164 | #define GPIO_SPEED_FREQ_MEDIUM (GPIO_CRL_MODE0_0) /*!< Medium speed */ |
165 | #define GPIO_SPEED_HIGH (GPIO_CRL_MODE0) /*!< High speed */ |
165 | #define GPIO_SPEED_FREQ_HIGH (GPIO_CRL_MODE0) /*!< High speed */ |
166 | 166 | ||
167 | /** |
167 | /** |
168 | * @} |
168 | * @} |
169 | */ |
169 | */ |
170 | 170 | ||
Line 196... | Line 196... | ||
196 | #define IS_GPIO_PIN(PIN) (((PIN) & GPIO_PIN_MASK ) != (uint32_t)0x00) |
196 | #define IS_GPIO_PIN(PIN) (((PIN) & GPIO_PIN_MASK ) != (uint32_t)0x00) |
197 | 197 | ||
198 | #define IS_GPIO_PULL(PULL) (((PULL) == GPIO_NOPULL) || ((PULL) == GPIO_PULLUP) || \ |
198 | #define IS_GPIO_PULL(PULL) (((PULL) == GPIO_NOPULL) || ((PULL) == GPIO_PULLUP) || \ |
199 | ((PULL) == GPIO_PULLDOWN)) |
199 | ((PULL) == GPIO_PULLDOWN)) |
200 | 200 | ||
201 | #define IS_GPIO_SPEED(SPEED) (((SPEED) == GPIO_SPEED_LOW) || \ |
201 | #define IS_GPIO_SPEED(SPEED) (((SPEED) == GPIO_SPEED_FREQ_LOW) || \ |
202 | ((SPEED) == GPIO_SPEED_MEDIUM) || ((SPEED) == GPIO_SPEED_HIGH)) |
202 | ((SPEED) == GPIO_SPEED_FREQ_MEDIUM) || ((SPEED) == GPIO_SPEED_FREQ_HIGH)) |
203 | 203 | ||
204 | #define IS_GPIO_MODE(MODE) (((MODE) == GPIO_MODE_INPUT) ||\ |
204 | #define IS_GPIO_MODE(MODE) (((MODE) == GPIO_MODE_INPUT) ||\ |
205 | ((MODE) == GPIO_MODE_OUTPUT_PP) ||\ |
205 | ((MODE) == GPIO_MODE_OUTPUT_PP) ||\ |
206 | ((MODE) == GPIO_MODE_OUTPUT_OD) ||\ |
206 | ((MODE) == GPIO_MODE_OUTPUT_OD) ||\ |
207 | ((MODE) == GPIO_MODE_AF_PP) ||\ |
207 | ((MODE) == GPIO_MODE_AF_PP) ||\ |