| ??? 05/31/03 10:07 Read: times |
#47099 - RE: Grabbing a bit from a byte? Responding to: ???'s previous message |
These routines work fine with IAR and Keil ,but I've no idea how SDCC will mangle them..
U8 bit_test(U8 cbyte,U8 cbit) {
return(((cbyte &(1 << cbit))!=0));}
U8 bit_set(U8 cbyte,U8 cbit) {
cbyte |=(1 << cbit);
return(cbyte);}
U8 bit_clear(U8 cbyte,U8 cbit) {
cbyte &=~(1 << cbit);
return(cbyte);}
|
| Topic | Author | Date |
| Grabbing a bit from a byte? | 01/01/70 00:00 | |
| RE: Grabbing a bit from a byte? | 01/01/70 00:00 | |
| RE: Grabbing a bit from a byte? | 01/01/70 00:00 | |
| RE: Grabbing a bit from a byte? | 01/01/70 00:00 | |
| RE: Grabbing a bit from a byte? | 01/01/70 00:00 | |
| RE: Grabbing a bit from a byte? | 01/01/70 00:00 | |
| RE: Grabbing a bit from a byte? | 01/01/70 00:00 | |
| RE: Grabbing a bit from a byte? | 01/01/70 00:00 | |
RE: Grabbing a bit from a byte? | 01/01/70 00:00 | |
| RE: Grabbing a bit from a byte? | 01/01/70 00:00 |



