pic32_hal/
lib.rs

1//! A hardware abstraction layer for some PIC32 microcontrollers.
2//!
3//! This crate provides a thin low-level API on top of the register access API
4//! implemented by the PAC crate. The MCU can be selected by means of specific
5//! features.
6//!
7//! | Feature | Devices |
8//! |:--------------:|:-------:|
9//! | pic32mx1xxfxxxb | 28-pin PIC32MX1xx |
10//! | pic32mx2xxfxxxb | 28-pin PIC32MX2xx |
11//! | pic32mx2x4fxxxb | 28-pin PIC32MX2xx XLP |
12//!
13//! This documentation has been generated with `--features pic32mx2xxfxxxb`.
14
15#![no_std]
16
17#[cfg(not(feature = "device-selected"))]
18compile_error!("This crate requires one device feature to be enabled");
19
20#[cfg(feature = "pic32mx1xxfxxxb")]
21use pic32mx2xx as pac_crate;
22#[cfg(feature = "pic32mx1xxfxxxb")]
23pub use pic32mx2xx::pic32mx1xxfxxxb as pac;
24
25#[cfg(feature = "pic32mx2xxfxxxb")]
26use pic32mx2xx as pac_crate;
27#[cfg(feature = "pic32mx2xxfxxxb")]
28pub use pic32mx2xx::pic32mx2xxfxxxb as pac;
29
30#[cfg(feature = "pic32mx2x4fxxxb")]
31use pic32mx2xx as pac_crate;
32#[cfg(feature = "pic32mx2x4fxxxb")]
33pub use pic32mx2xx::pic32mx2x4fxxxb as pac;
34
35#[cfg(feature = "pic32mx37x")]
36use pic32mx470 as pac_crate;
37#[cfg(feature = "pic32mx37x")]
38pub use pic32mx470::pic32mx37xfxxxl as pac;
39
40#[cfg(feature = "pic32mx47x")]
41use pic32mx470 as pac_crate;
42#[cfg(feature = "pic32mx47x")]
43pub use pic32mx470::pic32mx47xfxxxl as pac;
44
45pub mod adc;
46pub mod clock;
47pub mod coretimer;
48pub mod dma;
49pub mod gpio;
50pub mod i2c;
51pub mod int;
52pub mod oc;
53pub mod pps;
54pub mod spi;
55pub mod time;
56pub mod timer;
57pub mod uart;
58
59#[cfg(any(
60    feature = "pic32mx2xxfxxxb",
61    feature = "pic32mx2x4fxxxb",
62    feature = "pic32mx47x",
63))]
64#[cfg(feature = "usb-device")]
65pub mod usb;