Coding Standard

The generic coding style, naming, indentation, commenting etc. follows the same rules as ASF4.

Register and bitfield names and addressing follows the naming style supported by the device-support package/header-files for the specific device. Several conventions have been used since the birth of the AVR, and code generated by Atmel START access hardware using mechanisms provided by the header files for each device.

Newer devices, like XMEGA® and AVR devices such as ATtiny817, follow the conventions in the AVR1000 application note.

Usage of macros

Macros are usually not used to implement functions, since macros pose problems for example when attempting to place breakpoints on them. Atmel START-generated code uses ordinary C-functions instead, leaving optimizations to the compiler. Wherever this results in too large code size, simple functions are defined as static inline.