Skip to content

Commit 542407a

Browse files
committed
made separate struct variables for config gated traits
1 parent 4bd39a2 commit 542407a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/sleep.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ where
660660
#[cfg(not(any(esp32, esp32s2, esp32s3)))]
661661
pub _p: PhantomData<R>,
662662
#[cfg(not(any(esp32c2, esp32c3)))]
663-
pub _p: PhantomData<P>,
663+
pub _q: PhantomData<P>,
664664
}
665665

666666
pub fn make_deep_sleep_no_pins(
@@ -678,7 +678,10 @@ pub fn make_deep_sleep_no_pins(
678678
touch,
679679
#[cfg(any(esp32, esp32s2, esp32s3))]
680680
ulp,
681+
#[cfg(not(any(esp32, esp32s2, esp32s3)))]
681682
_p: PhantomData,
683+
#[cfg(not(any(esp32c2, esp32c3)))]
684+
_q: PhantomData,
682685
}
683686
}
684687

@@ -694,7 +697,10 @@ pub fn make_deep_sleep_rtc_pins<R: RtcWakeupPins>(
694697
rtc,
695698
touch,
696699
ulp,
700+
#[cfg(not(any(esp32, esp32s2, esp32s3)))]
697701
_p: PhantomData,
702+
#[cfg(not(any(esp32c2, esp32c3)))]
703+
_q: PhantomData,
698704
}
699705
}
700706

@@ -706,7 +712,10 @@ pub fn make_deep_sleep_gpio_pins<P: GpioWakeupPins>(
706712
DeepSleep {
707713
timer,
708714
gpio,
715+
#[cfg(not(any(esp32, esp32s2, esp32s3)))]
709716
_p: PhantomData,
717+
#[cfg(not(any(esp32c2, esp32c3)))]
718+
_q: PhantomData,
710719
}
711720
}
712721

0 commit comments

Comments
 (0)