avr-gcc-list
[Top][All Lists]
Advanced

[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 23:07:39 -0700

Hi Ned,

You could for com3, but I looked at the data sheet for the Atmega 16, and wgm01 
occupies bit 3 and wgm00 occupies bit 6. So you'll be able to make some bit 
fields wider, but not all. (Note that I used wgm00 and 01, not wgm30 & 31).

Dave Hylands

> -----Original Message-----
> From: Ned Konz [mailto:address@hidden 
> Sent: Sunday, June 20, 2004 10:13 PM
> To: address@hidden
> Cc: Brian Dean; Dave Hylands
> Subject: Re: [avr-gcc-list] port access with avr-gdb
> 
> 
> On Sunday 20 June 2004 9:34 pm, Dave Hylands wrote:
> > 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.
> 
> But why not use wider bitfields?
> 
>       tccr3abits.wgm3 = 0;
>       tccr3abits.com3a = 1;
> 
> -- 
> Ned Konz
> http://bike-nomad.com
> GPG key ID: BEEA7EFE
> 
> 



reply via email to

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