rp-hal-boards/rp2040-hal/src/lib.rs

63 lines
1.5 KiB
Rust
Raw Normal View History

//! HAL for the RP2040 microcontroller
//!
//! This is an implementation of the [`embedded-hal`] traits for the RP2040 microcontroller
//! NOTE This HAL is still under active development. This API will remain volatile until 1.0.0
2021-07-19 18:58:26 +02:00
#![warn(missing_docs)]
#![no_std]
extern crate cortex_m;
extern crate embedded_hal as hal;
extern crate nb;
pub use paste;
2021-04-24 13:38:17 +02:00
pub extern crate rp2040_pac as pac;
#[macro_use]
mod intrinsics;
pub mod adc;
pub(crate) mod atomic_register_access;
2021-05-01 23:18:37 +02:00
pub mod clocks;
mod critical_section_impl;
pub mod dma;
mod float;
2021-04-17 18:18:10 -05:00
pub mod gpio;
pub mod i2c;
pub mod multicore;
pub mod pio;
2021-04-25 10:12:38 +02:00
pub mod pll;
pub mod prelude;
pub mod pwm;
pub mod resets;
2021-02-01 22:57:32 -06:00
pub mod rom_data;
pub mod rosc;
pub mod rtc;
2021-05-10 08:29:59 -05:00
pub mod sio;
pub mod spi;
pub mod ssi;
pub mod timer;
pub mod typelevel;
pub mod uart;
pub mod usb;
pub mod watchdog;
2021-04-24 13:38:17 +02:00
pub mod xosc;
2021-12-04 00:04:45 +11:00
// Provide access to common datastructures to avoid repeating ourselves
pub use adc::Adc;
pub use clocks::Clock;
pub use i2c::I2C;
/// Attribute to declare the entry point of the program
///
/// This is based on and can be used like the [entry attribute from
/// cortex-m-rt](https://docs.rs/cortex-m-rt/latest/cortex_m_rt/attr.entry.html).
///
/// It extends that macro with code to unlock all spinlocks at the beginning
/// of `main`. As spinlocks are not automatically unlocked on software resets,
/// this can prevent unexpected deadlocks when running from a debugger.
pub use rp2040_hal_macros::entry;
2021-12-04 00:04:45 +11:00
pub use sio::Sio;
pub use spi::Spi;
pub use timer::Timer;
2021-12-04 15:38:25 +11:00
pub use watchdog::Watchdog;