Skip to content

Commit

Permalink
Update cfg's
Browse files Browse the repository at this point in the history
  • Loading branch information
usbalbin committed Jul 14, 2022
1 parent e4ed558 commit 1e2a947
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub mod i2c;
#[cfg(not(feature = "riscv-ulp-hal"))]
pub mod interrupt;
pub mod ledc;
#[cfg(any(esp32, esp32s3))]
#[cfg(all(any(esp32, esp32s3), not(feature = "riscv-ulp-hal")))]
pub mod mcpwm;
#[cfg(not(feature = "riscv-ulp-hal"))]
pub mod mutex;
Expand Down
2 changes: 2 additions & 0 deletions src/mcpwm.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(all(any(esp32, esp32s3), not(feature = "riscv-ulp-hal")))]

//! Motor Control Pulse Width Modulator peripheral
//!
//! Interface to the [Motor Control Pulse Width Modulator peripheral (MCPWM)
Expand Down
6 changes: 3 additions & 3 deletions src/peripherals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::hall;
use crate::i2c;
#[cfg(not(feature = "riscv-ulp-hal"))]
use crate::ledc;
#[cfg(any(esp32, esp32s3))]
#[cfg(all(any(esp32, esp32s3), not(feature = "riscv-ulp-hal")))]
use crate::mcpwm;
#[cfg(not(feature = "riscv-ulp-hal"))]
use crate::rmt;
Expand Down Expand Up @@ -55,9 +55,9 @@ pub struct Peripherals {
pub can: can::CAN,
#[cfg(not(feature = "riscv-ulp-hal"))]
pub ledc: ledc::Peripheral,
#[cfg(any(esp32, esp32s3))]
#[cfg(all(any(esp32, esp32s3), not(feature = "riscv-ulp-hal")))]
pub mcpwm0: mcpwm::Peripheral<mcpwm::UnitZero>,
#[cfg(any(esp32, esp32s3))]
#[cfg(all(any(esp32, esp32s3), not(feature = "riscv-ulp-hal")))]
pub mcpwm1: mcpwm::Peripheral<mcpwm::UnitOne>,
#[cfg(not(feature = "riscv-ulp-hal"))]
pub rmt: rmt::Peripheral,
Expand Down

0 comments on commit 1e2a947

Please sign in to comment.