Skip to content

Commit

Permalink
rebase, exclude "gdma"
Browse files Browse the repository at this point in the history
  • Loading branch information
playfulFence committed Nov 8, 2024
1 parent 2baeb10 commit cd1edb1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
7 changes: 5 additions & 2 deletions esp-hal/src/soc/esp32p4/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub const NUM_PINS: usize = 55;

pub(crate) const FUNC_IN_SEL_OFFSET: usize = 1;

pub(crate) type InputSignalType = u16;
pub(crate) type OutputSignalType = u16;
pub(crate) const OUTPUT_SIGNAL_MAX: u16 = 256;
// TODO: It seems more input signals are present in ESP-IDF, do we need these?
Expand All @@ -67,7 +68,8 @@ pub(crate) fn gpio_intr_enable(int_enable: bool, _nmi_enable: bool) -> u8 {

/// Peripheral input signals for the GPIO mux
#[allow(non_camel_case_types)]
#[derive(PartialEq, Copy, Clone)]
#[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)]
pub enum InputSignal {
SD_CARD_CCMD_2_PAD = 1,
Expand Down Expand Up @@ -220,7 +222,8 @@ pub enum InputSignal {

/// Peripheral output signals for the GPIO mux
#[allow(non_camel_case_types)]
#[derive(PartialEq, Copy, Clone)]
#[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)]
pub enum OutputSignal {
SD_CARD_CCLK_2_PAD = 0,
Expand Down
8 changes: 8 additions & 0 deletions esp-hal/src/soc/esp32p4/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ macro_rules! chip {
};
}

/// A link to the Technical Reference Manual (TRM) for the chip.
#[macro_export]
macro_rules! trm_link {
() => {
"https://www.espressif.com/en/products/socs/esp32-p4"
}; // FIXME: no public TRM for now
}

pub use chip;

#[allow(unused)]
Expand Down
10 changes: 5 additions & 5 deletions esp-hal/src/soc/esp32p4/peripherals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ crate::peripherals! {
TWAI0 <= TWAI0,
TWAI1 <= TWAI1,
TWAI2 <= TWAI2,
[Uart0] UART0 <= UART0,
[Uart1] UART1 <= UART1,
[Uart2] UART2 <= UART2,
[Uart3] UART3 <= UART3,
[Uart4] UART4 <= UART4,
UART0 <= UART0,
UART1 <= UART1,
UART2 <= UART2,
UART3 <= UART3,
UART4 <= UART4,
UHCI0 <= UHCI0,
USB_DEVICE <= USB_DEVICE,
USB_WRAP <= USB_WRAP,
Expand Down

0 comments on commit cd1edb1

Please sign in to comment.