11.07.2015 Views

Imagecraft c compiler and development environment for the atmel avr

Imagecraft c compiler and development environment for the atmel avr

Imagecraft c compiler and development environment for the atmel avr

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ICCV8 <strong>for</strong> AVR – C Compiler <strong>for</strong> Atmel AVRXMega IO RegistersWith XMega, Atmel introduces new syntax to access <strong>the</strong> io registers, using structs <strong>and</strong>unions. See AppNote AVR1000 from Atmel <strong>for</strong> details.ImageCraft IO header files support <strong>the</strong> new syntax fully. In version 8.02 <strong>and</strong> above,<strong>the</strong> <strong>compiler</strong> accepts C++ style anonymous union <strong>and</strong> struct <strong>and</strong> thus become fullycompatible with <strong>the</strong> Atmel AppNote examples. The previous versions of <strong>the</strong> <strong>compiler</strong>do not support C++ anonymous union <strong>and</strong> use st<strong>and</strong>ard C syntax to access multi-bytestruct members:Table 1: XMega IO Register AccessAtmel Style <strong>and</strong> ICC8.02 <strong>and</strong> NewerICC PRE-8.02 Stylecommentsbase->structmember base->structmember byte registerbase->structmember base->structmember.i word registerbase->structmemberLbase->structmemberHbase->structmember.bLbase->structmember.bHbyte access to word registerbase->structmember base->structmember.l dword registerbase->structmember0base->structmember1base->structmember2base->structmember3base->structmember.b0base->structmember.b1base->structmember.b2base->structmember.b3byte access to dword registerRemember, 8.02 <strong>and</strong> above use <strong>the</strong> left column syntax, just like <strong>the</strong> Atmel examples.122

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!