Xmega Application Note | |||||
Copyright (c) 2010, Atmel Corporation All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. The name of ATMEL may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file config.h.
#include "avr_compiler.h"
Go to the source code of this file.
Defines | |
#define | ADC_NOISE_REDUCTION_MODE ((0<<SM2)|(0<<SM1)|(1<<SM0)) |
#define | Clear_prescaler() (CLKPR = (1<<CLKPCE),CLKPR = 0) |
#define | code |
#define | Enter_sleep(mode) (SMCR = mode | (1<<SE)),(__sleep()),(SMCR=0) |
#define | EXTENDED_STANDBY_MODE ((1<<SM2)|(1<<SM1)|(1<<SM0)) |
#define | FOSC 8000 |
#define | IDLE_MODE ((0<<SM2)|(0<<SM1)|(0<<SM0)) |
#define | Led_init() ((DDRB |= (1<<PB6)),Led_on()) |
#define | Led_off() (PORTB |= (1<<PB6)) |
#define | Led_on() (PORTB &= ~(1<<PB6)) |
#define | Led_tgl() (PINB |= (1<<PB6)) |
#define | LSB(u16) (((uint8_t* )&u16)[0]) |
#define | LSB0(u32) MSB3(u32) |
#define | LSB1(u32) MSB2(u32) |
#define | LSB2(u32) MSB1(u32) |
#define | LSB3(u32) MSB0(u32) |
#define | LSW(u32) (((uint16_t*)&u32)[0]) |
#define | MSB(u16) (((uint8_t* )&u16)[1]) |
#define | MSB0(u32) (((uint8_t* )&u32)[3]) |
#define | MSB1(u32) (((uint8_t* )&u32)[2]) |
#define | MSB2(u32) (((uint8_t* )&u32)[1]) |
#define | MSB3(u32) (((uint8_t* )&u32)[0]) |
#define | MSW(u32) (((uint16_t*)&u32)[1]) |
#define | NB_MS_BEFORE_FLUSH 50 |
#define | POWER_DOWN_MODE ((0<<SM2)|(1<<SM1)|(0<<SM0)) |
#define | POWER_SAVE_MODE ((0<<SM2)|(1<<SM1)|(1<<SM0)) |
#define | Set_prescaler(x) (CLKPR = (1<<CKLPCE),CLKPR = x) |
#define | STANDBY_MODE ((1<<SM2)|(1<<SM1)|(0<<SM0)) |
#define | Start_PLL() (PLLCSR = (( (0<<PLLP2) | (1<<PLLP1) | (1<<PLLP0) ) | (1<<PLLE) )) |
#define | Wait_pll_ready() while (!(PLLCSR & (1<<PLOCK))) |
#define ADC_NOISE_REDUCTION_MODE ((0<<SM2)|(0<<SM1)|(1<<SM0)) |
#define Clear_prescaler | ( | ) | (CLKPR = (1<<CLKPCE),CLKPR = 0) |
#define Enter_sleep | ( | mode | ) | (SMCR = mode | (1<<SE)),(__sleep()),(SMCR=0) |
#define Led_init | ( | ) | ((DDRB |= (1<<PB6)),Led_on()) |
#define Led_tgl | ( | ) | (PINB |= (1<<PB6)) |
#define LSB | ( | u16 | ) | (((uint8_t* )&u16)[0]) |
#define LSB0 | ( | u32 | ) | MSB3(u32) |
Definition at line 102 of file config.h.
Referenced by cdc_get_line_coding(), and cdc_set_line_coding().
#define LSB1 | ( | u32 | ) | MSB2(u32) |
Definition at line 103 of file config.h.
Referenced by cdc_get_line_coding(), and cdc_set_line_coding().
#define LSB2 | ( | u32 | ) | MSB1(u32) |
Definition at line 104 of file config.h.
Referenced by cdc_get_line_coding(), and cdc_set_line_coding().
#define LSB3 | ( | u32 | ) | MSB0(u32) |
Definition at line 105 of file config.h.
Referenced by cdc_get_line_coding(), and cdc_set_line_coding().
#define MSB | ( | u16 | ) | (((uint8_t* )&u16)[1]) |
#define NB_MS_BEFORE_FLUSH 50 |
Define of maximum ms before flushing buffer
Definition at line 108 of file config.h.
Referenced by cdc_task().
#define Set_prescaler | ( | x | ) | (CLKPR = (1<<CKLPCE),CLKPR = x) |
#define Start_PLL | ( | ) | (PLLCSR = (( (0<<PLLP2) | (1<<PLLP1) | (1<<PLLP0) ) | (1<<PLLE) )) |
Start PLL with prescaler 4 and test PLL lock bit and wait until lock is set
Definition at line 65 of file config.h.
Referenced by usb_start_device().
#define Wait_pll_ready | ( | ) | while (!(PLLCSR & (1<<PLOCK))) |
Macro to wait for the PLL to be ready.
Definition at line 68 of file config.h.
Referenced by usb_start_device().
Generated on Mon Jan 18 09:26:10 2010 for AVR1907 Xplain USB Gateway by ![]() |