The intflags structure demonstrates a way to allocate bit variables in memory. Each of the interrupt service routines just sets one bit within that structure, and the application's main loop then monitors the bits in order to act appropriately.

Like all variables that are used to communicate values between an interrupt service routine and the main application, it is declared volatile.

The variable ee_pwm is not a variable in the classical C sense that could be used as an lvalue or within an expression to obtain its value. Instead, the


marks it as belonging to the EEPROM section. This section is merely used as a placeholder so the compiler can arrange for each individual variable's location in EEPROM. The compiler will also keep track of initial values assigned, and usually the Makefile is arranged to extract these initial values into a separate load file (largedemo_eeprom.* in this case) that can be used to initialize the EEPROM.

The actual EEPROM IO must be performed manually.

Similarly, the variable mcucsr is kept in the .noinit section in order to prevent it from being cleared upon application startup.