Skip to content

Commit

Permalink
Revert "Pull sipeed#39"
Browse files Browse the repository at this point in the history
This reverts commit af816ce.
  • Loading branch information
Simon Willshire committed May 1, 2023
1 parent cd4a7e8 commit 4fb95d9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 232 deletions.
26 changes: 0 additions & 26 deletions src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,6 @@ pub struct Spi;
/// I2C pin mode (type state)
pub struct I2c;

/// ADC analog pin mode (type state)
pub struct Adc;

/// PWM mode (type state)
pub struct Pwm<MODE> {
_mode: PhantomData<MODE>,
}

#[doc(hidden)]
pub trait UartPin<SIG> {}

Expand Down Expand Up @@ -354,24 +346,6 @@ macro_rules! impl_glb {
self.into_pin_with_mode(11, false, true, true)
}

// Do pull-up/pull-down/hi-z actually do anything for PWM?

/// Configures the pin to operate as a pull-down PWM pin.
pub fn into_pull_down_pwm(self) -> $Pini<Pwm<PullDown>> {
// `bl602_pac::glb::gpio_cfgctln::REG_GPIO_n_FUNC_SEL_A::PWM_CHn`
self.into_pin_with_mode(8, false, true, true)
}

/// Configures the pin to operate as a pull-up PWM pin.
pub fn into_pull_up_pwm(self) -> $Pini<Pwm<PullUp>> {
self.into_pin_with_mode(8, false, true, true)
}

/// Configures the pin to operate as a Hi-Z floating PWM pin.
pub fn into_floating_pwm(self) -> $Pini<Pwm<Floating>> {
self.into_pin_with_mode(8, false, false, true)
}

/// Configures the pin to operate as an ADC pin
pub fn into_adc(self) -> $Pini<Adc> {
// 10 -> ADC_FUNC_ANALOG
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ pub mod serial;
pub mod spi;
pub mod timer;
pub mod watchdog;
pub mod pwm;
pub mod adc;

/// HAL crate prelude
Expand Down
205 changes: 0 additions & 205 deletions src/pwm.rs

This file was deleted.

0 comments on commit 4fb95d9

Please sign in to comment.