[−][src]Crate avr_mcu
Information about every AVR microcontroller.
Device representation
The API consists of a set of types that represent information about each
microcontroller. The top-level type is Mcu
, modelling
a single microcontroller.
Retrieving microcontroller information
It is possible to look up information for a specific MCU, or all of them at once.
Getting information for the current target
In a lot of cases, we only care about the target microcontroller.
let mcu = avr_mcu::current::mcu().unwrap();
println!("Device: {}", mcu.device.name);
Behind-the-hood
This crate embeds a set of "packfiles" released by Atmel. These are XML specifications containing all of the information exposed by this crate.
You can see a list of all packfiles here.
A build script takes these packfiles and persists them as data structures in Rust.
Examples
for mcu in avr_mcu::microcontrollers() {
println!("Device: {}", mcu.device.name);
}
Modules
current | Utilities for querying information about the microcontroller being targeted. |
Structs
AddressSpace | An address space. |
Bitfield | A bitfield within a register. |
Device | Information fore a specific device. |
Instance | An instance of a peripheral. |
Interrupt | An interrupt supported by a device. |
Mcu | A microcontroller with one or more variants. |
MemorySegment | A segment of memory in a particular address space. |
Module | A module built into the silicon. |
Peripheral | An on-board peripheral, such as an IO port. |
Port | A port, such as |
Register | An CPU or IO register. |
RegisterGroup | A group of registers. |
Signal | A signal that is exposed on the outside of the package. |
Value | A values for a register/mask. |
ValueGroup | A group of values. |
Variant | A variation of a specific microcontroller. |
Enums
Architecture | An AVR architecture (mcu family) name. |
ReadWrite | Specifies the mutability of a register. |
Functions
microcontroller | Retrieves information for a specific microcontroller. |
microcontroller_names | Retrieves a list of all microcontroller names. |
microcontrollers | Retrieves a list of |