[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] New device support
From: |
Dmitry K. |
Subject: |
Re: [avr-libc-dev] New device support |
Date: |
Mon, 16 Jul 2007 09:09:56 +1100 |
User-agent: |
KMail/1.5 |
On Monday 16 July 2007 07:07, Joerg Wunsch wrote:
> As Dmitry K. wrote:
> > > TCCR0B = _BV(CS00) | _BV(CS02);
> > >
> > > would be rewritten as
> > >
> > > TCCR0B_.byte = _BV(CS00) | _BV(CS02);
> >
> > A small note: the above expressions are *different*.
>
> No, they aren't. The .byte union member simply access the entire
> 8-bit IO register the same way as the current definitions would do, so
> there's no read/modify/write behaviour.
[...]
> Of course, what *is* different is to write
>
> TCCR0B_.bits.cs0 = CS0_1024;
>
> This yields:
>
> in r24,69-0x20
> andi r24,lo8(-8)
> ori r24,lo8(5)
> out 69-0x20,r24
>
> i.e. read/modify/write behaviour.
Yes, You are right, I was inattentive.
Dmitry.
- Re: [avr-libc-dev] New device support, (continued)
- Re: [avr-libc-dev] New device support, Dmitry K., 2007/07/15
- Re: [avr-libc-dev] New device support, Bob Paddock, 2007/07/15
- Re: [avr-libc-dev] New device support, Joerg Wunsch, 2007/07/15
- Re: [avr-libc-dev] New device support, Bob Paddock, 2007/07/17
- Re: [avr-libc-dev] New device support, Joerg Wunsch, 2007/07/18
- [avr-libc-dev] Hint For Watchdog Disable on Newer AVRs in the Manual, Harald Kipp, 2007/07/18
- Re: [avr-libc-dev] Hint For Watchdog Disable on Newer AVRs in the Manual, Harald Kipp, 2007/07/18
- Re: [avr-libc-dev] Hint For Watchdog Disable on Newer AVRs in the Manual, Joerg Wunsch, 2007/07/18
- Re: [avr-libc-dev] Hint For Watchdog Disable on Newer AVRs in the Manual, Harald Kipp, 2007/07/19
Re: [avr-libc-dev] New device support, Joerg Wunsch, 2007/07/15
- Re: [avr-libc-dev] New device support,
Dmitry K. <=