mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-28 12:50:53 +00:00
Seal the PeripheralInput
and PeripheralOutput
traits (#2690)
* Seal the `PeripheralInput` and `PeripheralOutput` traits * Update `CHANGELOG.md`
This commit is contained in:
parent
9458fd3ed4
commit
d86a079ea9
@ -58,6 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- I8080, camera, DPI: The various standalone configuration options have been merged into `Config` (#2610)
|
||||
- Dropped GPIO futures stop listening for interrupts (#2625)
|
||||
- UART driver's `StopBits` enum variants now correctly use UpperCamelCase (#2669)
|
||||
- The `PeripheralInput` and `PeripheralOutput` traits are now sealed (#2690)
|
||||
|
||||
### Fixed
|
||||
|
||||
|
@ -28,13 +28,13 @@ use crate::{
|
||||
///
|
||||
/// Peripheral drivers are encouraged to accept types that implement this and
|
||||
/// [`PeripheralOutput`] as arguments instead of pin types.
|
||||
pub trait PeripheralInput: Into<InputConnection> + 'static {}
|
||||
pub trait PeripheralInput: Into<InputConnection> + 'static + crate::private::Sealed {}
|
||||
|
||||
/// A signal that can be connected to a peripheral input and/or output.
|
||||
///
|
||||
/// Peripheral drivers are encouraged to accept types that implement this and
|
||||
/// [`PeripheralInput`] as arguments instead of pin types.
|
||||
pub trait PeripheralOutput: Into<OutputConnection> + 'static {}
|
||||
pub trait PeripheralOutput: Into<OutputConnection> + 'static + crate::private::Sealed {}
|
||||
|
||||
// Pins
|
||||
impl<P: InputPin> PeripheralInput for P {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user