> Date: Wed, 23 Jun 2010 11:53:31 -0400
> From: Daniel Jacobowitz <d...@codesourcery.com>
> On Wed, Jun 23, 2010 at 11:34:04AM -0400, DJ Delorie wrote:
> > > Can we similarly promise or say something for accesses of the
> > > containing struct as a whole?
> > I hadn't considered those cases (when would you want to copy a
> > *peripheral* ?)  Should be the same as before, I would think.
> Not the peripheral, just one register.  e.g. you might read a control
> register into a struct of the same (32-bit) type, and then read
> multiple fields from the copied struct.

Exactly.  One register with several fields, which you want or
must read together, or that you read, change some fields, then
write back, if your write-registers have built-in shadowing.  It
is of course a prerequisite that you know the ABI-mapping for
bitfields.  (Which as a sidenote happen to be identical for most
common targets with the same endianness, given that you fill
exactly 32 bits!)

brgds, H-P

Reply via email to