1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! 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`](struct.Mcu.html), 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();
//! ```
//!
//! # 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](https://github.com/avr-rust/avr-mcu/tree/master/packs).
//!
//! A build script takes these packfiles and persists them as data structures in Rust.
//!
//! # Examples
//!
//! ```nodoc
//! for mcu in avr_mcu::microcontrollers() {
//!     println!("Device: {}", mcu.device.name);
//! }
//! ```

#![feature(conservative_impl_trait)]

extern crate xmltree;
#[macro_use]
extern crate lazy_static;

pub use self::model::*;
pub use self::load::{microcontroller, microcontroller_names, microcontrollers};

mod model;
mod pack;
mod load;
mod extra_info;

pub mod current;