We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I was wondering what the "best" way to set a bit in a variable declared in the bit addressable area. Originally I declared each bit as an sbit and therefore can set and clear them as follows
uint8_t bdata status ; sbit enable = staus ^ 0 ; enable = 1 ; enable = 0 ;
#define ENABLE 0x01 uint8_t bdata status ; status |= ENABLE ; status &= ~ENABLE ;
The compiler generates the same code. It is smart.