esp-hal/esp-hal-common/src/peripherals/esp32s2.rs
Scott Mabin 3a57eb98fe
Completely remove pac references in hal drivers (#309)
* Peripheral ref/sha (#312)

* Add SHA to list of peripherals to be created

* Refactor SHA peripheral to use PeripheralRef

* Update SHA examples to get them building again

* Fix async time drivers

* Fix usb otg

* Fix s3

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2022-12-14 13:15:45 +00:00

73 lines
969 B
Rust

use esp32s2 as pac;
// We need to export this for users to use
pub use pac::Interrupt;
// We need to export this in the hal for the drivers to use
pub(crate) use self::peripherals::*;
crate::peripherals! {
AES,
APB_SARADC,
DEDICATED_GPIO,
DS,
EFUSE,
EXTMEM,
GPIO,
GPIO_SD,
HMAC,
I2C0,
I2C1,
I2S,
INTERRUPT,
IO_MUX,
LEDC,
PCNT,
PMS,
RMT,
RNG,
RSA,
RTCIO,
RTC_CNTL,
RTC_I2C,
SENS,
SHA,
SPI0,
SPI1,
SPI2,
SPI3,
SPI4,
SYSTEM,
SYSTIMER,
TIMG0,
TIMG1,
TWAI,
UART0,
UART1,
UHCI0,
USB0,
USB_WRAP,
XTS_AES,
}
mod peripherals {
pub use super::pac::*;
crate::create_peripherals! {
I2C0,
I2C1,
RNG,
SHA,
SPI0,
SPI1,
SPI2,
SPI3,
SPI4,
SYSTIMER,
UART0,
UART1,
SYSTEM,
LEDC,
RMT,
}
}