mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-10-02 06:40:47 +00:00
Miscellaneous fixes/improvements (#627)
* Un-comment remaining device peripheral definitions for ESP32-H2 * Re-work `RadioExt` implementations, add support for ESP32-H2 * README updates for ESP32-C6/H2 * Update CHANGELOG
This commit is contained in:
parent
16f78b1fb2
commit
c5f0060d34
@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Change LED pin to GPIO2 in ESP32 blinky example (#581)
|
||||
- Update ESP32-H2 and ESP32-C6 clocks and remove `i2c_clock` for all chips but ESP32 (#592)
|
||||
- Use both timers in `TIMG0` for embassy time driver when able (#609)
|
||||
- Re-work `RadioExt` implementations, add support for ESP32-H2 (#627)
|
||||
|
||||
### Fixed
|
||||
|
||||
|
@ -8,13 +8,13 @@ peripherals = [
|
||||
"apb_saradc",
|
||||
"assist_debug",
|
||||
"dma",
|
||||
# "ds",
|
||||
# "ecc",
|
||||
"ds",
|
||||
"ecc",
|
||||
"efuse",
|
||||
"gpio",
|
||||
# "hmac",
|
||||
# "hp_apm",
|
||||
# "hp_sys",
|
||||
"hmac",
|
||||
"hp_apm",
|
||||
"hp_sys",
|
||||
"i2c0",
|
||||
"i2c1",
|
||||
"i2s0",
|
||||
@ -22,20 +22,20 @@ peripherals = [
|
||||
"intpri",
|
||||
"io_mux",
|
||||
"ledc",
|
||||
# "lp_ana",
|
||||
# "lp_aon",
|
||||
# "lp_apm",
|
||||
"lp_ana",
|
||||
"lp_aon",
|
||||
"lp_apm",
|
||||
"lp_clkrst",
|
||||
# "lp_peri",
|
||||
# "lp_timer",
|
||||
"lp_peri",
|
||||
"lp_timer",
|
||||
"lp_wdt",
|
||||
"mcpwm0",
|
||||
"mem_monitor",
|
||||
"modem_lpcon",
|
||||
"modem_syscon",
|
||||
# "otp_debug",
|
||||
# "parl_io",
|
||||
# "pau",
|
||||
"otp_debug",
|
||||
"parl_io",
|
||||
"pau",
|
||||
"pcnt",
|
||||
"pcr",
|
||||
"pmu",
|
||||
@ -43,19 +43,19 @@ peripherals = [
|
||||
"rng",
|
||||
"rsa",
|
||||
"sha",
|
||||
# "soc_etm",
|
||||
"soc_etm",
|
||||
"spi0",
|
||||
"spi1",
|
||||
"spi2",
|
||||
"systimer",
|
||||
# "tee",
|
||||
"tee",
|
||||
"timg0",
|
||||
"timg1",
|
||||
# "trace",
|
||||
"trace",
|
||||
# "twai0",
|
||||
"uart0",
|
||||
"uart1",
|
||||
# "uhci0",
|
||||
"uhci0",
|
||||
"usb_device",
|
||||
|
||||
# Additional peripherals defined by us (the developers):
|
||||
|
@ -70,17 +70,7 @@ impl crate::peripheral::Peripheral for LowRate {
|
||||
impl crate::peripheral::sealed::Sealed for LowRate {}
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(any(esp32, esp32c2, esp32c3, esp32s3))] {
|
||||
impl RadioExt for crate::peripherals::RADIO {
|
||||
type Components = (Wifi, Bluetooth);
|
||||
|
||||
fn split(self) -> Self::Components {
|
||||
unsafe {
|
||||
(Wifi::steal(), Bluetooth::steal())
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if #[cfg(esp32c6)] {
|
||||
if #[cfg(all(bt, ieee802154, wifi))] {
|
||||
impl RadioExt for crate::peripherals::RADIO {
|
||||
type Components = (Wifi, Bluetooth, LowRate);
|
||||
|
||||
@ -90,7 +80,27 @@ cfg_if::cfg_if! {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if #[cfg(esp32s2)] {
|
||||
} else if #[cfg(all(bt, ieee802154))] {
|
||||
impl RadioExt for crate::peripherals::RADIO {
|
||||
type Components = (Bluetooth, LowRate);
|
||||
|
||||
fn split(self) -> Self::Components {
|
||||
unsafe {
|
||||
(Bluetooth::steal(), LowRate::steal())
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if #[cfg(all(bt, wifi))] {
|
||||
impl RadioExt for crate::peripherals::RADIO {
|
||||
type Components = (Wifi, Bluetooth);
|
||||
|
||||
fn split(self) -> Self::Components {
|
||||
unsafe {
|
||||
(Wifi::steal(), Bluetooth::steal())
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if #[cfg(wifi)] {
|
||||
impl RadioExt for crate::peripherals::RADIO {
|
||||
type Components = Wifi;
|
||||
|
||||
|
@ -12,13 +12,13 @@ crate::peripherals! {
|
||||
APB_SARADC => true,
|
||||
ASSIST_DEBUG => true,
|
||||
DMA => true,
|
||||
// DS => true,
|
||||
// ECC => true,
|
||||
DS => true,
|
||||
ECC => true,
|
||||
EFUSE => true,
|
||||
GPIO => true,
|
||||
// HMAC => true,
|
||||
// HP_APM => true,
|
||||
// HP_SYS => true,
|
||||
HMAC => true,
|
||||
HP_APM => true,
|
||||
HP_SYS => true,
|
||||
I2C0 => true,
|
||||
I2C1 => true,
|
||||
I2S0 => true,
|
||||
@ -26,20 +26,20 @@ crate::peripherals! {
|
||||
INTPRI => true,
|
||||
IO_MUX => true,
|
||||
LEDC => true,
|
||||
// LP_ANA => true,
|
||||
// LP_AON => true,
|
||||
// LP_APM => true,
|
||||
LP_ANA => true,
|
||||
LP_AON => true,
|
||||
LP_APM => true,
|
||||
LP_CLKRST => true,
|
||||
// LP_PERI => true,
|
||||
// LP_TIMER => true,
|
||||
LP_PERI => true,
|
||||
LP_TIMER => true,
|
||||
LP_WDT => true,
|
||||
MCPWM0 => true,
|
||||
MEM_MONITOR => true,
|
||||
MODEM_LPCON => true,
|
||||
MODEM_SYSCON => true,
|
||||
// OTP_DEBUG => true,
|
||||
// PARL_IO => true,
|
||||
// PAU => true,
|
||||
OTP_DEBUG => true,
|
||||
PARL_IO => true,
|
||||
PAU => true,
|
||||
PCNT => true,
|
||||
PCR => true,
|
||||
PMU => true,
|
||||
@ -47,19 +47,19 @@ crate::peripherals! {
|
||||
RNG => true,
|
||||
RSA => true,
|
||||
SHA => true,
|
||||
// SOC_ETM => true,
|
||||
SOC_ETM => true,
|
||||
SPI0 => true,
|
||||
SPI1 => true,
|
||||
SPI2 => true,
|
||||
SYSTIMER => true,
|
||||
// TEE => true,
|
||||
TEE => true,
|
||||
TIMG0 => true,
|
||||
TIMG1 => true,
|
||||
// TRACE => true,
|
||||
// TWAI0 => true,
|
||||
TRACE => true,
|
||||
TWAI0 => true,
|
||||
UART0 => true,
|
||||
UART1 => true,
|
||||
// UHCI0 => true,
|
||||
UHCI0 => true,
|
||||
USB_DEVICE => true,
|
||||
RADIO => false,
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ By default, [espflash](https://github.com/esp-rs/espflash) fetches the required
|
||||
|
||||
#### Direct Boot
|
||||
|
||||
[Direct Boot](https://github.com/espressif/esp32c6-direct-boot-example#direct-boot-in-esp32-c6) allows an application stored in the External Flash to be executed directly, without being copied into Internal RAM.
|
||||
[Direct Boot](https://github.com/espressif/esp32c3-direct-boot-example#direct-boot-in-esp32-c3) allows an application stored in the External Flash to be executed directly, without being copied into Internal RAM.
|
||||
|
||||
##### Booting the Hello World example using Direct Boot
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
# esp32h2-hal
|
||||
|
||||
<!-- [](https://crates.io/crates/esp32h2-hal)
|
||||
[](https://crates.io/crates/esp32h2-hal)
|
||||
[](https://docs.rs/esp32h2-hal)
|
||||
 -->
|
||||

|
||||
[](https://matrix.to/#/#esp-rs:matrix.org)
|
||||
|
||||
`no_std` HAL for the ESP32-H2 from Espressif. Implements a number of the traits defined by [embedded-hal](https://github.com/rust-embedded/embedded-hal).
|
||||
|
||||
This device uses the RISC-V ISA, which is officially supported by the Rust compiler via the `riscv32imac-unknown-none-elf` target. Refer to the [Getting Started](#getting-started) section below for more information.
|
||||
|
||||
<!-- ## [Documentation]
|
||||
## [Documentation]
|
||||
|
||||
[documentation]: https://docs.rs/esp32h2-hal/ -->
|
||||
[documentation]: https://docs.rs/esp32h2-hal/
|
||||
|
||||
## Getting Started
|
||||
|
||||
@ -33,7 +33,7 @@ By default, [espflash](https://github.com/esp-rs/espflash) fetches the required
|
||||
|
||||
#### Direct Boot
|
||||
|
||||
Direct Boot allows an application stored in the External Flash to be executed directly, without being copied into Internal RAM.
|
||||
[Direct Boot](https://github.com/espressif/esp32c3-direct-boot-example#direct-boot-in-esp32-c3) allows an application stored in the External Flash to be executed directly, without being copied into Internal RAM.
|
||||
|
||||
##### Booting the Hello World example using Direct Boot
|
||||
|
||||
@ -73,4 +73,4 @@ at your option.
|
||||
|
||||
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in
|
||||
the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without
|
||||
any additional terms or conditions.
|
||||
any additional terms or conditions.
|
||||
|
Loading…
x
Reference in New Issue
Block a user