|
CC78K0S Datasheet, PDF (361/520 Pages) NEC – C Compiler Ver.1.30 or Later Language | |||
|
◁ |
CHAPTER 11 EXTENDED FUNCTIONS
Bit Field Declaration
Bit field declaration
COMPATIBILITY
<From another C compiler to this C compiler>
⢠The source program need not be modified.
⢠Change the type specifier to use unsigned char as the type specifier.
<From this C compiler to another C compiler>
⢠The source program need not be modified if unsigned char is not used as a type specifier.
⢠Change unsigned char, if it is used as a type specifier, into unsigned int.
(2) Allocation direction of bit field
FUNCTION
⢠The direction in which a bit field is to be allocated is changed and the bit field is allocated from the MSB side
when the -RB option is specified.
⢠If the -RB option is not specified, the bit field is allocated from the LSB side.
USAGE
⢠Specify the -RB option at compile time to allocate the bit field from the MSB side.
⢠Do not specify the option to allocate the bit field from the LSB side.
EXAMPLE 1
(Bit field declaration)
struct t {
unsigned char A:1;
unsigned char B:1;
unsigned char C:1;
unsigned char D:1;
unsigned char E:1;
unsigned char F:1;
unsigned char G:1;
unsigned char H:1;
};
Userâs Manual U14872EJ1V0UM
361
|
▷ |