Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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);}



List of 10 messages in thread
TopicAuthorDate
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      

Back to Subject List