cancel
Showing results for 
Search instead for 
Did you mean: 

ST librairy syntax

lil-vince
Associate II
Posted on January 17, 2009 at 10:14

ST librairy syntax

2 REPLIES 2
lil-vince
Associate II
Posted on May 17, 2011 at 12:59

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)?

Thanks

trevor1
Associate II
Posted on May 17, 2011 at 12:59

no difference, just a matter of style.