English
Language : 

CC78K0S Datasheet, PDF (362/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
Bit Field Declaration
Bit field declaration
EXPLANATION
Because a through h are 8 bits or less, they are allocated in 1-byte units.
Figure 11-1. Bit Allocation by Bit Field Declaration (Example 1)
Bit allocation from MSB
with -RB option specified
Bit allocation from LSB
without -RB option specified
MSB
LSB
ABCDE FGH
MSB
LSB
HGF EDCBA
EXAMPLE 2
(Bit field declaration)
struct t {
char
unsigned char
unsigned char
unsigned char
int
unsigned char
unsigned char
unsigned char
unsigned int
};
a;
b:2;
c:3;
d:4;
e;
f:5;
g:6;
h:2;
i:2;
362
User’s Manual U14872EJ1V0UM