AVR Device Explorer View <avr/io.h> Data Source

The AVR Device Explorer View can use the <avr/io.h> header file and its associated, processor specific header files as a data source. These header files are part of the AVR libc package.

The header files are not a perfect, not even a good souce for information, as only some processor specific header files contain descriptive comments. But on the plus side, the information they provide is (almost) exactly the same as the compiler sees.

The viewer parses the header files to extract as much information as possible. As the viewer needs the source file comments, it does not use the gcc preprocessor. This means that any conditional code in the header files is ignored which might cause some inaccuracies. If in doubt, use the source link to open the source header file and check the source yourself.

The header files are parsed as follows:

  1. The <avr/io.h> file is read and for all lines looking like this:
     #elif defined (__PROCESSORNAME__)
     #  include <avr/ioProcesorName.h>
    the PROCESSORNAME is added to the list of known processors and the include file is read and parsed.

  2. The required processor specific from step 1 are parsed for the following patterns:

    #include <avr/io?????.h>
    The file is included in the parsing process
    /* EEPROM Address Register */
    #define EEAR _SFR_IO16(0x1E)
    #define EEARL _SFR_IO8(0x1E)
    #define EEARH _SFR_IO8(0x1F)
    Register entries.
    All three entries will have the same description as given in the comment above it.
    /* Data Direction Register, Port F */
    #define DDRF      _SFR_MEM8(0x61)
    Port register.
    All registers whose name start with PIN?, PORT? or DDR? are assigned as ports.
    /* External Interrupt Request 0 */
    #define INT0_vect      _VECTOR(1)
    #define SIG_INTERRUPT0 _VECTOR(1)
    Interrupt.
    This example has both the old and the new style interrupt names.
    Some newer processor header files only have the new name, while some header files for older AVR processors only have the old names.

    Any descriptive comment use used for all entries immediatly following it up to the first empty line.
Related Concepts
AVR Device Explorer View Data Sources
Related Tasks
Using the AVR Device Explorer View