Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: Bit addressing

2006-03-01 by 42Bastian Schick

Robert Adsett schrieb:

> In particular with this construct you could get a 8 bit I/O operation, 
> a 16 bit
> I/O operation or a 32bit I/O operation.

Correct.
gcc tries to optimize accesses, so if you have a register which must be 
read/writen as 32bits, bitfields fail for this.
Other compiler read/write the size of the container.
For the PPC version exists a patch for 4.0.x gcc to change this.

> Basically bitfields are a very bad idea for I/O.  Sooner or later thay 
> will bite you in the fundament.

Copy that.

-- 
42Bastian

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.