Re: Help needed in dereferencing a union
- From: "Jirka Klaue" <jklaue@xxxxxxxxxxxxxxxx>
- Date: Tue, 31 May 2005 20:18:00 +0200
On Tue, 31 May 2005 19:25:27 +0200, jlara <jlara@xxxxxxxxxx> wrote:
typedef union
{
uint8 byte;
struct
{
uint8 : 4;
uint8 bla : 4;
uint8 tffca : 1; uint8 tsfrz : 1; uint8 tswai : 1; uint8 ten : 1; /* timer enable */ }bit; }tSCR1;
#define scr1 (*(tSCR1 *)(0x4c))
scr1.bit.ten = 1; /* the compiler complains about this */
No, it complains about a missing field name in bit.
Jirka .
- Follow-Ups:
- Re: Help needed in dereferencing a union
- From: Jens . Toerring
- Re: Help needed in dereferencing a union
- References:
- Help needed in dereferencing a union
- From: jlara
- Help needed in dereferencing a union
- Prev by Date: Re: Multiple return statements Vs goto's
- Next by Date: Re: Multiple return statements Vs goto's
- Previous by thread: Help needed in dereferencing a union
- Next by thread: Re: Help needed in dereferencing a union
- Index(es):