AVR Libc Home Page AVRs AVR Libc Development Pages
Main Page User Manual Library Reference FAQ Alphabetical Index Example Projects

power.h File Reference


Defines

#define _AVR_POWER_H_   1
#define clock_prescale_set(x)
#define clock_prescale_get()   (clock_div_t)(CLKPR & (uint8_t)((1<<CLKPS0)|(1<<CLKPS1)|(1<<CLKPS2)|(1<<CLKPS3)))

Enumerations

enum  clock_div_t {
  clock_div_1 = 0, clock_div_2 = 1, clock_div_4 = 2, clock_div_8 = 3,
  clock_div_16 = 4, clock_div_32 = 5, clock_div_64 = 6, clock_div_128 = 7,
  clock_div_256 = 8
}

Detailed Description


Define Documentation

#define clock_prescale_set (  ) 

Value:

{ \
        uint8_t tmp = _BV(CLKPCE); \
        __asm__ __volatile__ ( \
                "in __tmp_reg__,__SREG__" "\n\t" \
                "cli" "\n\t" \
                "sts %1, %0" "\n\t" \
                "sts %1, %2" "\n\t" \
                "out __SREG__, __tmp_reg__" \
                : /* no outputs */ \
                : "d" (tmp), \
                  "M" (_SFR_MEM_ADDR(CLKPR)), \
                  "d" (x) \
                : "r0"); \
}


Automatically generated by Doxygen 1.5.7 on 6 Nov 2008.