14 releases

Uses old Rust 2015

0.3.5 Jan 27, 2021
0.3.4 Aug 5, 2020
0.3.3 Jul 24, 2020
0.3.0 May 2, 2020
0.1.0 Aug 29, 2017

#1610 in Embedded development

Download history 45/week @ 2024-07-21 47/week @ 2024-07-28 55/week @ 2024-08-04 56/week @ 2024-08-11 39/week @ 2024-08-18 46/week @ 2024-08-25 37/week @ 2024-09-01 40/week @ 2024-09-08 38/week @ 2024-09-15 81/week @ 2024-09-22 64/week @ 2024-09-29 28/week @ 2024-10-06 45/week @ 2024-10-13 34/week @ 2024-10-20 31/week @ 2024-10-27 54/week @ 2024-11-03

167 downloads per month
Used in 4 crates

MIT license

3.5MB
764 lines

avr-mcu

Crates.io Build Status license

Pragmatic access to AVR chip information.

Documentation

Purpose

This library has been written to be used by other AVR libraries to generate code (such as IO-related compile time constants).

This crate can be compiled an run on all architectures, including x86 and AVR.


lib.rs:

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);
}

Dependencies