diff --git a/esp-hal/src/soc/esp32p4/gpio.rs b/esp-hal/src/soc/esp32p4/gpio.rs index ffc2cb4a86..1601a69080 100644 --- a/esp-hal/src/soc/esp32p4/gpio.rs +++ b/esp-hal/src/soc/esp32p4/gpio.rs @@ -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? @@ -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, @@ -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, diff --git a/esp-hal/src/soc/esp32p4/mod.rs b/esp-hal/src/soc/esp32p4/mod.rs index 556a7bb4f1..cdb1eeb426 100644 --- a/esp-hal/src/soc/esp32p4/mod.rs +++ b/esp-hal/src/soc/esp32p4/mod.rs @@ -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)] diff --git a/esp-hal/src/soc/esp32p4/peripherals.rs b/esp-hal/src/soc/esp32p4/peripherals.rs index 35e8c072d6..744230cbe5 100644 --- a/esp-hal/src/soc/esp32p4/peripherals.rs +++ b/esp-hal/src/soc/esp32p4/peripherals.rs @@ -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,