I have to rearagne bits in a byte. I solved the problme like this:
uint8_t c;
uint8_t string[3];
string1[2] = (((c&(1<<0))!=0)<<6)|
(((c&(1<<1))!=0)<<1)|
(((c&(1<<2))!=0)<<0)|
(((c&(1<<3))!=0)<<2)|
(((c&(1<<4))!=0)<<3)|
(((c&(1<<5))!=0)<<4)|
(((c&(1<<6))!=0)<<5)|
(((c&(1<<7))!=0)<<7);
basicly:
if bit0 is a 1, shift a 1 6times to the left.
if bit1 is a 1, shift a 1 0times to the left. ....
Is there a better solution?