Skip to content

Commit

Permalink
Fix alternative function implementation in GPIO
Browse files Browse the repository at this point in the history
  • Loading branch information
rblaze committed Nov 6, 2024
1 parent 00d49a7 commit 2e82376
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,23 @@ pub(crate) enum AltFunction {
}

mod marker {
use super::Alternate;

// Marker trait for allowed alternate function values
pub trait AF {}

impl AF for Alternate<0> {}
impl AF for Alternate<1> {}
impl AF for Alternate<2> {}
impl AF for Alternate<3> {}
impl AF for Alternate<4> {}
impl AF for Alternate<5> {}
impl AF for Alternate<6> {}
impl AF for Alternate<7> {}
impl AF for Alternate<8> {}
impl AF for Alternate<9> {}
impl AF for Alternate<10> {}

// Marker trait for modes able to generate interrupts
pub trait Interruptable {}

Expand Down

0 comments on commit 2e82376

Please sign in to comment.