STMicroelectronics / STM32CubeF3

STM32Cube MCU Full Package for the STM32F3 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
142 stars 54 forks source link

Fix documentation of I2C_WaitOnFlagUntilTimeout() to match code. #9

Closed markrages closed 2 years ago

markrages commented 3 years ago

I ran into this code while trying to account for some 25 millisecond delays in my code.

The I2C_WaitOnFlagUntilTimeout() is improperly commented. It is documented as if it waits for a flag to change to the specified status, but reading the code shows it is actually waiting for the flag to change from the specified status.

A quick grep shows the following duplicated functions are poorly documented in the same way:

Src/stm32f3xx_hal_usart.c:static HAL_StatusTypeDef [USART_WaitOnFlagUntilTimeout();
Src/stm32f3xx_hal_irda.c:static HAL_StatusTypeDef IRDA_WaitOnFlagUntilTimeout()
Src/stm32f3xx_hal_smbus.c:static HAL_StatusTypeDef SMBUS_WaitOnFlagUntilTimeout();
Src/stm32f3xx_hal_smartcard.c:static HAL_StatusTypeDef SMARTCARD_WaitOnFlagUntilTimeout();

I did not make the corresponding fix to these functions.

ASELSTM commented 3 years ago

Hi @markrages,

Allow me first to thank you for your contribution. Your report has been forwarded to our development team. We will get back to you as soon as we have more details.

With regards,

ASELSTM commented 3 years ago

ST Internal Reference: 112498