This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: HAL register write problem
- To: jeremy <chienyul at home dot com>
- Subject: Re: [ECOS] HAL register write problem
- From: Grant Edwards <grante at visi dot com>
- Date: Wed, 24 Jan 2001 09:22:08 -0600
- Cc: ecos-discuss at sourceware dot cygnus dot com
- References: <004201c0859b$46d0fba0$7c6509c0@viatech.com>
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