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. #8

Closed markrages closed 3 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();
ST-dot-com commented 3 years ago

This pull request has been refused, the Contribution License Agreement must be signed.