This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: HAL register write problem


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]