modm API documentation
AVR Core


enum  Peripheral {
  BitBang, Ac, Adc, Clock,
  Eeprom, Tc0, Tc1, Usi,

Detailed Description

lbuild module: modm:platform:core

Implements the interfaces defined in the modm:architecture modules. Adds the -mmcu={target} compile flag and the F_CPU={core frequency} define.


You can define the fuse values in your source code via the FUSES struct ELF section mechanism, they are automatically used by avrdude. For fuse values see the AVR Fuse Calculator.

#include <avr/io.h>
EFUSE_DEFAULT, // .extended

Blocking Delay

The delay functions as defined by modm:architecture:delay and called with a constant value** are implemented directly via GCC's __builtin_avr_delay_cycles(ns / (1e9 / F_CPU)). Constant delays are therefore fairly accurate.

For delays with a dynamic time, the following limitations apply for nanoseconds:

For micro- and milliseconds delays with dynamic time:

Module Options

modm:platform:core:f_cpu: CPU clock frequency

Generated with: 16000000 in [1 ... 32M]