Skip to content

Commit

Permalink
Clean up ad-hoc ignore macro branches
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Nov 22, 2024
1 parent 95241b0 commit 03f9982
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
6 changes: 2 additions & 4 deletions esp-hal/src/soc/esp32/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,6 @@ pub enum OutputSignal {
}

macro_rules! rtcio_analog {
( @ignore $rue:literal ) => {};

(
$pin_num:expr, $rtc_pin:expr, $pin_reg:expr, $prefix:pat, $hold:ident $(, $rue:literal)?
) => {
Expand Down Expand Up @@ -564,7 +562,7 @@ macro_rules! rtcio_analog {

$(
// FIXME: replace with $(ignore($rue)) once stable
rtcio_analog!(@ignore $rue);
$crate::ignore!($rue);
impl $crate::gpio::RtcPinWithResistors for $crate::gpio::GpioPin<$pin_num> {
fn rtcio_pullup(&mut self, enable: bool) {
paste::paste! {
Expand Down Expand Up @@ -610,7 +608,7 @@ macro_rules! rtcio_analog {
// Disable pull-up and pull-down resistors on the pin, if it has them
$(
// FIXME: replace with $(ignore($rue)) once stable
rtcio_analog!( @ignore $rue );
$crate::ignore!($rue);
w.[<$prefix rue>]().bit(false);
w.[<$prefix rde>]().bit(false);
)?
Expand Down
2 changes: 0 additions & 2 deletions esp-hal/src/soc/esp32s2/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,6 @@ pub enum OutputSignal {
}

macro_rules! rtcio_analog {
( @ignore $rue:literal ) => {};

(
$pin_num:expr, $pin_reg:expr, $prefix:pat, $hold:ident
) => {
Expand Down
2 changes: 0 additions & 2 deletions esp-hal/src/soc/esp32s3/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,6 @@ pub enum OutputSignal {
}

macro_rules! rtcio_analog {
( @ignore $rue:literal ) => {};

(
$pin_num:expr, $pin_reg:expr, $prefix:pat, $hold:ident
) => {
Expand Down
4 changes: 1 addition & 3 deletions esp-hal/src/spi/master.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3001,8 +3001,6 @@ impl PartialEq for Info {
unsafe impl Sync for Info {}

macro_rules! spi_instance {
(@ignore $sio2:ident) => {};

($num:literal, $sclk:ident, $mosi:ident, $miso:ident, $cs:ident $(, $sio2:ident, $sio3:ident)?) => {
paste::paste! {
impl Instance for crate::peripherals::[<SPI $num>] {
Expand Down Expand Up @@ -3030,7 +3028,7 @@ macro_rules! spi_instance {

$(
// If the extra pins are set, implement QspiInstance
spi_instance!(@ignore $sio2);
$crate::ignore!($sio2);
impl QspiInstance for crate::peripherals::[<SPI $num>] {}
)?
}
Expand Down

0 comments on commit 03f9982

Please sign in to comment.