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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/18/03 23:14
Read: times


 
#52840 - RE: C question (bitfields, structures)
Responding to: ???'s previous message
You could always define macros to hide the bit manipulation. For example,

#define SETEN (CONF |= 0x01)
#define CLREN (CONF &= ~0x01)

or even:

#define SETBIT(b) (CONF |= 0x01 << b)
#define CLRBIT(b) (CONF &= ~(0x01 << b))

#define SETEN SETBIT(2)

etc.


List of 5 messages in thread
TopicAuthorDate
C question (bitfields, structures)            01/01/70 00:00      
   RE: C question (bitfields, structures)            01/01/70 00:00      
   RE: C question (bitfields, structures)            01/01/70 00:00      
      RE: C question (bitfields, structures)            01/01/70 00:00      
      RE: C question (bitfields, structures)            01/01/70 00:00      

Back to Subject List