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.
The C complier doesn't like this piece of source code: ------------------------- struct MyUart { union { unsigned char rx; // read unsigned char tx; // write }; unsigned char control; // r/w }; volatile struct MyUart far* const UART = 0x101010; unsigned char ReadByte( void ) { while ( (UART->control & 0x01) == 0 ) {} return UART->rx; } -------------------- I get the following error: UNION.C(15): error C70: rx: undefined member However, I get no error at line #13 on the reference to UART->control. Is there something I'm overlooking?