Skip to content

Commit

Permalink
address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
playfulFence committed Aug 19, 2024
1 parent 3932964 commit 647cfdd
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion esp-hal/src/ecc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub enum WorkMode {
/// Modular multiplication mode.
ModMulti = 10,
#[cfg(esp32h2)]
/// Modular multiplication mode.
/// Modular division mode.
ModDiv = 11,
}

Expand Down
4 changes: 2 additions & 2 deletions esp-hal/src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,7 @@ pub trait Instance: crate::private::Sealed {
}

#[cfg(not(any(esp32, esp32s2)))]
/// Reads all bytes from the RX FIFO
/// Reads all bytes from the RX FIFO.
fn read_all_from_fifo(&self, buffer: &mut [u8]) -> Result<(), Error> {
// Read bytes from FIFO
// FIXME: Handle case where less data has been provided by the slave than
Expand All @@ -1567,7 +1567,7 @@ pub trait Instance: crate::private::Sealed {
}

#[cfg(any(esp32, esp32s2))]
/// Reads all bytes from the RX FIFO
/// Reads all bytes from the RX FIFO.
fn read_all_from_fifo(&self, buffer: &mut [u8]) -> Result<(), Error> {
// on ESP32/ESP32-S2 we currently don't support I2C transactions larger than the
// FIFO apparently it would be possible by using non-fifo mode
Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/lcd_cam/lcd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::{peripheral::PeripheralRef, peripherals::LCD_CAM};

pub mod i8080;

/// Represents an LCD interface peripheral.
/// Represents an LCD interface.
pub struct Lcd<'d, DM: crate::Mode> {
/// The `LCD_CAM` peripheral reference for managing the LCD functionality.
pub(crate) lcd_cam: PeripheralRef<'d, LCD_CAM>,
Expand Down
4 changes: 1 addition & 3 deletions esp-hal/src/lcd_cam/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
//! used simultaneously. For more information on these modules, please refer to
//! the documentation in their respective modules.
// #![allow(missing_docs)] // TODO: Remove when able

pub mod cam;
pub mod lcd;

Expand All @@ -21,7 +19,7 @@ use crate::{
InterruptConfigurable,
};

/// Represents a combined LCD and Camera interface peripheral.
/// Represents a combined LCD and Camera interface.
pub struct LcdCam<'d, DM: crate::Mode> {
/// The LCD interface.
pub lcd: Lcd<'d, DM>,
Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/otg_fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ unsafe impl<'d> UsbPeripheral for Usb<'d> {
80_000_000
}
}
/// Asynch functionality
/// Async functionality
#[cfg(feature = "async")]
pub mod asynch {
use embassy_usb_driver::{
Expand Down
4 changes: 2 additions & 2 deletions esp-hal/src/peripheral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ mod peripheral_macros {
$(#[$cfg])?
#[derive(Debug)]
#[allow(non_camel_case_types)]
/// Macro to create a peripheral structure with a virtual interface.
/// Macro to create a peripheral structure.
pub struct $name { _inner: () }

$(#[$cfg])?
Expand Down Expand Up @@ -389,7 +389,7 @@ mod peripheral_macros {
$(#[$cfg])?
#[derive(Debug)]
#[allow(non_camel_case_types)]
/// Macro to create a peripheral structure with a virtual interface.
/// Macro to create a peripheral structure.
pub struct $name { _inner: () }

$(#[$cfg])?
Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/rtc_cntl/rtc/esp32c3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ fn rtc_sleep_pu() {
// System Reset: Reset the whole digital system, including RTC sub-system
// Chip Reset: Reset the whole chip, including the analog part

/// SOC Reset Reason
/// SOC Reset Reason.
#[derive(Debug, Clone, Copy, PartialEq, Eq, FromRepr)]
pub enum SocResetReason {
/// Power on reset
Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/rtc_cntl/rtc/esp32c6.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ fn modem_clk_domain_active_state_icg_map_preinit() {
// System Reset: Reset the whole digital system, including RTC sub-system
// Chip Reset: Reset the whole chip, including the analog part

/// SOC Reset Reason
/// SOC Reset Reason.
#[derive(Debug, Clone, Copy, PartialEq, Eq, FromRepr)]
pub enum SocResetReason {
/// Power on reset
Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/rtc_cntl/rtc/esp32h2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub(crate) fn configure_clock() {
// System Reset: Reset the whole digital system, including RTC sub-system
// Chip Reset: Reset the whole chip, including the analog part

/// SOC Reset Reason
/// SOC Reset Reason.
#[derive(Debug, Clone, Copy, PartialEq, Eq, FromRepr)]
pub enum SocResetReason {
/// Power on reset
Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/rtc_cntl/rtc/esp32s2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub(crate) fn configure_clock() {
// System Reset: Reset the whole digital system, including RTC sub-system
// Chip Reset: Reset the whole chip, including the analog part

/// SOC Reset Reason
/// SOC Reset Reason.
#[derive(Debug, Clone, Copy, PartialEq, Eq, FromRepr)]
pub enum SocResetReason {
/// Power on reset
Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/rtc_cntl/rtc/esp32s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub(crate) fn configure_clock() {
// System Reset: Reset the whole digital system, including RTC sub-system
// Chip Reset: Reset the whole chip, including the analog part

/// SOC reset reason
/// SOC Reset Reason.
#[derive(Debug, Clone, Copy, PartialEq, Eq, FromRepr)]
pub enum SocResetReason {
/// Power on reset
Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/rtc_cntl/sleep/esp32c3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ bitfield::bitfield! {
pub clkctl_init, set_clkctl_init: 24;
/// Perform power control related initialization.
pub pwrctl_init, set_pwrctl_init: 25;
/// Force power down RTC_DBOOST
/// Force power down `RTC_DBOOST`.
pub rtc_dboost_fpd, set_rtc_dboost_fpd: 26;
/// Keep the XTAL oscillator powered up in sleep.
pub xtal_fpu, set_xtal_fpu: 27;
Expand Down
4 changes: 2 additions & 2 deletions esp-hal/src/soc/esp32/cpu_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ impl<'a> Drop for AppCoreGuard<'a> {
}
}

/// Represents error that can occur in the system.
/// Represents errors that can occur while working with the core.
#[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Error {
/// Core is already running.
/// The core is already running.
CoreAlreadyRunning,
}

Expand Down
4 changes: 2 additions & 2 deletions esp-hal/src/soc/esp32s3/cpu_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ impl<'a> Drop for AppCoreGuard<'a> {
}
}

/// Represents error that can occur in the system.
/// Represents errors that can occur while working with the core.
#[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Error {
/// Core is already running.
/// The core is already running.
CoreAlreadyRunning,
}

Expand Down

0 comments on commit 647cfdd

Please sign in to comment.