Skip to content

Commit

Permalink
get rid of get_ prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
playfulFence committed Nov 14, 2024
1 parent 6a401a4 commit c4f583e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions esp-hal/src/interrupt/riscv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ mod clic {
/// Get pointer to interrupt control register for the given core and CPU
/// interrupt number
fn intr_cntrl(core: Cpu, cpu_interrupt_number: usize) -> *mut u32 {
let offset = if core == crate::get_core() {
let offset = if core == crate::core() {
0
} else {
DUALCORE_CLIC_CTRL_OFF
Expand All @@ -850,7 +850,7 @@ mod clic {
/// Make sure there is an interrupt handler registered.
pub unsafe fn enable_cpu_interrupt(which: CpuInterrupt) {
let cpu_interrupt_number = which as usize;
let intr_cntrl = intr_cntrl(crate::get_core(), cpu_interrupt_number);
let intr_cntrl = intr_cntrl(crate::core(), cpu_interrupt_number);

unsafe {
let mut val = InterruptControl(intr_cntrl.read_volatile());
Expand Down Expand Up @@ -910,7 +910,7 @@ mod clic {

/// Get interrupt priority
#[inline]
pub(super) fn get_priority_by_core(core: Cpu, cpu_interrupt: CpuInterrupt) -> Priority {
pub(super) fn priority_by_core(core: Cpu, cpu_interrupt: CpuInterrupt) -> Priority {
let cpu_interrupt_number = cpu_interrupt as usize;

unsafe {
Expand All @@ -923,7 +923,7 @@ mod clic {

/// Get interrupt priority - called by assembly code
#[inline]
pub(super) unsafe extern "C" fn get_priority(cpu_interrupt: CpuInterrupt) -> Priority {
pub(super) unsafe extern "C" fn priority(cpu_interrupt: CpuInterrupt) -> Priority {
let clic = &*crate::peripherals::CLIC::PTR;
let prio = clic
.int_ctrl(cpu_interrupt as usize)
Expand Down
4 changes: 2 additions & 2 deletions esp-hal/src/soc/esp32p4/efuse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ impl Efuse {
}

/// Get status of SPI boot encryption.
pub fn get_flash_encryption() -> bool {
pub fn flash_encryption() -> bool {
todo!()
}

/// Get the multiplier for the timeout value of the RWDT STAGE 0 register.
pub fn get_rwdt_multiplier() -> u8 {
pub fn rwdt_multiplier() -> u8 {
todo!()
}
}
Expand Down
4 changes: 2 additions & 2 deletions esp-hal/src/soc/esp32p4/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//!
//! Let's get through the functionality and configurations provided by this GPIO
//! module:
//! - `get_io_mux_reg(gpio_num: u8) -> &'static
//! - `io_mux_reg(gpio_num: u8) -> &'static
//! crate::peripherals::io_mux::GPIO0:`:
//! * Returns the IO_MUX register for the specified GPIO pin number.
//! - `gpio_intr_enable(int_enable: bool, nmi_enable: bool) -> u8`:
Expand Down Expand Up @@ -57,7 +57,7 @@ pub(crate) const ZERO_INPUT: u8 = 0x3e;

pub(crate) const GPIO_FUNCTION: AlternateFunction = AlternateFunction::Function1;

pub(crate) const fn get_io_mux_reg(gpio_num: u8) -> &'static crate::peripherals::io_mux::GPIO {
pub(crate) const fn io_mux_reg(gpio_num: u8) -> &'static crate::peripherals::io_mux::GPIO {
unsafe { (*crate::peripherals::IO_MUX::PTR).gpio(gpio_num as usize) }
}

Expand Down

0 comments on commit c4f583e

Please sign in to comment.