Skip to content

Commit

Permalink
arduino-hal: Reexport ADC types and module
Browse files Browse the repository at this point in the history
Reexport the `adc` module from the HAL crate to make the ADC easily
usable.
  • Loading branch information
Rahix committed Mar 13, 2021
1 parent e638e68 commit 631f2d4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arduino-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ pub mod i2c {
#[cfg(feature = "board-selected")]
pub use i2c::I2c;

#[cfg(feature = "board-selected")]
pub mod adc {
pub use crate::hal::adc::{
channel, AdcChannel, AdcOps, AdcSettings, ClockDivider, ReferenceVoltage,
};

/// Check the [`avr_hal_generic::adc::Adc`] documentation.
pub type Adc = crate::hal::Adc<crate::DefaultClock>;
}
#[cfg(feature = "board-selected")]
pub use adc::Adc;

#[cfg(feature = "board-selected")]
pub mod usart {
pub use crate::hal::usart::{Baudrate, UsartOps};
Expand Down

0 comments on commit 631f2d4

Please sign in to comment.