This file contains the Power Management low level driver definition. More...

Go to the source code of this file.
Defines | |
| #define | Setup_idle_mode() (SMCR=0,SMCR |= (1<<SE)) |
| #define | Setup_power_down_mode() (SMCR=0,SMCR |= (1<<SE)+(1<<SM1)) |
| #define | Setup_adc_noise_reduction_mode() (SMCR=0,SMCR |= (1<<SE)+(1<<SM0)) |
| #define | Setup_power_save_mode() (SMCR=0,SMCR |= (1<<SE)+(1<<SM1)+(1<<SM0)) |
| #define | Setup_standby_mode() (SMCR=0,SMCR |= (1<<SE)+(1<<SM2)+(1<<SM1)) |
| #define | Setup_ext_standby_mode() (SMCR=0,SMCR |= (1<<SE)+(1<<SM2)+(1<<SM1)+(1<<SM0)) |
| #define | Clear_prescaler() Set_cpu_prescaler(0) |
| This function reset the internal CPU core clock prescaler. | |
| #define | Sleep_instruction() {asm("SLEEP");} |
| #define | Set_power_down_mode() set_power_down_mode() |
| #define | Set_idle_mode() set_idle_mode() |
| #define | Enter_idle_mode() (set_idle_mode()) |
| This function makes the AVR core enter idle mode. | |
| #define | Enter_power_down_mode() (set_power_down_mode()) |
| This function makes the AVR core enter power down mode. | |
| #define | Enter_adc_noise_reduction_mode() (set_adc_noise_reduction_mode()) |
| This function makes the AVR core enter adc noise reduction mode. | |
| #define | Enter_power_save_mode() (set_power_save_mode()) |
| This function makes the AVR core enter power save mode. | |
| #define | Enter_standby_mode() (set_standby_mode()) |
| This function makes the AVR core enter standby mode. | |
| #define | Enter_ext_standby_mode() (set_ext_standby_mode()) |
| This function makes the AVR core enter extended standby mode. | |
| #define | Enable_external_clock() (CLKSEL0 |= (1<<EXTE)) |
| #define | Disable_external_clock() (CLKSEL0 &= ~(1<<EXTE)) |
| #define | Enable_RC_clock() (CLKSEL0 |= (1<<RCE)) |
| #define | Disable_RC_clock() (CLKSEL0 &= ~(1<<RCE)) |
| #define | External_clock_ready() (((CLKSTA&(1<<EXTON)) != 0) ? TRUE : FALSE) |
| #define | RC_clock_ready() (((CLKSTA&(1<<RCON)) != 0) ? TRUE : FALSE) |
| #define | Select_external_clock() (CLKSEL0 |= (1<<CLKS)) |
| #define | Select_RC_clock() (CLKSEL0 &= ~(1<<CLKS)) |
| #define | Load_ext_clock_config(cfg) |
| #define | Load_RC_clock_config(cfg) |
| #define | OSC_INTRC_0MS 0x02 |
| #define | OSC_INTRC_4MS 0x12 |
| #define | OSC_INTRC_65MS 0x22 |
| #define | OSC_XTAL_RANGE1_258CK_4MS 0x08 |
| #define | OSC_XTAL_RANGE1_258CK_65MS 0x18 |
| #define | OSC_XTAL_RANGE1_1KCK_0MS 0x28 |
| #define | OSC_XTAL_RANGE1_1KCK_4MS 0x38 |
| #define | OSC_XTAL_RANGE1_1KCK_65MS 0x09 |
| #define | OSC_XTAL_RANGE1_16KCK_0MS 0x19 |
| #define | OSC_XTAL_RANGE1_16KCK_4MS 0x29 |
| #define | OSC_XTAL_RANGE1_16KCK_65MS 0x39 |
| #define | OSC_XTAL_RANGE2_258CK_4MS 0x0A |
| #define | OSC_XTAL_RANGE2_258CK_65MS 0x1A |
| #define | OSC_XTAL_RANGE2_1KCK_0MS 0x2A |
| #define | OSC_XTAL_RANGE2_1KCK_4MS 0x3A |
| #define | OSC_XTAL_RANGE2_1KCK_65MS 0x0B |
| #define | OSC_XTAL_RANGE2_16KCK_0MS 0x1B |
| #define | OSC_XTAL_RANGE2_16KCK_4MS 0x2B |
| #define | OSC_XTAL_RANGE2_16KCK_65MS 0x3B |
| #define | OSC_XTAL_RANGE3_258CK_4MS 0x0C |
| #define | OSC_XTAL_RANGE3_258CK_65MS 0x1C |
| #define | OSC_XTAL_RANGE3_1KCK_0MS 0x2C |
| #define | OSC_XTAL_RANGE3_1KCK_4MS 0x3C |
| #define | OSC_XTAL_RANGE3_1KCK_65MS 0x0D |
| #define | OSC_XTAL_RANGE3_16KCK_0MS 0x1D |
| #define | OSC_XTAL_RANGE3_16KCK_4MS 0x2D |
| #define | OSC_XTAL_RANGE3_16KCK_65MS 0x3D |
| #define | OSC_XTAL_RANGE4_258CK_4MS 0x0E |
| #define | OSC_XTAL_RANGE4_258CK_65MS 0x1E |
| #define | OSC_XTAL_RANGE4_1KCK_0MS 0x2E |
| #define | OSC_XTAL_RANGE4_1KCK_4MS 0x3E |
| #define | OSC_XTAL_RANGE4_1KCK_65MS 0x0F |
| #define | OSC_XTAL_RANGE4_16KCK_0MS 0x1F |
| #define | OSC_XTAL_RANGE4_16KCK_4MS 0x2F |
| #define | OSC_XTAL_RANGE4_16KCK_65MS 0x3F |
| #define | OSC_EXTCLK_0MS 0x00 |
| #define | OSC_EXTCLK_4MS 0x10 |
| #define | OSC_EXTCLK_65MS 0x20 |
Functions | |
| void | Set_cpu_prescaler (U8 x) |
| This function configure the internal CPU core clock prescaler value. | |
| void | set_idle_mode (void) |
| This function makes the AVR core enter idle mode. | |
| void | set_power_down_mode (void) |
| This function makes the AVR core enter power down mode. | |
| void | set_adc_noise_reduction_mode (void) |
| This function makes the AVR core enter adc noise reduction mode. | |
| void | set_power_save_mode (void) |
| This function makes the AVR core enter power save mode. | |
| void | set_standby_mode (void) |
| This function makes the AVR core enter standby mode. | |
| void | set_ext_standby_mode (void) |
| This function makes the AVR core enter extended standby mode. | |
| void | Clock_switch_external (void) |
| This function makes the AVR selects the EXTERNAL clock source (CRYSTAL) | |
| void | Clock_switch_internal (void) |
| This function makes the AVR selects the INTERNAL clock source (RC) | |
This file contains the Power Management low level driver definition.
This module allows to configure the different power mode of the AVR core and also to setup the the internal clock prescaler
Definition in file power_drv.h.
1.7.2