struct MY_STRUCT
{
unsigned int A:3;
unsigned int B:5;
unsigned int C:3;
unsigned int D:5;
unsigned int E:3;
unsigned int F:5;
unsigned int G:3;
unsigned int H:5;
};
union MY_UNION
{
unsigned int U;
signed int I;
struct MY_STRCUT B;
};
typedef int int32_t;
int32_t main(void)
{
struct MY_STRUCT var;
(*(struct MY_STRUCT *)0xF003B114).B = 0x10;
(*(union MY_UNION *)0xF003B114).U = 0x12345678;
(*(union MY_UNION *)0xF003B114).B.B = 0X10;
for(;;)
{
var.A = 0xF;
}
}
void Port_SetPinDirection(Port_PinType Pin, Port_PinDirectionType Direction)
{
switch (Pin)
{
case P11_6:
MODULE_P11.IOCR4.B.PC6 = (Direction << 4);
break;
}
}
void Port_SetPinMode(Port_PinType Pin, Port_PinModeType Mode)
{
switch (Pin)
{
case P11_6:
MODULE_P11.IOCR4.B.PC6 |= Mode;
break;
}
}