[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Proposal for CANIDT and extension to sfr_defs.h

From: Mudiaga Obada
Subject: Re: [avr-libc-dev] Proposal for CANIDT and extension to sfr_defs.h
Date: Mon, 17 Jan 2005 20:12:20 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041122

> mob->address = CANIDT;

Having 32-bit SFR access might be useful someday someplace, but I don't
see it as being very useful in a generic context for the CAN id and id
mask registers.

You can look at the IDTx registers as one 32-bit register, but that does
not make them a 32-bit register. Atmel might in the future decide to put
the IDTx registers at different (non-consecutive) addresses on later

Having said that, writing

> mob->address = CANIDT;

looks like a style matter to me, and I don't see any advantage handling
CANIDT as one 32-bit register. Sooner or later, one would still have to
check the IDE bit (stored elsewhere), and extract the 11 or 29 bits
needed. Why not just process the CANary MOB as soon as possible, writing
the right byte to the right place, doing the shift while at it and
storing the CAN message in a (CAN) hardware independent data structure?

One nice thing about Atmels CANary regsiters is that it basically is
identical to what's found on their MCS-51 chips.

Mit freundlichen Gruessen

Mudiaga Obada

reply via email to

[Prev in Thread] Current Thread [Next in Thread]