Skip to content

Commit

Permalink
Address gpio module todos (#1462)
Browse files Browse the repository at this point in the history
* Add `set_state` for GpioPin

* `#![warn(missing_docs)]` for GPIO module

* CHANGELOG.md
  • Loading branch information
bjoernQ authored Apr 17, 2024
1 parent 6f91367 commit c4d1eb4
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 4 deletions.
1 change: 1 addition & 0 deletions esp-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Warn users when attempting to build using the `dev` profile (#1420)
- Async uart now reports interrupt errors(overflow, glitch, frame error, parity) back to user of read/write. uart clock decimal part configured for c2,c3,s3 (#1168, #1445)
- Add mechanism to configure UART source clock (#1416)
- `GpioPin` got a function `set_state(bool)` (#1462)

### Fixed

Expand Down
2 changes: 2 additions & 0 deletions esp-hal/src/gpio/etm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use crate::peripheral::{Peripheral, PeripheralRef};

/// All the GPIO ETM channels
#[non_exhaustive]
#[allow(missing_docs)]
pub struct GpioEtmChannels<'d> {
_gpio_sd: PeripheralRef<'d, crate::peripherals::GPIO_SD>,
pub channel0_task: GpioEtmTaskChannel<0>,
Expand All @@ -52,6 +53,7 @@ pub struct GpioEtmChannels<'d> {
}

impl<'d> GpioEtmChannels<'d> {
/// Create a new instance
pub fn new(peripheral: impl Peripheral<P = crate::peripherals::GPIO_SD> + 'd) -> Self {
crate::into_ref!(peripheral);

Expand Down
1 change: 1 addition & 0 deletions esp-hal/src/gpio/lp_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ fn get_pin_reg(pin: u8) -> &'static crate::peripherals::lp_io::GPIO0 {

/// Configures a pin for use as a low power pin
pub trait IntoLowPowerPin<const PIN: u8> {
/// Converts the pin into a low power pin
fn into_low_power(self) -> LowPowerPin<Unknown, { PIN }>;
}

Expand Down
Loading

0 comments on commit c4d1eb4

Please sign in to comment.