struct lcd_pin_map { // This structure is overlayed
BOOLEAN enable; // on to an I/O port to gain
BOOLEAN rs; // access to the LCD pins.
BOOLEAN rw; // The bits are allocated from
BOOLEAN unused; // low order up. ENABLE will
int data : 4; // be pin B0.
} lcd;
I was expecting a syntax error in command but its not.
Code:
int data : 4;
Kindly anyone explain me what this statement do.
Thanks _________________ ...
andrewg
Joined: 17 Aug 2005 Posts: 316 Location: Perth, Western Australia
Posted: Sat Jan 21, 2012 7:23 am
Google "struct bit field"... _________________ Andrew
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum