Skip to content

Commit 1e2a947

Browse files
committed
Update cfg's
1 parent e4ed558 commit 1e2a947

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub mod i2c;
3838
#[cfg(not(feature = "riscv-ulp-hal"))]
3939
pub mod interrupt;
4040
pub mod ledc;
41-
#[cfg(any(esp32, esp32s3))]
41+
#[cfg(all(any(esp32, esp32s3), not(feature = "riscv-ulp-hal")))]
4242
pub mod mcpwm;
4343
#[cfg(not(feature = "riscv-ulp-hal"))]
4444
pub mod mutex;

src/mcpwm.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(all(any(esp32, esp32s3), not(feature = "riscv-ulp-hal")))]
2+
13
//! Motor Control Pulse Width Modulator peripheral
24
//!
35
//! Interface to the [Motor Control Pulse Width Modulator peripheral (MCPWM)

src/peripherals.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::hall;
1414
use crate::i2c;
1515
#[cfg(not(feature = "riscv-ulp-hal"))]
1616
use crate::ledc;
17-
#[cfg(any(esp32, esp32s3))]
17+
#[cfg(all(any(esp32, esp32s3), not(feature = "riscv-ulp-hal")))]
1818
use crate::mcpwm;
1919
#[cfg(not(feature = "riscv-ulp-hal"))]
2020
use crate::rmt;
@@ -55,9 +55,9 @@ pub struct Peripherals {
5555
pub can: can::CAN,
5656
#[cfg(not(feature = "riscv-ulp-hal"))]
5757
pub ledc: ledc::Peripheral,
58-
#[cfg(any(esp32, esp32s3))]
58+
#[cfg(all(any(esp32, esp32s3), not(feature = "riscv-ulp-hal")))]
5959
pub mcpwm0: mcpwm::Peripheral<mcpwm::UnitZero>,
60-
#[cfg(any(esp32, esp32s3))]
60+
#[cfg(all(any(esp32, esp32s3), not(feature = "riscv-ulp-hal")))]
6161
pub mcpwm1: mcpwm::Peripheral<mcpwm::UnitOne>,
6262
#[cfg(not(feature = "riscv-ulp-hal"))]
6363
pub rmt: rmt::Peripheral,

0 commit comments

Comments
 (0)