Hello everybody,
I am very new to C language. In my project I get data serially from a port pin. I want to save the first 8 bits to one variable, another to second & so on. In all I want to save 32 bits in 4 bytes. Can you suggest C code.
I know it in assembly by using RRC or RLC, but how to achieve it in C?
Thanks
Good lord, why use this indentation
if(DATA) { data_received =| ( 1 << bits_received ) ; // I always add a trailing space }
when you can do this
if (DATA) { data_received |= (1 << bits_received); // I always add a trailing space }
The horror, the horror...
Indentation is religion. There are no "right" indentation.