You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

944 lines
35 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32l0xx_ll_gpio.h
  4. * @author MCD Application Team
  5. * @brief Header file of GPIO LL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright(c) 2016 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef __STM32L0xx_LL_GPIO_H
  21. #define __STM32L0xx_LL_GPIO_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32l0xx.h"
  27. /** @addtogroup STM32L0xx_LL_Driver
  28. * @{
  29. */
  30. #if defined (GPIOA) || defined (GPIOB) || defined (GPIOC) || defined (GPIOD) || defined (GPIOE) || defined (GPIOH)
  31. /** @defgroup GPIO_LL GPIO
  32. * @{
  33. */
  34. /* Private types -------------------------------------------------------------*/
  35. /* Private variables ---------------------------------------------------------*/
  36. /* Private constants ---------------------------------------------------------*/
  37. /* Private macros ------------------------------------------------------------*/
  38. #if defined(USE_FULL_LL_DRIVER)
  39. /** @defgroup GPIO_LL_Private_Macros GPIO Private Macros
  40. * @{
  41. */
  42. /**
  43. * @}
  44. */
  45. #endif /*USE_FULL_LL_DRIVER*/
  46. /* Exported types ------------------------------------------------------------*/
  47. #if defined(USE_FULL_LL_DRIVER)
  48. /** @defgroup GPIO_LL_ES_INIT GPIO Exported Init structures
  49. * @{
  50. */
  51. /**
  52. * @brief LL GPIO Init Structure definition
  53. */
  54. typedef struct
  55. {
  56. uint32_t Pin; /*!< Specifies the GPIO pins to be configured.
  57. This parameter can be any value of @ref GPIO_LL_EC_PIN */
  58. uint32_t Mode; /*!< Specifies the operating mode for the selected pins.
  59. This parameter can be a value of @ref GPIO_LL_EC_MODE.
  60. GPIO HW configuration can be modified afterwards using unitary function @ref LL_GPIO_SetPinMode().*/
  61. uint32_t Speed; /*!< Specifies the speed for the selected pins.
  62. This parameter can be a value of @ref GPIO_LL_EC_SPEED.
  63. GPIO HW configuration can be modified afterwards using unitary function @ref LL_GPIO_SetPinSpeed().*/
  64. uint32_t OutputType; /*!< Specifies the operating output type for the selected pins.
  65. This parameter can be a value of @ref GPIO_LL_EC_OUTPUT.
  66. GPIO HW configuration can be modified afterwards using unitary function @ref LL_GPIO_SetPinOutputType().*/
  67. uint32_t Pull; /*!< Specifies the operating Pull-up/Pull down for the selected pins.
  68. This parameter can be a value of @ref GPIO_LL_EC_PULL.
  69. GPIO HW configuration can be modified afterwards using unitary function @ref LL_GPIO_SetPinPull().*/
  70. uint32_t Alternate; /*!< Specifies the Peripheral to be connected to the selected pins.
  71. This parameter can be a value of @ref GPIO_LL_EC_AF.
  72. GPIO HW configuration can be modified afterwards using unitary function @ref LL_GPIO_SetAFPin_0_7() and LL_GPIO_SetAFPin_8_15().*/
  73. } LL_GPIO_InitTypeDef;
  74. /**
  75. * @}
  76. */
  77. #endif /* USE_FULL_LL_DRIVER */
  78. /* Exported constants --------------------------------------------------------*/
  79. /** @defgroup GPIO_LL_Exported_Constants GPIO Exported Constants
  80. * @{
  81. */
  82. /** @defgroup GPIO_LL_EC_PIN PIN
  83. * @{
  84. */
  85. #define LL_GPIO_PIN_0 GPIO_BSRR_BS_0 /*!< Select pin 0 */
  86. #define LL_GPIO_PIN_1 GPIO_BSRR_BS_1 /*!< Select pin 1 */
  87. #define LL_GPIO_PIN_2 GPIO_BSRR_BS_2 /*!< Select pin 2 */
  88. #define LL_GPIO_PIN_3 GPIO_BSRR_BS_3 /*!< Select pin 3 */
  89. #define LL_GPIO_PIN_4 GPIO_BSRR_BS_4 /*!< Select pin 4 */
  90. #define LL_GPIO_PIN_5 GPIO_BSRR_BS_5 /*!< Select pin 5 */
  91. #define LL_GPIO_PIN_6 GPIO_BSRR_BS_6 /*!< Select pin 6 */
  92. #define LL_GPIO_PIN_7 GPIO_BSRR_BS_7 /*!< Select pin 7 */
  93. #define LL_GPIO_PIN_8 GPIO_BSRR_BS_8 /*!< Select pin 8 */
  94. #define LL_GPIO_PIN_9 GPIO_BSRR_BS_9 /*!< Select pin 9 */
  95. #define LL_GPIO_PIN_10 GPIO_BSRR_BS_10 /*!< Select pin 10 */
  96. #define LL_GPIO_PIN_11 GPIO_BSRR_BS_11 /*!< Select pin 11 */
  97. #define LL_GPIO_PIN_12 GPIO_BSRR_BS_12 /*!< Select pin 12 */
  98. #define LL_GPIO_PIN_13 GPIO_BSRR_BS_13 /*!< Select pin 13 */
  99. #define LL_GPIO_PIN_14 GPIO_BSRR_BS_14 /*!< Select pin 14 */
  100. #define LL_GPIO_PIN_15 GPIO_BSRR_BS_15 /*!< Select pin 15 */
  101. #define LL_GPIO_PIN_ALL (GPIO_BSRR_BS_0 | GPIO_BSRR_BS_1 | GPIO_BSRR_BS_2 | \
  102. GPIO_BSRR_BS_3 | GPIO_BSRR_BS_4 | GPIO_BSRR_BS_5 | \
  103. GPIO_BSRR_BS_6 | GPIO_BSRR_BS_7 | GPIO_BSRR_BS_8 | \
  104. GPIO_BSRR_BS_9 | GPIO_BSRR_BS_10 | GPIO_BSRR_BS_11 | \
  105. GPIO_BSRR_BS_12 | GPIO_BSRR_BS_13 | GPIO_BSRR_BS_14 | \
  106. GPIO_BSRR_BS_15) /*!< Select all pins */
  107. /**
  108. * @}
  109. */
  110. /** @defgroup GPIO_LL_EC_MODE Mode
  111. * @{
  112. */
  113. #define LL_GPIO_MODE_INPUT ((uint32_t)0x00000000U) /*!< Select input mode */
  114. #define LL_GPIO_MODE_OUTPUT GPIO_MODER_MODE0_0 /*!< Select output mode */
  115. #define LL_GPIO_MODE_ALTERNATE GPIO_MODER_MODE0_1 /*!< Select alternate function mode */
  116. #define LL_GPIO_MODE_ANALOG GPIO_MODER_MODE0 /*!< Select analog mode */
  117. /**
  118. * @}
  119. */
  120. /** @defgroup GPIO_LL_EC_OUTPUT Output Type
  121. * @{
  122. */
  123. #define LL_GPIO_OUTPUT_PUSHPULL ((uint32_t)0x00000000U) /*!< Select push-pull as output type */
  124. #define LL_GPIO_OUTPUT_OPENDRAIN GPIO_OTYPER_OT_0 /*!< Select open-drain as output type */
  125. /**
  126. * @}
  127. */
  128. /** @defgroup GPIO_LL_EC_SPEED Output Speed
  129. * @{
  130. */
  131. #define LL_GPIO_SPEED_FREQ_LOW ((uint32_t)0x00000000U) /*!< Select I/O low output speed */
  132. #define LL_GPIO_SPEED_FREQ_MEDIUM GPIO_OSPEEDER_OSPEED0_0 /*!< Select I/O medium output speed */
  133. #define LL_GPIO_SPEED_FREQ_HIGH GPIO_OSPEEDER_OSPEED0_1 /*!< Select I/O fast output speed */
  134. #define LL_GPIO_SPEED_FREQ_VERY_HIGH GPIO_OSPEEDER_OSPEED0 /*!< Select I/O high output speed */
  135. /**
  136. * @}
  137. */
  138. #define LL_GPIO_SPEED_LOW LL_GPIO_SPEED_FREQ_LOW
  139. #define LL_GPIO_SPEED_MEDIUM LL_GPIO_SPEED_FREQ_MEDIUM
  140. #define LL_GPIO_SPEED_FAST LL_GPIO_SPEED_FREQ_HIGH
  141. #define LL_GPIO_SPEED_HIGH LL_GPIO_SPEED_FREQ_VERY_HIGH
  142. /** @defgroup GPIO_LL_EC_PULL Pull Up Pull Down
  143. * @{
  144. */
  145. #define LL_GPIO_PULL_NO ((uint32_t)0x00000000U) /*!< Select I/O no pull */
  146. #define LL_GPIO_PULL_UP GPIO_PUPDR_PUPD0_0 /*!< Select I/O pull up */
  147. #define LL_GPIO_PULL_DOWN GPIO_PUPDR_PUPD0_1 /*!< Select I/O pull down */
  148. /**
  149. * @}
  150. */
  151. /** @defgroup GPIO_LL_EC_AF Alternate Function
  152. * @{
  153. */
  154. #define LL_GPIO_AF_0 ((uint32_t)0x0000000U) /*!< Select alternate function 0 */
  155. #define LL_GPIO_AF_1 ((uint32_t)0x0000001U) /*!< Select alternate function 1 */
  156. #define LL_GPIO_AF_2 ((uint32_t)0x0000002U) /*!< Select alternate function 2 */
  157. #define LL_GPIO_AF_3 ((uint32_t)0x0000003U) /*!< Select alternate function 3 */
  158. #define LL_GPIO_AF_4 ((uint32_t)0x0000004U) /*!< Select alternate function 4 */
  159. #define LL_GPIO_AF_5 ((uint32_t)0x0000005U) /*!< Select alternate function 5 */
  160. #define LL_GPIO_AF_6 ((uint32_t)0x0000006U) /*!< Select alternate function 6 */
  161. #define LL_GPIO_AF_7 ((uint32_t)0x0000007U) /*!< Select alternate function 7 */
  162. /**
  163. * @}
  164. */
  165. /**
  166. * @}
  167. */
  168. /* Exported macro ------------------------------------------------------------*/
  169. /** @defgroup GPIO_LL_Exported_Macros GPIO Exported Macros
  170. * @{
  171. */
  172. /** @defgroup GPIO_LL_EM_WRITE_READ Common Write and read registers Macros
  173. * @{
  174. */
  175. /**
  176. * @brief Write a value in GPIO register
  177. * @param __INSTANCE__ GPIO Instance
  178. * @param __REG__ Register to be written
  179. * @param __VALUE__ Value to be written in the register
  180. * @retval None
  181. */
  182. #define LL_GPIO_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
  183. /**
  184. * @brief Read a value in GPIO register
  185. * @param __INSTANCE__ GPIO Instance
  186. * @param __REG__ Register to be read
  187. * @retval Register value
  188. */
  189. #define LL_GPIO_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
  190. /**
  191. * @}
  192. */
  193. /**
  194. * @}
  195. */
  196. /* Exported functions --------------------------------------------------------*/
  197. /** @defgroup GPIO_LL_Exported_Functions GPIO Exported Functions
  198. * @{
  199. */
  200. /** @defgroup GPIO_LL_EF_Port_Configuration Port Configuration
  201. * @{
  202. */
  203. /**
  204. * @brief Configure gpio mode for a dedicated pin on dedicated port.
  205. * @note I/O mode can be Input mode, General purpose output, Alternate function mode or Analog.
  206. * @note Warning: only one pin can be passed as parameter.
  207. * @rmtoll MODER MODEy LL_GPIO_SetPinMode
  208. * @param GPIOx GPIO Port
  209. * @param Pin This parameter can be one of the following values:
  210. * @arg @ref LL_GPIO_PIN_0
  211. * @arg @ref LL_GPIO_PIN_1
  212. * @arg @ref LL_GPIO_PIN_2
  213. * @arg @ref LL_GPIO_PIN_3
  214. * @arg @ref LL_GPIO_PIN_4
  215. * @arg @ref LL_GPIO_PIN_5
  216. * @arg @ref LL_GPIO_PIN_6
  217. * @arg @ref LL_GPIO_PIN_7
  218. * @arg @ref LL_GPIO_PIN_8
  219. * @arg @ref LL_GPIO_PIN_9
  220. * @arg @ref LL_GPIO_PIN_10
  221. * @arg @ref LL_GPIO_PIN_11
  222. * @arg @ref LL_GPIO_PIN_12
  223. * @arg @ref LL_GPIO_PIN_13
  224. * @arg @ref LL_GPIO_PIN_14
  225. * @arg @ref LL_GPIO_PIN_15
  226. * @param Mode This parameter can be one of the following values:
  227. * @arg @ref LL_GPIO_MODE_INPUT
  228. * @arg @ref LL_GPIO_MODE_OUTPUT
  229. * @arg @ref LL_GPIO_MODE_ALTERNATE
  230. * @arg @ref LL_GPIO_MODE_ANALOG
  231. * @retval None
  232. */
  233. __STATIC_INLINE void LL_GPIO_SetPinMode(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Mode)
  234. {
  235. MODIFY_REG(GPIOx->MODER, ((Pin * Pin) * GPIO_MODER_MODE0), ((Pin * Pin) * Mode));
  236. }
  237. /**
  238. * @brief Return gpio mode for a dedicated pin on dedicated port.
  239. * @note I/O mode can be Input mode, General purpose output, Alternate function mode or Analog.
  240. * @note Warning: only one pin can be passed as parameter.
  241. * @rmtoll MODER MODEy LL_GPIO_GetPinMode
  242. * @param GPIOx GPIO Port
  243. * @param Pin This parameter can be one of the following values:
  244. * @arg @ref LL_GPIO_PIN_0
  245. * @arg @ref LL_GPIO_PIN_1
  246. * @arg @ref LL_GPIO_PIN_2
  247. * @arg @ref LL_GPIO_PIN_3
  248. * @arg @ref LL_GPIO_PIN_4
  249. * @arg @ref LL_GPIO_PIN_5
  250. * @arg @ref LL_GPIO_PIN_6
  251. * @arg @ref LL_GPIO_PIN_7
  252. * @arg @ref LL_GPIO_PIN_8
  253. * @arg @ref LL_GPIO_PIN_9
  254. * @arg @ref LL_GPIO_PIN_10
  255. * @arg @ref LL_GPIO_PIN_11
  256. * @arg @ref LL_GPIO_PIN_12
  257. * @arg @ref LL_GPIO_PIN_13
  258. * @arg @ref LL_GPIO_PIN_14
  259. * @arg @ref LL_GPIO_PIN_15
  260. * @retval Returned value can be one of the following values:
  261. * @arg @ref LL_GPIO_MODE_INPUT
  262. * @arg @ref LL_GPIO_MODE_OUTPUT
  263. * @arg @ref LL_GPIO_MODE_ALTERNATE
  264. * @arg @ref LL_GPIO_MODE_ANALOG
  265. */
  266. __STATIC_INLINE uint32_t LL_GPIO_GetPinMode(GPIO_TypeDef *GPIOx, uint32_t Pin)
  267. {
  268. return (uint32_t)(READ_BIT(GPIOx->MODER, ((Pin * Pin) * GPIO_MODER_MODE0)) / (Pin * Pin));
  269. }
  270. /**
  271. * @brief Configure gpio output type for several pins on dedicated port.
  272. * @note Output type as to be set when gpio pin is in output or
  273. * alternate modes. Possible type are Push-pull or Open-drain.
  274. * @rmtoll OTYPER OTy LL_GPIO_SetPinOutputType
  275. * @param GPIOx GPIO Port
  276. * @param PinMask This parameter can be a combination of the following values:
  277. * @arg @ref LL_GPIO_PIN_0
  278. * @arg @ref LL_GPIO_PIN_1
  279. * @arg @ref LL_GPIO_PIN_2
  280. * @arg @ref LL_GPIO_PIN_3
  281. * @arg @ref LL_GPIO_PIN_4
  282. * @arg @ref LL_GPIO_PIN_5
  283. * @arg @ref LL_GPIO_PIN_6
  284. * @arg @ref LL_GPIO_PIN_7
  285. * @arg @ref LL_GPIO_PIN_8
  286. * @arg @ref LL_GPIO_PIN_9
  287. * @arg @ref LL_GPIO_PIN_10
  288. * @arg @ref LL_GPIO_PIN_11
  289. * @arg @ref LL_GPIO_PIN_12
  290. * @arg @ref LL_GPIO_PIN_13
  291. * @arg @ref LL_GPIO_PIN_14
  292. * @arg @ref LL_GPIO_PIN_15
  293. * @arg @ref LL_GPIO_PIN_ALL
  294. * @param OutputType This parameter can be one of the following values:
  295. * @arg @ref LL_GPIO_OUTPUT_PUSHPULL
  296. * @arg @ref LL_GPIO_OUTPUT_OPENDRAIN
  297. * @retval None
  298. */
  299. __STATIC_INLINE void LL_GPIO_SetPinOutputType(GPIO_TypeDef *GPIOx, uint32_t PinMask, uint32_t OutputType)
  300. {
  301. MODIFY_REG(GPIOx->OTYPER, PinMask, (PinMask * OutputType));
  302. }
  303. /**
  304. * @brief Return gpio output type for several pins on dedicated port.
  305. * @note Output type as to be set when gpio pin is in output or
  306. * alternate modes. Possible type are Push-pull or Open-drain.
  307. * @note Warning: only one pin can be passed as parameter.
  308. * @rmtoll OTYPER OTy LL_GPIO_GetPinOutputType
  309. * @param GPIOx GPIO Port
  310. * @param Pin This parameter can be one of the following values:
  311. * @arg @ref LL_GPIO_PIN_0
  312. * @arg @ref LL_GPIO_PIN_1
  313. * @arg @ref LL_GPIO_PIN_2
  314. * @arg @ref LL_GPIO_PIN_3
  315. * @arg @ref LL_GPIO_PIN_4
  316. * @arg @ref LL_GPIO_PIN_5
  317. * @arg @ref LL_GPIO_PIN_6
  318. * @arg @ref LL_GPIO_PIN_7
  319. * @arg @ref LL_GPIO_PIN_8
  320. * @arg @ref LL_GPIO_PIN_9
  321. * @arg @ref LL_GPIO_PIN_10
  322. * @arg @ref LL_GPIO_PIN_11
  323. * @arg @ref LL_GPIO_PIN_12
  324. * @arg @ref LL_GPIO_PIN_13
  325. * @arg @ref LL_GPIO_PIN_14
  326. * @arg @ref LL_GPIO_PIN_15
  327. * @arg @ref LL_GPIO_PIN_ALL
  328. * @retval Returned value can be one of the following values:
  329. * @arg @ref LL_GPIO_OUTPUT_PUSHPULL
  330. * @arg @ref LL_GPIO_OUTPUT_OPENDRAIN
  331. */
  332. __STATIC_INLINE uint32_t LL_GPIO_GetPinOutputType(GPIO_TypeDef *GPIOx, uint32_t Pin)
  333. {
  334. return (uint32_t)(READ_BIT(GPIOx->OTYPER, Pin) / Pin);
  335. }
  336. /**
  337. * @brief Configure gpio speed for a dedicated pin on dedicated port.
  338. * @note I/O speed can be Low, Medium, Fast or High speed.
  339. * @note Warning: only one pin can be passed as parameter.
  340. * @note Refer to datasheet for frequency specifications and the power
  341. * supply and load conditions for each speed.
  342. * @rmtoll OSPEEDR OSPEEDy LL_GPIO_SetPinSpeed
  343. * @param GPIOx GPIO Port
  344. * @param Pin This parameter can be one of the following values:
  345. * @arg @ref LL_GPIO_PIN_0
  346. * @arg @ref LL_GPIO_PIN_1
  347. * @arg @ref LL_GPIO_PIN_2
  348. * @arg @ref LL_GPIO_PIN_3
  349. * @arg @ref LL_GPIO_PIN_4
  350. * @arg @ref LL_GPIO_PIN_5
  351. * @arg @ref LL_GPIO_PIN_6
  352. * @arg @ref LL_GPIO_PIN_7
  353. * @arg @ref LL_GPIO_PIN_8
  354. * @arg @ref LL_GPIO_PIN_9
  355. * @arg @ref LL_GPIO_PIN_10
  356. * @arg @ref LL_GPIO_PIN_11
  357. * @arg @ref LL_GPIO_PIN_12
  358. * @arg @ref LL_GPIO_PIN_13
  359. * @arg @ref LL_GPIO_PIN_14
  360. * @arg @ref LL_GPIO_PIN_15
  361. * @param Speed This parameter can be one of the following values:
  362. * @arg @ref LL_GPIO_SPEED_FREQ_LOW
  363. * @arg @ref LL_GPIO_SPEED_FREQ_MEDIUM
  364. * @arg @ref LL_GPIO_SPEED_FREQ_HIGH
  365. * @arg @ref LL_GPIO_SPEED_FREQ_VERY_HIGH
  366. * @retval None
  367. */
  368. __STATIC_INLINE void LL_GPIO_SetPinSpeed(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Speed)
  369. {
  370. MODIFY_REG(GPIOx->OSPEEDR, ((Pin * Pin) * GPIO_OSPEEDER_OSPEED0), ((Pin * Pin) * Speed));
  371. }
  372. /**
  373. * @brief Return gpio speed for a dedicated pin on dedicated port.
  374. * @note I/O speed can be Low, Medium, Fast or High speed.
  375. * @note Warning: only one pin can be passed as parameter.
  376. * @note Refer to datasheet for frequency specifications and the power
  377. * supply and load conditions for each speed.
  378. * @rmtoll OSPEEDR OSPEEDy LL_GPIO_GetPinSpeed
  379. * @param GPIOx GPIO Port
  380. * @param Pin This parameter can be one of the following values:
  381. * @arg @ref LL_GPIO_PIN_0
  382. * @arg @ref LL_GPIO_PIN_1
  383. * @arg @ref LL_GPIO_PIN_2
  384. * @arg @ref LL_GPIO_PIN_3
  385. * @arg @ref LL_GPIO_PIN_4
  386. * @arg @ref LL_GPIO_PIN_5
  387. * @arg @ref LL_GPIO_PIN_6
  388. * @arg @ref LL_GPIO_PIN_7
  389. * @arg @ref LL_GPIO_PIN_8
  390. * @arg @ref LL_GPIO_PIN_9
  391. * @arg @ref LL_GPIO_PIN_10
  392. * @arg @ref LL_GPIO_PIN_11
  393. * @arg @ref LL_GPIO_PIN_12
  394. * @arg @ref LL_GPIO_PIN_13
  395. * @arg @ref LL_GPIO_PIN_14
  396. * @arg @ref LL_GPIO_PIN_15
  397. * @retval Returned value can be one of the following values:
  398. * @arg @ref LL_GPIO_SPEED_FREQ_LOW
  399. * @arg @ref LL_GPIO_SPEED_FREQ_MEDIUM
  400. * @arg @ref LL_GPIO_SPEED_FREQ_HIGH
  401. * @arg @ref LL_GPIO_SPEED_FREQ_VERY_HIGH
  402. */
  403. __STATIC_INLINE uint32_t LL_GPIO_GetPinSpeed(GPIO_TypeDef *GPIOx, uint32_t Pin)
  404. {
  405. return (uint32_t)(READ_BIT(GPIOx->OSPEEDR, ((Pin * Pin) * GPIO_OSPEEDER_OSPEED0)) / (Pin * Pin));
  406. }
  407. /**
  408. * @brief Configure gpio pull-up or pull-down for a dedicated pin on a dedicated port.
  409. * @note Warning: only one pin can be passed as parameter.
  410. * @rmtoll PUPDR PUPDy LL_GPIO_SetPinPull
  411. * @param GPIOx GPIO Port
  412. * @param Pin This parameter can be one of the following values:
  413. * @arg @ref LL_GPIO_PIN_0
  414. * @arg @ref LL_GPIO_PIN_1
  415. * @arg @ref LL_GPIO_PIN_2
  416. * @arg @ref LL_GPIO_PIN_3
  417. * @arg @ref LL_GPIO_PIN_4
  418. * @arg @ref LL_GPIO_PIN_5
  419. * @arg @ref LL_GPIO_PIN_6
  420. * @arg @ref LL_GPIO_PIN_7
  421. * @arg @ref LL_GPIO_PIN_8
  422. * @arg @ref LL_GPIO_PIN_9
  423. * @arg @ref LL_GPIO_PIN_10
  424. * @arg @ref LL_GPIO_PIN_11
  425. * @arg @ref LL_GPIO_PIN_12
  426. * @arg @ref LL_GPIO_PIN_13
  427. * @arg @ref LL_GPIO_PIN_14
  428. * @arg @ref LL_GPIO_PIN_15
  429. * @param Pull This parameter can be one of the following values:
  430. * @arg @ref LL_GPIO_PULL_NO
  431. * @arg @ref LL_GPIO_PULL_UP
  432. * @arg @ref LL_GPIO_PULL_DOWN
  433. * @retval None
  434. */
  435. __STATIC_INLINE void LL_GPIO_SetPinPull(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Pull)
  436. {
  437. MODIFY_REG(GPIOx->PUPDR, ((Pin * Pin) * GPIO_PUPDR_PUPD0), ((Pin * Pin) * Pull));
  438. }
  439. /**
  440. * @brief Return gpio pull-up or pull-down for a dedicated pin on a dedicated port
  441. * @note Warning: only one pin can be passed as parameter.
  442. * @rmtoll PUPDR PUPDy LL_GPIO_GetPinPull
  443. * @param GPIOx GPIO Port
  444. * @param Pin This parameter can be one of the following values:
  445. * @arg @ref LL_GPIO_PIN_0
  446. * @arg @ref LL_GPIO_PIN_1
  447. * @arg @ref LL_GPIO_PIN_2
  448. * @arg @ref LL_GPIO_PIN_3
  449. * @arg @ref LL_GPIO_PIN_4
  450. * @arg @ref LL_GPIO_PIN_5
  451. * @arg @ref LL_GPIO_PIN_6
  452. * @arg @ref LL_GPIO_PIN_7
  453. * @arg @ref LL_GPIO_PIN_8
  454. * @arg @ref LL_GPIO_PIN_9
  455. * @arg @ref LL_GPIO_PIN_10
  456. * @arg @ref LL_GPIO_PIN_11
  457. * @arg @ref LL_GPIO_PIN_12
  458. * @arg @ref LL_GPIO_PIN_13
  459. * @arg @ref LL_GPIO_PIN_14
  460. * @arg @ref LL_GPIO_PIN_15
  461. * @retval Returned value can be one of the following values:
  462. * @arg @ref LL_GPIO_PULL_NO
  463. * @arg @ref LL_GPIO_PULL_UP
  464. * @arg @ref LL_GPIO_PULL_DOWN
  465. */
  466. __STATIC_INLINE uint32_t LL_GPIO_GetPinPull(GPIO_TypeDef *GPIOx, uint32_t Pin)
  467. {
  468. return (uint32_t)(READ_BIT(GPIOx->PUPDR, ((Pin * Pin) * GPIO_PUPDR_PUPD0)) / (Pin * Pin));
  469. }
  470. /**
  471. * @brief Configure gpio alternate function of a dedicated pin from 0 to 7 for a dedicated port.
  472. * @note Possible values are from AF0 to AF7 depending on target.
  473. * @note Warning: only one pin can be passed as parameter.
  474. * @rmtoll AFRL AFSELy LL_GPIO_SetAFPin_0_7
  475. * @param GPIOx GPIO Port
  476. * @param Pin This parameter can be one of the following values:
  477. * @arg @ref LL_GPIO_PIN_0
  478. * @arg @ref LL_GPIO_PIN_1
  479. * @arg @ref LL_GPIO_PIN_2
  480. * @arg @ref LL_GPIO_PIN_3
  481. * @arg @ref LL_GPIO_PIN_4
  482. * @arg @ref LL_GPIO_PIN_5
  483. * @arg @ref LL_GPIO_PIN_6
  484. * @arg @ref LL_GPIO_PIN_7
  485. * @param Alternate This parameter can be one of the following values:
  486. * @arg @ref LL_GPIO_AF_0
  487. * @arg @ref LL_GPIO_AF_1
  488. * @arg @ref LL_GPIO_AF_2
  489. * @arg @ref LL_GPIO_AF_3
  490. * @arg @ref LL_GPIO_AF_4
  491. * @arg @ref LL_GPIO_AF_5
  492. * @arg @ref LL_GPIO_AF_6
  493. * @arg @ref LL_GPIO_AF_7
  494. * @retval None
  495. */
  496. __STATIC_INLINE void LL_GPIO_SetAFPin_0_7(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Alternate)
  497. {
  498. MODIFY_REG(GPIOx->AFR[0], ((((Pin * Pin) * Pin) * Pin) * GPIO_AFRL_AFSEL0),
  499. ((((Pin * Pin) * Pin) * Pin) * Alternate));
  500. }
  501. /**
  502. * @brief Return gpio alternate function of a dedicated pin from 0 to 7 for a dedicated port.
  503. * @rmtoll AFRL AFSELy LL_GPIO_GetAFPin_0_7
  504. * @param GPIOx GPIO Port
  505. * @param Pin This parameter can be one of the following values:
  506. * @arg @ref LL_GPIO_PIN_0
  507. * @arg @ref LL_GPIO_PIN_1
  508. * @arg @ref LL_GPIO_PIN_2
  509. * @arg @ref LL_GPIO_PIN_3
  510. * @arg @ref LL_GPIO_PIN_4
  511. * @arg @ref LL_GPIO_PIN_5
  512. * @arg @ref LL_GPIO_PIN_6
  513. * @arg @ref LL_GPIO_PIN_7
  514. * @retval Returned value can be one of the following values:
  515. * @arg @ref LL_GPIO_AF_0
  516. * @arg @ref LL_GPIO_AF_1
  517. * @arg @ref LL_GPIO_AF_2
  518. * @arg @ref LL_GPIO_AF_3
  519. * @arg @ref LL_GPIO_AF_4
  520. * @arg @ref LL_GPIO_AF_5
  521. * @arg @ref LL_GPIO_AF_6
  522. * @arg @ref LL_GPIO_AF_7
  523. */
  524. __STATIC_INLINE uint32_t LL_GPIO_GetAFPin_0_7(GPIO_TypeDef *GPIOx, uint32_t Pin)
  525. {
  526. return (uint32_t)(READ_BIT(GPIOx->AFR[0],
  527. ((((Pin * Pin) * Pin) * Pin) * GPIO_AFRL_AFSEL0)) / (((Pin * Pin) * Pin) * Pin));
  528. }
  529. /**
  530. * @brief Configure gpio alternate function of a dedicated pin from 8 to 15 for a dedicated port.
  531. * @note Possible values are from AF0 to AF7 depending on target.
  532. * @note Warning: only one pin can be passed as parameter.
  533. * @rmtoll AFRH AFSELy LL_GPIO_SetAFPin_8_15
  534. * @param GPIOx GPIO Port
  535. * @param Pin This parameter can be one of the following values:
  536. * @arg @ref LL_GPIO_PIN_8
  537. * @arg @ref LL_GPIO_PIN_9
  538. * @arg @ref LL_GPIO_PIN_10
  539. * @arg @ref LL_GPIO_PIN_11
  540. * @arg @ref LL_GPIO_PIN_12
  541. * @arg @ref LL_GPIO_PIN_13
  542. * @arg @ref LL_GPIO_PIN_14
  543. * @arg @ref LL_GPIO_PIN_15
  544. * @param Alternate This parameter can be one of the following values:
  545. * @arg @ref LL_GPIO_AF_0
  546. * @arg @ref LL_GPIO_AF_1
  547. * @arg @ref LL_GPIO_AF_2
  548. * @arg @ref LL_GPIO_AF_3
  549. * @arg @ref LL_GPIO_AF_4
  550. * @arg @ref LL_GPIO_AF_5
  551. * @arg @ref LL_GPIO_AF_6
  552. * @arg @ref LL_GPIO_AF_7
  553. * @retval None
  554. */
  555. __STATIC_INLINE void LL_GPIO_SetAFPin_8_15(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Alternate)
  556. {
  557. MODIFY_REG(GPIOx->AFR[1], (((((Pin >> 8U) * (Pin >> 8U)) * (Pin >> 8U)) * (Pin >> 8U)) * GPIO_AFRH_AFSEL8),
  558. (((((Pin >> 8U) * (Pin >> 8U)) * (Pin >> 8U)) * (Pin >> 8U)) * Alternate));
  559. }
  560. /**
  561. * @brief Return gpio alternate function of a dedicated pin from 8 to 15 for a dedicated port.
  562. * @note Possible values are from AF0 to AF7 depending on target.
  563. * @rmtoll AFRH AFSELy LL_GPIO_GetAFPin_8_15
  564. * @param GPIOx GPIO Port
  565. * @param Pin This parameter can be one of the following values:
  566. * @arg @ref LL_GPIO_PIN_8
  567. * @arg @ref LL_GPIO_PIN_9
  568. * @arg @ref LL_GPIO_PIN_10
  569. * @arg @ref LL_GPIO_PIN_11
  570. * @arg @ref LL_GPIO_PIN_12
  571. * @arg @ref LL_GPIO_PIN_13
  572. * @arg @ref LL_GPIO_PIN_14
  573. * @arg @ref LL_GPIO_PIN_15
  574. * @retval Returned value can be one of the following values:
  575. * @arg @ref LL_GPIO_AF_0
  576. * @arg @ref LL_GPIO_AF_1
  577. * @arg @ref LL_GPIO_AF_2
  578. * @arg @ref LL_GPIO_AF_3
  579. * @arg @ref LL_GPIO_AF_4
  580. * @arg @ref LL_GPIO_AF_5
  581. * @arg @ref LL_GPIO_AF_6
  582. * @arg @ref LL_GPIO_AF_7
  583. */
  584. __STATIC_INLINE uint32_t LL_GPIO_GetAFPin_8_15(GPIO_TypeDef *GPIOx, uint32_t Pin)
  585. {
  586. return (uint32_t)(READ_BIT(GPIOx->AFR[1],
  587. (((((Pin >> 8U) * (Pin >> 8U)) * (Pin >> 8U)) * (Pin >> 8U)) * GPIO_AFRH_AFSEL8)) / ((((Pin >> 8U) *
  588. (Pin >> 8U)) * (Pin >> 8U)) * (Pin >> 8U)));
  589. }
  590. /**
  591. * @brief Lock configuration of several pins for a dedicated port.
  592. * @note When the lock sequence has been applied on a port bit, the
  593. * value of this port bit can no longer be modified until the
  594. * next reset.
  595. * @note Each lock bit freezes a specific configuration register
  596. * (control and alternate function registers).
  597. * @rmtoll LCKR LCKK LL_GPIO_LockPin
  598. * @param GPIOx GPIO Port
  599. * @param PinMask This parameter can be a combination of the following values:
  600. * @arg @ref LL_GPIO_PIN_0
  601. * @arg @ref LL_GPIO_PIN_1
  602. * @arg @ref LL_GPIO_PIN_2
  603. * @arg @ref LL_GPIO_PIN_3
  604. * @arg @ref LL_GPIO_PIN_4
  605. * @arg @ref LL_GPIO_PIN_5
  606. * @arg @ref LL_GPIO_PIN_6
  607. * @arg @ref LL_GPIO_PIN_7
  608. * @arg @ref LL_GPIO_PIN_8
  609. * @arg @ref LL_GPIO_PIN_9
  610. * @arg @ref LL_GPIO_PIN_10
  611. * @arg @ref LL_GPIO_PIN_11
  612. * @arg @ref LL_GPIO_PIN_12
  613. * @arg @ref LL_GPIO_PIN_13
  614. * @arg @ref LL_GPIO_PIN_14
  615. * @arg @ref LL_GPIO_PIN_15
  616. * @arg @ref LL_GPIO_PIN_ALL
  617. * @retval None
  618. */
  619. __STATIC_INLINE void LL_GPIO_LockPin(GPIO_TypeDef *GPIOx, uint32_t PinMask)
  620. {
  621. __IO uint32_t temp;
  622. WRITE_REG(GPIOx->LCKR, GPIO_LCKR_LCKK | PinMask);
  623. WRITE_REG(GPIOx->LCKR, PinMask);
  624. WRITE_REG(GPIOx->LCKR, GPIO_LCKR_LCKK | PinMask);
  625. temp = READ_REG(GPIOx->LCKR);
  626. (void) temp;
  627. }
  628. /**
  629. * @brief Return 1 if all pins passed as parameter, of a dedicated port, are locked. else Return 0.
  630. * @rmtoll LCKR LCKy LL_GPIO_IsPinLocked
  631. * @param GPIOx GPIO Port
  632. * @param PinMask This parameter can be a combination of the following values:
  633. * @arg @ref LL_GPIO_PIN_0
  634. * @arg @ref LL_GPIO_PIN_1
  635. * @arg @ref LL_GPIO_PIN_2
  636. * @arg @ref LL_GPIO_PIN_3
  637. * @arg @ref LL_GPIO_PIN_4
  638. * @arg @ref LL_GPIO_PIN_5
  639. * @arg @ref LL_GPIO_PIN_6
  640. * @arg @ref LL_GPIO_PIN_7
  641. * @arg @ref LL_GPIO_PIN_8
  642. * @arg @ref LL_GPIO_PIN_9
  643. * @arg @ref LL_GPIO_PIN_10
  644. * @arg @ref LL_GPIO_PIN_11
  645. * @arg @ref LL_GPIO_PIN_12
  646. * @arg @ref LL_GPIO_PIN_13
  647. * @arg @ref LL_GPIO_PIN_14
  648. * @arg @ref LL_GPIO_PIN_15
  649. * @arg @ref LL_GPIO_PIN_ALL
  650. * @retval State of bit (1 or 0).
  651. */
  652. __STATIC_INLINE uint32_t LL_GPIO_IsPinLocked(GPIO_TypeDef *GPIOx, uint32_t PinMask)
  653. {
  654. return (READ_BIT(GPIOx->LCKR, PinMask) == (PinMask));
  655. }
  656. /**
  657. * @brief Return 1 if one of the pin of a dedicated port is locked. else return 0.
  658. * @rmtoll LCKR LCKK LL_GPIO_IsAnyPinLocked
  659. * @param GPIOx GPIO Port
  660. * @retval State of bit (1 or 0).
  661. */
  662. __STATIC_INLINE uint32_t LL_GPIO_IsAnyPinLocked(GPIO_TypeDef *GPIOx)
  663. {
  664. return (READ_BIT(GPIOx->LCKR, GPIO_LCKR_LCKK) == (GPIO_LCKR_LCKK));
  665. }
  666. /**
  667. * @}
  668. */
  669. /** @defgroup GPIO_LL_EF_Data_Access Data Access
  670. * @{
  671. */
  672. /**
  673. * @brief Return full input data register value for a dedicated port.
  674. * @rmtoll IDR IDy LL_GPIO_ReadInputPort
  675. * @param GPIOx GPIO Port
  676. * @retval Input data register value of port
  677. */
  678. __STATIC_INLINE uint32_t LL_GPIO_ReadInputPort(GPIO_TypeDef *GPIOx)
  679. {
  680. return (uint32_t)(READ_REG(GPIOx->IDR));
  681. }
  682. /**
  683. * @brief Return if input data level for several pins of dedicated port is high or low.
  684. * @rmtoll IDR IDy LL_GPIO_IsInputPinSet
  685. * @param GPIOx GPIO Port
  686. * @param PinMask This parameter can be a combination of the following values:
  687. * @arg @ref LL_GPIO_PIN_0
  688. * @arg @ref LL_GPIO_PIN_1
  689. * @arg @ref LL_GPIO_PIN_2
  690. * @arg @ref LL_GPIO_PIN_3
  691. * @arg @ref LL_GPIO_PIN_4
  692. * @arg @ref LL_GPIO_PIN_5
  693. * @arg @ref LL_GPIO_PIN_6
  694. * @arg @ref LL_GPIO_PIN_7
  695. * @arg @ref LL_GPIO_PIN_8
  696. * @arg @ref LL_GPIO_PIN_9
  697. * @arg @ref LL_GPIO_PIN_10
  698. * @arg @ref LL_GPIO_PIN_11
  699. * @arg @ref LL_GPIO_PIN_12
  700. * @arg @ref LL_GPIO_PIN_13
  701. * @arg @ref LL_GPIO_PIN_14
  702. * @arg @ref LL_GPIO_PIN_15
  703. * @arg @ref LL_GPIO_PIN_ALL
  704. * @retval State of bit (1 or 0).
  705. */
  706. __STATIC_INLINE uint32_t LL_GPIO_IsInputPinSet(GPIO_TypeDef *GPIOx, uint32_t PinMask)
  707. {
  708. return (READ_BIT(GPIOx->IDR, PinMask) == (PinMask));
  709. }
  710. /**
  711. * @brief Write output data register for the port.
  712. * @rmtoll ODR ODy LL_GPIO_WriteOutputPort
  713. * @param GPIOx GPIO Port
  714. * @param PortValue Level value for each pin of the port
  715. * @retval None
  716. */
  717. __STATIC_INLINE void LL_GPIO_WriteOutputPort(GPIO_TypeDef *GPIOx, uint32_t PortValue)
  718. {
  719. WRITE_REG(GPIOx->ODR, PortValue);
  720. }
  721. /**
  722. * @brief Return full output data register value for a dedicated port.
  723. * @rmtoll ODR ODy LL_GPIO_ReadOutputPort
  724. * @param GPIOx GPIO Port
  725. * @retval Output data register value of port
  726. */
  727. __STATIC_INLINE uint32_t LL_GPIO_ReadOutputPort(GPIO_TypeDef *GPIOx)
  728. {
  729. return (uint32_t)(READ_REG(GPIOx->ODR));
  730. }
  731. /**
  732. * @brief Return if input data level for several pins of dedicated port is high or low.
  733. * @rmtoll ODR ODy LL_GPIO_IsOutputPinSet
  734. * @param GPIOx GPIO Port
  735. * @param PinMask This parameter can be a combination of the following values:
  736. * @arg @ref LL_GPIO_PIN_0
  737. * @arg @ref LL_GPIO_PIN_1
  738. * @arg @ref LL_GPIO_PIN_2
  739. * @arg @ref LL_GPIO_PIN_3
  740. * @arg @ref LL_GPIO_PIN_4
  741. * @arg @ref LL_GPIO_PIN_5
  742. * @arg @ref LL_GPIO_PIN_6
  743. * @arg @ref LL_GPIO_PIN_7
  744. * @arg @ref LL_GPIO_PIN_8
  745. * @arg @ref LL_GPIO_PIN_9
  746. * @arg @ref LL_GPIO_PIN_10
  747. * @arg @ref LL_GPIO_PIN_11
  748. * @arg @ref LL_GPIO_PIN_12
  749. * @arg @ref LL_GPIO_PIN_13
  750. * @arg @ref LL_GPIO_PIN_14
  751. * @arg @ref LL_GPIO_PIN_15
  752. * @arg @ref LL_GPIO_PIN_ALL
  753. * @retval State of bit (1 or 0).
  754. */
  755. __STATIC_INLINE uint32_t LL_GPIO_IsOutputPinSet(GPIO_TypeDef *GPIOx, uint32_t PinMask)
  756. {
  757. return (READ_BIT(GPIOx->ODR, PinMask) == (PinMask));
  758. }
  759. /**
  760. * @brief Set several pins to high level on dedicated gpio port.
  761. * @rmtoll BSRR BSy LL_GPIO_SetOutputPin
  762. * @param GPIOx GPIO Port
  763. * @param PinMask This parameter can be a combination of the following values:
  764. * @arg @ref LL_GPIO_PIN_0
  765. * @arg @ref LL_GPIO_PIN_1
  766. * @arg @ref LL_GPIO_PIN_2
  767. * @arg @ref LL_GPIO_PIN_3
  768. * @arg @ref LL_GPIO_PIN_4
  769. * @arg @ref LL_GPIO_PIN_5
  770. * @arg @ref LL_GPIO_PIN_6
  771. * @arg @ref LL_GPIO_PIN_7
  772. * @arg @ref LL_GPIO_PIN_8
  773. * @arg @ref LL_GPIO_PIN_9
  774. * @arg @ref LL_GPIO_PIN_10
  775. * @arg @ref LL_GPIO_PIN_11
  776. * @arg @ref LL_GPIO_PIN_12
  777. * @arg @ref LL_GPIO_PIN_13
  778. * @arg @ref LL_GPIO_PIN_14
  779. * @arg @ref LL_GPIO_PIN_15
  780. * @arg @ref LL_GPIO_PIN_ALL
  781. * @retval None
  782. */
  783. __STATIC_INLINE void LL_GPIO_SetOutputPin(GPIO_TypeDef *GPIOx, uint32_t PinMask)
  784. {
  785. WRITE_REG(GPIOx->BSRR, PinMask);
  786. }
  787. /**
  788. * @brief Set several pins to low level on dedicated gpio port.
  789. * @rmtoll BRR BRy LL_GPIO_ResetOutputPin
  790. * @param GPIOx GPIO Port
  791. * @param PinMask This parameter can be a combination of the following values:
  792. * @arg @ref LL_GPIO_PIN_0
  793. * @arg @ref LL_GPIO_PIN_1
  794. * @arg @ref LL_GPIO_PIN_2
  795. * @arg @ref LL_GPIO_PIN_3
  796. * @arg @ref LL_GPIO_PIN_4
  797. * @arg @ref LL_GPIO_PIN_5
  798. * @arg @ref LL_GPIO_PIN_6
  799. * @arg @ref LL_GPIO_PIN_7
  800. * @arg @ref LL_GPIO_PIN_8
  801. * @arg @ref LL_GPIO_PIN_9
  802. * @arg @ref LL_GPIO_PIN_10
  803. * @arg @ref LL_GPIO_PIN_11
  804. * @arg @ref LL_GPIO_PIN_12
  805. * @arg @ref LL_GPIO_PIN_13
  806. * @arg @ref LL_GPIO_PIN_14
  807. * @arg @ref LL_GPIO_PIN_15
  808. * @arg @ref LL_GPIO_PIN_ALL
  809. * @retval None
  810. */
  811. __STATIC_INLINE void LL_GPIO_ResetOutputPin(GPIO_TypeDef *GPIOx, uint32_t PinMask)
  812. {
  813. WRITE_REG(GPIOx->BRR, PinMask);
  814. }
  815. /**
  816. * @brief Toggle data value for several pin of dedicated port.
  817. * @rmtoll ODR ODy LL_GPIO_TogglePin
  818. * @param GPIOx GPIO Port
  819. * @param PinMask This parameter can be a combination of the following values:
  820. * @arg @ref LL_GPIO_PIN_0
  821. * @arg @ref LL_GPIO_PIN_1
  822. * @arg @ref LL_GPIO_PIN_2
  823. * @arg @ref LL_GPIO_PIN_3
  824. * @arg @ref LL_GPIO_PIN_4
  825. * @arg @ref LL_GPIO_PIN_5
  826. * @arg @ref LL_GPIO_PIN_6
  827. * @arg @ref LL_GPIO_PIN_7
  828. * @arg @ref LL_GPIO_PIN_8
  829. * @arg @ref LL_GPIO_PIN_9
  830. * @arg @ref LL_GPIO_PIN_10
  831. * @arg @ref LL_GPIO_PIN_11
  832. * @arg @ref LL_GPIO_PIN_12
  833. * @arg @ref LL_GPIO_PIN_13
  834. * @arg @ref LL_GPIO_PIN_14
  835. * @arg @ref LL_GPIO_PIN_15
  836. * @arg @ref LL_GPIO_PIN_ALL
  837. * @retval None
  838. */
  839. __STATIC_INLINE void LL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint32_t PinMask)
  840. {
  841. WRITE_REG(GPIOx->ODR, READ_REG(GPIOx->ODR) ^ PinMask);
  842. }
  843. /**
  844. * @}
  845. */
  846. #if defined(USE_FULL_LL_DRIVER)
  847. /** @defgroup GPIO_LL_EF_Init Initialization and de-initialization functions
  848. * @{
  849. */
  850. ErrorStatus LL_GPIO_DeInit(GPIO_TypeDef *GPIOx);
  851. ErrorStatus LL_GPIO_Init(GPIO_TypeDef *GPIOx, LL_GPIO_InitTypeDef *GPIO_InitStruct);
  852. void LL_GPIO_StructInit(LL_GPIO_InitTypeDef *GPIO_InitStruct);
  853. /**
  854. * @}
  855. */
  856. #endif /* USE_FULL_LL_DRIVER */
  857. /**
  858. * @}
  859. */
  860. /**
  861. * @}
  862. */
  863. #endif /* defined (GPIOA) || defined (GPIOB) || defined (GPIOC) || defined (GPIOD) || defined (GPIOE) || defined (GPIOH) */
  864. /**
  865. * @}
  866. */
  867. #ifdef __cplusplus
  868. }
  869. #endif
  870. #endif /* __STM32L0xx_LL_GPIO_H */
  871. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/