Skip to content

Commit

Permalink
Add type for gpio::AnyPin
Browse files Browse the repository at this point in the history
This makes it possible to safely implement the InputPin and OutputPin
traits for AnyPin. Now you can convert any pin to AnyPin with the
appropriate type and use it in other library modules

Added:
- Peripheral implementation for AnyPin
- Implementation of Pin for AnyPin
- Implementation of OutputPin for AnyPin with type IsOutputPin
- Implementation of InputPin for AnyPin with type IsInputPin
- Upgrade types for AnyPin (for example InputOutputAnalogPinType ->
InputOutputPinType)
- Implementation of From<Gpio> for AnyPin with the appropriate type

Changed:
- The Gpio::degrage method returns AnyPin with the appropriate type

undefined
  • Loading branch information
Volkalex28 committed Jan 9, 2024
1 parent bb58446 commit 2f963a0
Show file tree
Hide file tree
Showing 9 changed files with 396 additions and 31 deletions.
1 change: 1 addition & 0 deletions esp-hal-common/src/analog/adc/esp32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ macro_rules! impl_adc_interface {
}
}

#[allow(unused_imports)]
pub use implementation::*;

mod implementation {
Expand Down
Loading

0 comments on commit 2f963a0

Please sign in to comment.