2009-01-17 01:14 AM
ST librairy syntax
2011-05-17 03:59 AM
Hi all,
I´ve a probably stupid question but I prefer to be sure: Is there a difference between this two syntax for a if statement: ST use this statement in their librairy (for example): if ((ADCx->CR2 & CR2_CAL_Set) != (u32)RESET) or if ((ADCx->SR & ADC_FLAG) != (u8)RESET) And I used to write like this: if ((ADCx->CR2 & CR2_CAL_Set)) Because I prefer my syntax, I would like to know if there is a reason to write like ST (code size/speed)? Thanks2011-05-17 03:59 AM
no difference, just a matter of style.