[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: Re: [avr-gcc-list] efficiency of assigning bits
From: |
Royce & Sharal Pereira |
Subject: |
Fwd: Re: [avr-gcc-list] efficiency of assigning bits |
Date: |
Tue, 15 Mar 2005 00:51:16 +0530 |
User-agent: |
Opera M2(BETA2)/8.0 (Win32, build 7483) |
Hello,
------- Forwarded message -------
I am assuming these are equivalent.
Not quite. Do this:
PORTD &= ~(_BV(PD1) | _BV(PD4));
That will clear the two bits at the same time.
----------------------------------
or, PORTD &= ~((1<<1) | (1<<4)); //to bypass the _BV stuff,
or, PORTD &= ~(3<<1);
or, PORTD &= ~6; //cryptic but less typing.
or, PORTD &= 0xf9; //--ditto--
etc..etc..
--Royce.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
- Re: [avr-gcc-list] efficiency of assigning bits, (continued)
- Re: [avr-gcc-list] efficiency of assigning bits, E. Weddington, 2005/03/14
- Re: [avr-gcc-list] efficiency of assigning bits, David Willmore, 2005/03/14
- Re: [avr-gcc-list] efficiency of assigning bits, E. Weddington, 2005/03/14
- Re: [avr-gcc-list] efficiency of assigning bits, Erik Walthinsen, 2005/03/14
- Re: [avr-gcc-list] efficiency of assigning bits, Jesper Hansen, 2005/03/14
- Re: [avr-gcc-list] efficiency of assigning bits, E. Weddington, 2005/03/14
- Re: [avr-gcc-list] efficiency of assigning bits, Erik Walthinsen, 2005/03/14
- Re: [avr-gcc-list] efficiency of assigning bits (OT), Hugo González Monteverde, 2005/03/15
- Re: [avr-gcc-list] efficiency of assigning bits, Dave Hansen, 2005/03/14
- Re: [avr-gcc-list] efficiency of assigning bits, Christof Krueger, 2005/03/14
Fwd: Re: [avr-gcc-list] efficiency of assigning bits,
Royce & Sharal Pereira <=
Re: [avr-gcc-list] efficiency of assigning bits, Parthasaradhi Nayani, 2005/03/13
Re: [avr-gcc-list] efficiency of assigning bits, Parthasaradhi Nayani, 2005/03/13
Re: [avr-gcc-list] efficiency of assigning bits, Daniel O'Connor, 2005/03/13
Re: [avr-gcc-list] efficiency of assigning bits, Parthasaradhi Nayani, 2005/03/13