diff --git a/.gitignore b/.gitignore index e2de8562fc0..ea892980fae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.vscode +/.idea /.espressif /.embuild /target diff --git a/src/gpio.rs b/src/gpio.rs index e2e34bcf0e6..df69894add3 100644 --- a/src/gpio.rs +++ b/src/gpio.rs @@ -2080,10 +2080,10 @@ mod chip { #[allow(clippy::type_complexity)] #[cfg(feature = "alloc")] - pub(crate) static mut PIN_ISR_HANDLER: [Option>; 20] = - [PIN_ISR_INIT; 20]; + pub(crate) static mut PIN_ISR_HANDLER: [Option>; 21] = + [PIN_ISR_INIT; 21]; - pub(crate) static PIN_NOTIF: [HalIsrNotification; 20] = [PIN_NOTIF_INIT; 20]; + pub(crate) static PIN_NOTIF: [HalIsrNotification; 21] = [PIN_NOTIF_INIT; 21]; // NOTE: Gpio12 - Gpio17 are used by SPI0/SPI1 for external PSRAM/SPI Flash and // are not recommended for other uses @@ -2184,13 +2184,16 @@ mod chip { #[allow(clippy::type_complexity)] #[cfg(feature = "alloc")] - pub(crate) static mut PIN_ISR_HANDLER: [Option>; 20] = - [PIN_ISR_INIT; 20]; + pub(crate) static mut PIN_ISR_HANDLER: [Option>; 28] = + [PIN_ISR_INIT; 28]; - pub(crate) static PIN_NOTIF: [HalIsrNotification; 20] = [PIN_NOTIF_INIT; 20]; + pub(crate) static PIN_NOTIF: [HalIsrNotification; 28] = [PIN_NOTIF_INIT; 28]; - // NOTE: Gpio12 - Gpio17 are used by SPI0/SPI1 for external PSRAM/SPI Flash and - // are not recommended for other uses + // NOTE: Following pins have special meaning and are not recommended for other uses. But one may use them with care. + // - Gpio12 - Gpio17 are used by SPI0/SPI1 for external PSRAM/SPI Flash + // - Gpio21 seems not to be exposed physically + // - Gpio23 + Gpio24 are used by serial debug interface + // - Gpio26 + Gpio27 are used by USB debug interface pin!(Gpio0:0, IO, NORTC:0, NOADC:0, NODAC:0, NOTOUCH:0); pin!(Gpio1:1, IO, NORTC:0, ADC1:0, NODAC:0, NOTOUCH:0); pin!(Gpio2:2, IO, NORTC:0, ADC1:1, NODAC:0, NOTOUCH:0); @@ -2212,6 +2215,13 @@ mod chip { pin!(Gpio18:18, IO, NORTC:0, NOADC:0, NODAC:0, NOTOUCH:0); pin!(Gpio19:19, IO, NORTC:0, NOADC:0, NODAC:0, NOTOUCH:0); pin!(Gpio20:20, IO, NORTC:0, NOADC:0, NODAC:0, NOTOUCH:0); + pin!(Gpio21:21, IO, NORTC:0, NOADC:0, NODAC:0, NOTOUCH:0); + pin!(Gpio22:22, IO, NORTC:0, NOADC:0, NODAC:0, NOTOUCH:0); + pin!(Gpio23:23, IO, NORTC:0, NOADC:0, NODAC:0, NOTOUCH:0); + pin!(Gpio24:24, IO, NORTC:0, NOADC:0, NODAC:0, NOTOUCH:0); + pin!(Gpio25:25, IO, NORTC:0, NOADC:0, NODAC:0, NOTOUCH:0); + pin!(Gpio26:26, IO, NORTC:0, NOADC:0, NODAC:0, NOTOUCH:0); + pin!(Gpio27:27, IO, NORTC:0, NOADC:0, NODAC:0, NOTOUCH:0); pub struct Pins { pub gpio0: Gpio0, @@ -2235,6 +2245,13 @@ mod chip { pub gpio18: Gpio18, pub gpio19: Gpio19, pub gpio20: Gpio20, + pub gpio21: Gpio21, + pub gpio22: Gpio22, + pub gpio23: Gpio23, + pub gpio24: Gpio24, + pub gpio25: Gpio25, + pub gpio26: Gpio26, + pub gpio27: Gpio27, } impl Pins { @@ -2265,6 +2282,13 @@ mod chip { gpio18: Gpio18::new(), gpio19: Gpio19::new(), gpio20: Gpio20::new(), + gpio21: Gpio21::new(), + gpio22: Gpio22::new(), + gpio23: Gpio23::new(), + gpio24: Gpio24::new(), + gpio25: Gpio25::new(), + gpio26: Gpio26::new(), + gpio27: Gpio27::new(), } } }