~ubuntu-branches/ubuntu/raring/avr-libc/raring-proposed

« back to all changes in this revision

Viewing changes to include/avr/power.h

  • Committer: Package Import Robot
  • Author(s): Hakan Ardo
  • Date: 2012-05-23 10:30:07 UTC
  • mfrom: (1.1.11) (4.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20120523103007-h7u5fhm6n13wds9e
Tags: 1:1.8.0-2
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
27
  POSSIBILITY OF SUCH DAMAGE. */
28
28
 
29
 
/* $Id: power.h 2213 2011-02-16 08:44:23Z aboyapati $ */
 
29
/* $Id: power.h 2254 2011-09-26 15:06:50Z arcanum $ */
30
30
 
31
31
#ifndef _AVR_POWER_H_
32
32
#define _AVR_POWER_H_   1
410
410
    PR_PRPD |= (uint8_t)(PR_TWI_bm|PR_USART1_bm|PR_USART0_bm|PR_SPI_bm|PR_HIRES_bm|PR_TC1_bm|PR_TC0_bm); \
411
411
    PR_PRPE |= (uint8_t)(PR_TWI_bm|PR_USART1_bm|PR_USART0_bm|PR_SPI_bm|PR_HIRES_bm|PR_TC1_bm|PR_TC0_bm); \
412
412
    PR_PRPF |= (uint8_t)(PR_TWI_bm|PR_USART1_bm|PR_USART0_bm|PR_SPI_bm|PR_HIRES_bm|PR_TC1_bm|PR_TC0_bm); \
 
413
} while(0)
413
414
#endif
414
415
 
415
416
#if defined(__AVR_ATxmega16A4__) \
531
532
    PR_PRPF |= (uint8_t)(PR_TWI_bm|PR_USART0_bm|PR_SPI_bm|PR_HIRES_bm|PR_TC1_bm|PR_TC0_bm); \
532
533
} while(0)
533
534
 
534
 
#endif
535
 
 
536
535
#elif defined(__AVR_ATmega640__) \
537
536
|| defined(__AVR_ATmega1280__) \
538
537
|| defined(__AVR_ATmega1281__) \
965
964
#define power_twi_enable()      (PRR0 &= (uint8_t)~(1 << PRTWI))
966
965
#define power_twi_disable()     (PRR0 |= (uint8_t)(1 << PRTWI))
967
966
 
968
 
#define power_all_enable()      (PRR0 &= (uint8_t)~((1<<PRADC)|(1<<PRSPI)|(1<<PRUSART0)|(1<<PRUSART1)|(1<<PRTIM0)|(1<<PRTIM2)|(1<<PRTWI)))
969
 
#define power_all_disable()     (PRR0 |= (uint8_t)((1<<PRADC)|(1<<PRSPI)|(1<<PRUSART0)|(1<<PRUSART1)|(1<<PRTIM0)|(1<<PRTIM2)|(1<<PRTWI)))
 
967
#define power_all_enable()      (PRR0 &= (uint8_t)~((1<<PRADC)|(1<<PRSPI)|(1<<PRUSART0)|(1<<PRUSART1)|(1<<PRTIM0)|(1<<PRTIM1)|(1<<PRTIM2)|(1<<PRTWI)))
 
968
#define power_all_disable()     (PRR0 |= (uint8_t)((1<<PRADC)|(1<<PRSPI)|(1<<PRUSART0)|(1<<PRUSART1)|(1<<PRTIM0)|(1<<PRTIM1)|(1<<PRTIM2)|(1<<PRTWI)))
970
969
 
971
970
 
972
971
#elif defined(__AVR_ATmega644__)
1385
1384
|| defined(__AVR_ATmega325A__) \
1386
1385
|| defined(__AVR_ATmega3250__) \
1387
1386
|| defined(__AVR_ATmega3250A__) \
 
1387
|| defined(__AVR_ATmega328__) \
1388
1388
|| defined(__AVR_ATmega328P__) \
1389
1389
|| defined(__AVR_ATmega329__) \
1390
1390
|| defined(__AVR_ATmega329A__) \
1422
1422
|| defined(__AVR_ATmega6490P__) \
1423
1423
|| defined(__AVR_ATmega88__) \
1424
1424
|| defined(__AVR_ATmega88P__) \
 
1425
|| defined(__AVR_ATmega8U2__) \
 
1426
|| defined(__AVR_ATmega16U2__) \
 
1427
|| defined(__AVR_ATmega32U2__) \
1425
1428
|| defined(__AVR_ATtiny48__) \
1426
1429
|| defined(__AVR_ATtiny167__) \
1427
1430
|| defined(__DOXYGEN__)