Skip to content

Commit

Permalink
doc: fixing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthkumarjha committed Oct 26, 2024
1 parent 37a8116 commit 12e45d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
18 changes: 5 additions & 13 deletions arch/riscv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,10 @@

pub mod csr;

#[cfg(all(target_arch = "riscv32", not(doc)))]
pub const XLEN: usize = 32;
#[cfg(all(target_arch = "riscv64", not(doc)))]
pub const XLEN: usize = 64;

// Default to 32 bit if no architecture is specified of if this is being
// compiled for docs or testing on a different architecture.
#[cfg(any(
doc,
not(all(
any(target_arch = "riscv32", target_arch = "riscv64"),
target_os = "none"
))
))]
pub const XLEN: usize = 32;
pub const XLEN: usize = if cfg!(target_arch = "riscv64") {
64
} else {
32
};
4 changes: 3 additions & 1 deletion capsules/extra/src/servo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//! Usage
//! -----
//!
//! ```ignore
//! use kernel::static_init;
//! let mux_pwm = components::pwm::PwmMuxComponent::new(&peripherals.pwm)
//! .finalize(components::pwm_mux_component_static!(rp2040::pwm::Pwm));
Expand All @@ -19,7 +20,7 @@
//! capsules_extra::sg90::Sg90<
//! 'static,
//! capsules_core::virtualizers::virtual_pwm::PwmPinUser<'static, rp2040::pwm::Pwm>,
//! \>,
//! >,
//! capsules_extra::sg90::Sg90::new(virtual_pwm_servo)
//! );
//!
Expand All @@ -32,6 +33,7 @@
//! capsules_extra::servo::Servo<'static, 2>,
//! capsules_extra::servo::Servo::new(multi_servo)
//! );
//! ```
use kernel::hil;
use kernel::syscall::{CommandReturn, SyscallDriver};
Expand Down

0 comments on commit 12e45d4

Please sign in to comment.