diff --git a/tm4c-hal/src/i2c.rs b/tm4c-hal/src/i2c.rs index adf1605..71cd33b 100644 --- a/tm4c-hal/src/i2c.rs +++ b/tm4c-hal/src/i2c.rs @@ -25,17 +25,19 @@ pub enum Error { #[macro_export] /// Implements the traits for an I2C peripheral macro_rules! i2c_pins { - ($UARTn:ident, + ($I2Cn:ident, scl: [$(($($sclgpio: ident)::*, $sclaf: ident)),*], sda: [$(($($sdagpio: ident)::*, $sdaaf: ident)),*], ) => { $( - unsafe impl SclPin<$UARTn> for $($sclgpio)::*>> + unsafe impl SclPin<$I2Cn> for $($sclgpio)::*> + where + T: OutputMode, {} )* $( - unsafe impl SdaPin<$UARTn> for $($sdagpio)::*> + unsafe impl SdaPin<$I2Cn> for $($sdagpio)::*> where T: OutputMode, {} diff --git a/tm4c123x-hal/src/lib.rs b/tm4c123x-hal/src/lib.rs index 8260200..3772060 100644 --- a/tm4c123x-hal/src/lib.rs +++ b/tm4c123x-hal/src/lib.rs @@ -26,6 +26,10 @@ pub use tm4c123x::{self, CorePeripherals, Peripherals}; pub use tm4c_hal::{bb, delay, time}; +// Enable use of interrupt macro +#[cfg(feature = "rt")] +pub use crate::tm4c123x::interrupt; + use embedded_hal as hal; pub mod gpio; diff --git a/tm4c129x-hal/src/lib.rs b/tm4c129x-hal/src/lib.rs index f887b6a..618752c 100644 --- a/tm4c129x-hal/src/lib.rs +++ b/tm4c129x-hal/src/lib.rs @@ -28,6 +28,10 @@ pub use tm4c129x::{self, CorePeripherals, Peripherals}; pub use tm4c_hal::{bb, delay, time}; +// Enable use of interrupt macro +#[cfg(feature = "rt")] +pub use crate::tm4c129x::interrupt; + pub mod gpio; pub mod i2c; pub mod prelude;