The AVR series of microcontrollers by Atmel are supported using avr-g++. AVR-specific classes and functions are provided to expose the functionality of the platform, including the GPIO ports, SPI interface, etc.
The AVR interface is declared in the header alambre/system/avr.h, with the primary entry point being the avr_system variable described below.
DefinesVariablesALAMBRE_SYSTEM_AVR_PIN_ACCESSOR
Macro for easily generating GPIO pin accessors.
This is a private implementation detail.
AvrSystem avr_system
Global variable providing access to the features of the target AVR system.
class AvrSystem
Provides access to the built-in features of an AVR microcontroller.
The members of this class will vary depending on which specific microcontroller unit is targeted by the current build.
The GPIO pins are available as members with the names given in the unit’s datasheet. The documentation for this class assumes a microcontroller with only GPIO port B available as an example; other ports will follow the same convention. Do not refer directly to the types of these members since it is considered an implementation detail; instead, use the typeof() operator.
Public MembersAvrGpioPortBPin < 0 > * B0
IGPIOPin implementation for pin B0.
AvrGpioPortBPin < 1 > * B1
IGPIOPin implementation for pin B1.
AvrGpioPortBPin < 2 > * B2
IGPIOPin implementation for pin B2.
AvrGpioPortBPin < 3 > * B3
IGPIOPin implementation for pin B3.
AvrGpioPortBPin < 4 > * B4
IGPIOPin implementation for pin B4.
AvrGpioPortBPin < 5 > * B5
IGPIOPin implementation for pin B5.
AvrGpioPortBPin < 6 > * B6
IGPIOPin implementation for pin B6.
AvrGpioPortBPin < 7 > * B7
IGPIOPin implementation for pin B7.
AvrSpiBus * spi_bus
ISpiBus implementation for the AVR’s built-in SPI bus.
This member is available only if the target AVR has an SPI bus.