Hi! Sagtmal, funktioniert bit_is_set nur bei 8-Bit Speicherstellen? Bin grad bei meinem Programm verzweifelt.
1 | #include <avr/io.h> |
2 | |
3 | uint16_t large; |
4 | uint8_t small; |
5 | |
6 | int main(void) |
7 | {
|
8 | large = 0xFFFF; |
9 | small = 1; |
10 | |
11 | if(bit_is_set(large, 10)) |
12 | {
|
13 | small = 2; |
14 | }
|
15 | }
|
Das arbeitet hier einfach nicht richtig.. wenn ich if(large & (1 << 10)) schreibe, dann funktioniert es. Ist das normal? lg PoWl