[ECOS] HAL register write problem
Grant Edwards
grante@visi.com
Wed Jan 24 07:18:00 GMT 2001
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
More information about the Ecos-discuss
mailing list