Skip to main content
jfolsom
Associate II
May 1, 2019
Question

Missing 'LL_GPIO_PinState' typedef in STM32CubeL1 (v1.8.1) low-level drivers

  • May 1, 2019
  • 1 reply
  • 694 views

There are two typedefs in the 'stm32l1xx_hal_gpio.h' file: 'GPIO_InitTypeDef' and 'GPIO_PinState'. The first has a corresponding entry in the low-level drivers (stm32l1xx_ll_gpio.h), but the other one is missing.

It looks like this in the HAL file:

/** 
 * @brief GPIO Bit SET and Bit RESET enumeration 
 */
typedef enum
{
 GPIO_PIN_RESET = 0,
 GPIO_PIN_SET
} GPIO_PinState;

To remain consistent with the other code modules, you may wish to add the following block to 'stm32l1xx_ll_gpio.h':

/** 
 * @brief LL GPIO Bit SET and Bit RESET enumeration 
 */
typedef enum
{
 LL_GPIO_PIN_RESET = 0,
 LL_GPIO_PIN_SET
} LL_GPIO_PinState;

This topic has been closed for replies.

1 reply

Amel NASRI
ST Technical Moderator
May 7, 2019

Hi @jfolsom​ ,

The typedef GPIO_PinState isn't required in stm32l1xx_hal_gpio.c, so there is no need to declare it.

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.