[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] port access with avr-gdb
From: |
Dave Hylands |
Subject: |
RE: [avr-gcc-list] port access with avr-gdb |
Date: |
Sun, 20 Jun 2004 21:34:04 -0700 |
Hi Brian,
Pretty much. You would either write:
tccr3a &= ~(BV(WGM31) | BV(WGM30) | BV(COM3A1));
tccr3a |= BV(COM3A0);
Or
tccr3abits.wgm31 = 0;
tccr3abits.wgm30 = 0;
tccr3abits.com3a1 = 0;
tccr3abits.com3a0 = 1;
Just subtley different from what you wrote.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
> -----Original Message-----
> From: Brian Dean [mailto:address@hidden
> Sent: Sunday, June 20, 2004 5:49 PM
> To: Dave Hylands
> Cc: Ned Konz; address@hidden
> Subject: Re: [avr-gcc-list] port access with avr-gdb
>
>
> On Fri, Jun 18, 2004 at 01:02:03PM -0700, Dave Hylands wrote:
>
> > I like it!
> >
> > The really nice thing about this approach is that you
> should be able
> > to see the symbolic names of the registers when you
> disassemble your
> > object files.
>
> Does this mean that the following initialization that looks like this:
>
> TCCR3A &= ~(BV(WGM31) | BV(WGM30) | BV(COM3A1));
> TCCR3A |= BV(COM3A0);
> TCCR3B &= ~(BV(WGM33) | BV(WGM32) | BV(CS32) | BV(CS30));
> TCCR3B |= BV(CS31);
>
> Might instead be written like this:
>
> tccr3a.wgm31 = 0;
> tccr3a.wgm30 = 0;
> tccr3a.com3a1 = 0;
> tccr3a.com3a0 = 1;
> tccr3b.wgm33 = 0;
> tccr3b.wgm32 = 0;
> tccr3b.cs32 = 0;
> tccr3b.cs30 = 0;
> tccr3b.cs31 = 1;
>
> ???
>
> -Brian
>
>