LonelyWolf / stm32

STM32 stuff
The Unlicense
962 stars 494 forks source link

Don't do check for TRUE or FALSE at this place #20

Open msin87 opened 5 years ago

msin87 commented 5 years ago

https://github.com/LonelyWolf/stm32/blob/a6c104920ca905cf38c3b35e5b81e28e189166cf/Si4703/main.c#L98

Please, for compatibility with different stm32 microcontrollers, replace this check with the following: while (I2C_CheckEvent(I2C_PORT,I2C_EVENT_MASTER_MODE_SELECT)==ERROR);

For stm32f4 ErrorStatus defined as:

typedef enum 
{
  ERROR = 0U, 
  SUCCESS = !ERROR
} ErrorStatus;

Please do this in all your code