From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Edwards To: jeremy Cc: ecos-discuss@sourceware.cygnus.com Subject: Re: [ECOS] HAL register write problem Date: Wed, 24 Jan 2001 07:18:00 -0000 Message-id: <20010124092208.A1588@visi.com> References: <004201c0859b$46d0fba0$7c6509c0@viatech.com> X-SW-Source: 2001-01/msg00398.html On Tue, Jan 23, 2001 at 04:18:55PM -0800, jeremy wrote: > I only parenthesized the 16 bit register, and that was the problem. > In original pid codes, all registers are 8-bits, so it ok if all defined > this way: > ((volatile cyg_uint8 *) XXX + 0xXX) > ... > Is it because of the alignment? No, it's because of the precedence of the typecast and addition operators in the C language. -- Grant Edwards grante@visi.com