esp-hal
esp-hal copied to clipboard
`LowPowerInput` panics on pins greater than 14
Bug description
This code panics
let _xtal_32k = LowPowerInput::<15>::new(peripherals.GPIO15);
====================== PANIC ======================
panicked at /home/dominaezzz/.cargo/git/checkouts/esp-pacs-175859a47098a821/2964cc4/esp32s3/src/rtc_io.rs:102:10:
index out of bounds: the len is 15 but the index is 15
Looks like the PAC needs some love around here.
(I doubt I need to open a separate issue for the const generic 😄)
Expected behavior
It shouldn't panic.
Environment
- Target device: ESP32-S3
- Crate name and version:
mainas of writing.
We should probably delegate these to the macro-generated RtcPin trait implementation... But I also think we should just build up low-power gpios from 0.