.TH ": AVR device-specific IO definitions" 3avr "Wed Jun 4 2014" "Version 1.8.0svn" "avr-libc" \" -*- nroff -*- .ad l .nh .SH NAME : AVR device-specific IO definitions \- .SS "Macros" .in +1c .ti -1c .RI "#define \fB_PROTECTED_WRITE\fP(reg, value)" .br .in -1c .SH "Detailed Description" .PP .PP .nf #include .fi .PP .PP This header file includes the apropriate IO definitions for the device that has been specified by the \fC-mmcu=\fP compiler command-line switch\&. This is done by diverting to the appropriate file \fC\fP which should never be included directly\&. Some register names common to all AVR devices are defined directly within \fC\fP, which is included in \fC<\fBavr/io\&.h\fP>\fP, but most of the details come from the respective include file\&. .PP Note that this file always includes the following files: .PP .nf #include #include #include #include .fi .PP See \fB: Special function registers\fP for more details about that header file\&. .PP Included are definitions of the IO register set and their respective bit values as specified in the Atmel documentation\&. Note that inconsistencies in naming conventions, so even identical functions sometimes get different names on different devices\&. .PP Also included are the specific names useable for interrupt function definitions as documented \fBhere\fP\&. .PP Finally, the following macros are defined: .PP .IP "\(bu" 2 \fBRAMEND\fP .br The last on-chip RAM address\&. .br .IP "\(bu" 2 \fBXRAMEND\fP .br The last possible RAM location that is addressable\&. This is equal to RAMEND for devices that do not allow for external RAM\&. For devices that allow external RAM, this will be larger than RAMEND\&. .br .IP "\(bu" 2 \fBE2END\fP .br The last EEPROM address\&. .br .IP "\(bu" 2 \fBFLASHEND\fP .br The last byte address in the Flash program space\&. .br .IP "\(bu" 2 \fBSPM_PAGESIZE\fP .br For devices with bootloader support, the flash pagesize (in bytes) to be used for the \fCSPM\fP instruction\&. .IP "\(bu" 2 \fBE2PAGESIZE\fP .br The size of the EEPROM page\&. .PP .SH "Macro Definition Documentation" .PP .SS "#define _PROTECTED_WRITE(reg, value)" Write value \fCvalue\fP to IO register \fCreg\fP that is protected through the Xmega configuration change protection (CCP) mechanism\&. This implements the timed sequence that is required for CCP\&. .PP Example to modify the CPU clock: .PP .nf #include _PROTECTED_WRITE(CLK_PSCTRL, CLK_PSADIV0_bm); _PROTECTED_WRITE(CLK_CTRL, CLK_SCLKSEL0_bm); .fi .PP .SH "Author" .PP Generated automatically by Doxygen for avr-libc from the source code\&.