diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cb82e3ee..1a917a258 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,8 +33,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: check - # The `hello_rgb` example requires the `smartled` feature to be enabled - args: --examples --manifest-path=esp32c3-hal/Cargo.toml --target=riscv32imc-unknown-none-elf --features=smartled + args: --examples --manifest-path=esp32c3-hal/Cargo.toml --target=riscv32imc-unknown-none-elf --features=eh1,smartled,ufmt check-xtensa: name: Check Xtensa Examples @@ -54,8 +53,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: check - # The `hello_rgb` example requires the `smartled` feature to be enabled - args: -Zbuild-std=core --examples --manifest-path=${{ matrix.chip }}-hal/Cargo.toml --target=xtensa-${{ matrix.chip }}-none-elf --features=smartled + args: -Zbuild-std=core --examples --manifest-path=${{ matrix.chip }}-hal/Cargo.toml --target=xtensa-${{ matrix.chip }}-none-elf --features=eh1,smartled,ufmt # -------------------------------------------------------------------------- # Clippy diff --git a/README.md b/README.md index 4bf029376..e4e911ddc 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,11 @@ **H**ardware **A**bstraction **L**ayer crates for the **ESP32**, **ESP32-C3**, **ESP32-S2**, and **ESP32-S3** from Espressif. -This project is still in the early stages of development, and as such there should be no expectation of API stability. Only a small number of peripherals currently have drivers implemented (you can see a full list [here]) and out of those most are still incomplete, albeit functional. These HALs are `no_std`; if you are looking for `std` support please use [esp-idf-hal] instead. +These HALs are `no_std`; if you are looking for `std` support please use [esp-idf-hal] instead. -If you have any questions, comments, or concerns please join us on [Matrix]. For additional information regarding any of the crates in the monorepo, please refer to the crate's README. +This project is still in the early stages of development, and as such there should be no expectation of API stability. A significant number of peripherals currently have drivers implemented (you can see a full list [here]) but have varying levels of functionality. For most basic tasks, this should be usable already. + +If you have any questions, comments, or concerns please [open an issue], [start a new discussion], or join us on [Matrix]. For additional information regarding any of the crates in this repository please refer to the crate's README. | Crate | Target | Technical Reference Manual | | :-----------: | :-----------------------------------------------------------------: | :------------------------: | @@ -21,6 +23,8 @@ _\* via [atomic emulation]_ [here]: https://github.com/esp-rs/esp-hal/issues/19 [esp-idf-hal]: https://github.com/esp-rs/esp-idf-hal +[open an issue]: https://github.com/esp-rs/esp-hal/issues/new +[start a new discussion]: https://github.com/esp-rs/esp-hal/discussions/new [matrix]: https://matrix.to/#/#esp-rs:matrix.org [esp32-hal]: https://github.com/esp-rs/esp-hal/tree/main/esp32-hal [esp32c3-hal]: https://github.com/esp-rs/esp-hal/tree/main/esp32c3-hal @@ -39,9 +43,12 @@ The **M**inimum **S**upported **R**ust **V**ersions are: - `1.60.0` for RISC-V devices (**ESP32-C3**) - `1.60.0` for Xtensa devices (**ESP32**, **ESP32-S2**, **ESP32-S3**) -Note that targeting the Xtensa ISA requires the use of the [esp-rs/rust] compiler fork, whereas RISC-V is officially supported by the official Rust compiler. +Note that targeting the Xtensa ISA currently requires the use of the [esp-rs/rust] compiler fork. The [esp-rs/rust-build] repository has pre-compiled release artifacts for most common platforms, and provides installation scripts to aid you in the process. + +RISC-V is officially supported by the official Rust compiler. [esp-rs/rust]: https://github.com/esp-rs/rust +[esp-rs/rust-build]: https://github.com/esp-rs/rust-build ## License diff --git a/esp-hal-common/Cargo.toml b/esp-hal-common/Cargo.toml index 059bf413d..ab77c7993 100644 --- a/esp-hal-common/Cargo.toml +++ b/esp-hal-common/Cargo.toml @@ -5,36 +5,36 @@ authors = [ "Jesse Braham ", "Björn Quentin ", ] -edition = "2021" -description = "HAL implementations for peripherals common among Espressif devices; should not be used directly" -repository = "https://github.com/esp-rs/esp-hal" -license = "MIT OR Apache-2.0" +edition = "2021" +rust-version = "1.60.0" +description = "HAL implementations for peripherals common among Espressif devices; should not be used directly" +repository = "https://github.com/esp-rs/esp-hal" +license = "MIT OR Apache-2.0" [dependencies] -cfg-if = "1.0" -embedded-hal = { version = "0.2", features = ["unproven"] } -embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.8", optional = true } -fugit = "0.3" -nb = "1.0" -paste = "1.0" -procmacros = { path = "../esp-hal-procmacros", package = "esp-hal-procmacros" } -void = { version = "1.0", default-features = false } +cfg-if = "1.0.0" +critical-section = "1.0.0" +embedded-hal = { version = "0.2.7", features = ["unproven"] } +embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.8", optional = true } +fugit = "0.3.6" +nb = "1.0.0" +paste = "1.0.8" +procmacros = { path = "../esp-hal-procmacros", package = "esp-hal-procmacros" } +void = { version = "1.0.2", default-features = false } # RISC-V -riscv = { version = "0.8", optional = true } -riscv-atomic-emulation-trap = { version = "0.1", optional = true } +riscv = { version = "0.8.0", optional = true } +riscv-atomic-emulation-trap = { version = "0.1.1", optional = true } # Xtensa -xtensa-lx = { version = "0.7", optional = true } -xtensa-lx-rt = { version = "0.13", optional = true } - -# Part of `ufmt` containing only `uWrite` trait -ufmt-write = { version = "0.1", optional = true } +xtensa-lx = { version = "0.7.0", optional = true } +xtensa-lx-rt = { version = "0.13.0", optional = true } # Smart-LED (e.g., WS2812/SK68XX) support smart-leds-trait = { version = "0.2.1", optional = true } -critical-section = "1.0.0" +# Part of `ufmt` containing only `uWrite` trait +ufmt-write = { version = "0.1.0", optional = true } # IMPORTANT: # Each supported device MUST have its PAC included below along with a @@ -53,16 +53,16 @@ esp32s3 = ["esp32s3/rt", "procmacros/xtensa", "multi_core" , "xtensa-lx-rt/esp32 # Core Count (should not be enabled directly, but instead by a PAC's feature) single_core = [] -multi_core = [] - -# To support `ufmt` -ufmt = ["ufmt-write"] - -# To use the external `smart_led` crate -smartled = ["smart-leds-trait"] +multi_core = [] # Implement the `embedded-hal==1.0.0-alpha.x` traits eh1 = ["embedded-hal-1"] +# To use the external `smart_led` crate +smartled = ["smart-leds-trait"] + +# To support `ufmt` +ufmt = ["ufmt-write"] + # To use vectored interrupts (calling the handlers defined in the PAC) vectored = ["procmacros/interrupt"] diff --git a/esp-hal-procmacros/Cargo.toml b/esp-hal-procmacros/Cargo.toml index c13d8e652..bd4f62061 100644 --- a/esp-hal-procmacros/Cargo.toml +++ b/esp-hal-procmacros/Cargo.toml @@ -5,23 +5,24 @@ authors = [ "Jesse Braham ", "Björn Quentin ", ] -edition = "2021" -description = "Procedural macros for ESP-HAL" -repository = "https://github.com/esp-rs/esp-hal" -license = "MIT OR Apache-2.0" +edition = "2021" +rust-version = "1.60.0" +description = "Procedural macros for ESP-HAL" +repository = "https://github.com/esp-rs/esp-hal" +license = "MIT OR Apache-2.0" [lib] proc-macro = true [dependencies] -quote = "1.0" -proc-macro2 = "1.0" -darling = "0.14" -syn = {version = "1.0", features = ["extra-traits", "full"]} +darling = "0.14.1" proc-macro-error = "1.0.4" +proc-macro2 = "1.0.43" +quote = "1.0.21" +syn = {version = "1.0.99", features = ["extra-traits", "full"]} [features] -rtc_slow = [] -xtensa = [] -riscv = [] -interrupt = [] \ No newline at end of file +interrupt = [] +riscv = [] +rtc_slow = [] +xtensa = [] diff --git a/esp32-hal/Cargo.toml b/esp32-hal/Cargo.toml index 182119f4f..964c72167 100644 --- a/esp32-hal/Cargo.toml +++ b/esp32-hal/Cargo.toml @@ -5,10 +5,11 @@ authors = [ "Jesse Braham ", "Björn Quentin ", ] -edition = "2021" -description = "HAL for ESP32 microcontrollers" -repository = "https://github.com/esp-rs/esp-hal" -license = "MIT OR Apache-2.0" +edition = "2021" +rust-version = "1.60.0" +description = "HAL for ESP32 microcontrollers" +repository = "https://github.com/esp-rs/esp-hal" +license = "MIT OR Apache-2.0" keywords = [ "embedded", @@ -24,24 +25,22 @@ categories = [ ] [dependencies] -bare-metal = "1.0" -embedded-hal = { version = "0.2", features = ["unproven"] } +embedded-hal = { version = "0.2.7", features = ["unproven"] } embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.8" } -xtensa-lx = { version = "0.7", features = ["esp32"] } -xtensa-lx-rt = { version = "0.13", features = ["esp32"], optional = true } -nb = "1.0.0" +xtensa-lx = { version = "0.7.0", features = ["esp32"] } +xtensa-lx-rt = { version = "0.13.0", features = ["esp32"], optional = true } [dependencies.esp-hal-common] path = "../esp-hal-common" features = ["esp32"] [dev-dependencies] -embedded-graphics = "0.7" -ssd1306 = "0.7" -smart-leds = "0.3" -esp-println = { version = "0.2.0", features = ["esp32"] } -esp-backtrace = { version = "0.2", features = ["esp32", "panic-handler", "exception-handler", "print-uart"] } -critical-section = "1" +critical-section = "1.1.0" +embedded-graphics = "0.7.1" +esp-backtrace = { version = "0.2.0", features = ["esp32", "panic-handler", "exception-handler", "print-uart"] } +esp-println = { version = "0.2.2", features = ["esp32"] } +smart-leds = "0.3.0" +ssd1306 = "0.7.1" [features] default = ["rt", "vectored"] @@ -50,12 +49,12 @@ eh1 = ["esp-hal-common/eh1"] rt = ["xtensa-lx-rt/esp32"] smartled = ["esp-hal-common/smartled"] ufmt = ["esp-hal-common/ufmt"] -vectored = ["esp-hal-common/vectored"] +vectored = ["esp-hal-common/vectored"] [[example]] name = "hello_rgb" required-features = ["smartled"] [[example]] -name = "spi_eh1_loopback" +name = "spi_eh1_loopback" required-features = ["eh1"] diff --git a/esp32c3-hal/Cargo.toml b/esp32c3-hal/Cargo.toml index b12931744..18300f693 100644 --- a/esp32c3-hal/Cargo.toml +++ b/esp32c3-hal/Cargo.toml @@ -5,10 +5,11 @@ authors = [ "Jesse Braham ", "Björn Quentin ", ] -edition = "2021" -description = "HAL for ESP32-C3 microcontrollers" -repository = "https://github.com/esp-rs/esp-hal" -license = "MIT OR Apache-2.0" +edition = "2021" +rust-version = "1.60.0" +description = "HAL for ESP32-C3 microcontrollers" +repository = "https://github.com/esp-rs/esp-hal" +license = "MIT OR Apache-2.0" keywords = [ "embedded", @@ -24,23 +25,23 @@ categories = [ ] [dependencies] -embedded-hal = { version = "0.2", features = ["unproven"] } +embedded-hal = { version = "0.2.7", features = ["unproven"] } embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.8" } -r0 = "1.0" -riscv = "0.8" -riscv-rt = { version = "0.9", optional = true } +r0 = "1.0.0" +riscv = "0.8.0" +riscv-rt = { version = "0.9.0", optional = true } [dependencies.esp-hal-common] path = "../esp-hal-common" features = ["esp32c3"] [dev-dependencies] -embedded-graphics = "0.7" -ssd1306 = "0.7" -smart-leds = "0.3" -esp-println = { version = "0.2.0", features = ["esp32c3"] } -esp-backtrace = { version = "0.2", features = ["esp32c3", "panic-handler", "exception-handler", "print-uart"] } -critical-section = "1" +critical-section = "1.1.0" +embedded-graphics = "0.7.1" +esp-backtrace = { version = "0.2.0", features = ["esp32c3", "panic-handler", "exception-handler", "print-uart"] } +esp-println = { version = "0.2.2", features = ["esp32c3"] } +smart-leds = "0.3.0" +ssd1306 = "0.7.1" [features] default = ["rt", "vectored"] @@ -49,12 +50,12 @@ eh1 = ["esp-hal-common/eh1"] rt = ["riscv-rt"] smartled = ["esp-hal-common/smartled"] ufmt = ["esp-hal-common/ufmt"] -vectored = ["esp-hal-common/vectored"] +vectored = ["esp-hal-common/vectored"] [[example]] name = "hello_rgb" required-features = ["smartled"] [[example]] -name = "spi_eh1_loopback" +name = "spi_eh1_loopback" required-features = ["eh1"] diff --git a/esp32s2-hal/Cargo.toml b/esp32s2-hal/Cargo.toml index 93ab0d891..035e2cd77 100644 --- a/esp32s2-hal/Cargo.toml +++ b/esp32s2-hal/Cargo.toml @@ -5,10 +5,11 @@ authors = [ "Jesse Braham ", "Björn Quentin ", ] -edition = "2021" -description = "HAL for ESP32-S2 microcontrollers" -repository = "https://github.com/esp-rs/esp-hal" -license = "MIT OR Apache-2.0" +edition = "2021" +rust-version = "1.60.0" +description = "HAL for ESP32-S2 microcontrollers" +repository = "https://github.com/esp-rs/esp-hal" +license = "MIT OR Apache-2.0" keywords = [ "embedded", @@ -24,23 +25,22 @@ categories = [ ] [dependencies] -embedded-hal = { version = "0.2", features = ["unproven"] } +embedded-hal = { version = "0.2.7", features = ["unproven"] } embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.8" } -xtensa-lx = { version = "0.7", features = ["esp32s2"] } -xtensa-lx-rt = { version = "0.13", features = ["esp32s2"], optional = true } +xtensa-lx = { version = "0.7.0", features = ["esp32s2"] } +xtensa-lx-rt = { version = "0.13.0", features = ["esp32s2"], optional = true } [dependencies.esp-hal-common] path = "../esp-hal-common" features = ["esp32s2"] [dev-dependencies] -embedded-graphics = "0.7" -panic-halt = "0.2" -ssd1306 = "0.7" -smart-leds = "0.3" -esp-println = { version = "0.2.0", features = ["esp32s2"] } -esp-backtrace = { version = "0.2", features = ["esp32s2", "panic-handler", "exception-handler", "print-uart"] } -critical-section = "1" +critical-section = "1.1.0" +embedded-graphics = "0.7.1" +esp-backtrace = { version = "0.2.0", features = ["esp32s2", "panic-handler", "exception-handler", "print-uart"] } +esp-println = { version = "0.2.2", features = ["esp32s2"] } +smart-leds = "0.3.0" +ssd1306 = "0.7.1" [features] default = ["rt", "vectored"] @@ -48,12 +48,12 @@ eh1 = ["esp-hal-common/eh1"] rt = ["xtensa-lx-rt/esp32s2"] smartled = ["esp-hal-common/smartled"] ufmt = ["esp-hal-common/ufmt"] -vectored = ["esp-hal-common/vectored"] +vectored = ["esp-hal-common/vectored"] [[example]] name = "hello_rgb" required-features = ["smartled"] [[example]] -name = "spi_eh1_loopback" +name = "spi_eh1_loopback" required-features = ["eh1"] diff --git a/esp32s3-hal/Cargo.toml b/esp32s3-hal/Cargo.toml index c7c68a727..cf111375c 100644 --- a/esp32s3-hal/Cargo.toml +++ b/esp32s3-hal/Cargo.toml @@ -5,10 +5,11 @@ authors = [ "Jesse Braham ", "Björn Quentin ", ] -edition = "2021" -description = "HAL for ESP32-S3 microcontrollers" -repository = "https://github.com/esp-rs/esp-hal" -license = "MIT OR Apache-2.0" +edition = "2021" +rust-version = "1.60.0" +description = "HAL for ESP32-S3 microcontrollers" +repository = "https://github.com/esp-rs/esp-hal" +license = "MIT OR Apache-2.0" keywords = [ "embedded", @@ -24,25 +25,24 @@ categories = [ ] [dependencies] -bare-metal = "1.0" -embedded-hal = { version = "0.2", features = ["unproven"] } +bare-metal = "1.0.0" +embedded-hal = { version = "0.2.7", features = ["unproven"] } embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.8" } -xtensa-lx = { version = "0.7", features = ["esp32s3"] } -xtensa-lx-rt = { version = "0.13", features = ["esp32s3"], optional = true } -r0 = { version = "1.0", optional = true } +r0 = { version = "1.0.0", optional = true } +xtensa-lx = { version = "0.7.0", features = ["esp32s3"] } +xtensa-lx-rt = { version = "0.13.0", features = ["esp32s3"], optional = true } [dependencies.esp-hal-common] path = "../esp-hal-common" features = ["esp32s3"] [dev-dependencies] -embedded-graphics = "0.7" -panic-halt = "0.2" -ssd1306 = "0.7" -smart-leds = "0.3" -esp-println = { version = "0.2.0", features = ["esp32s3"] } -esp-backtrace = { version = "0.2", features = ["esp32s3", "panic-handler", "exception-handler", "print-uart"] } -critical-section = "1" +critical-section = "1.1.0" +embedded-graphics = "0.7.1" +esp-backtrace = { version = "0.2.0", features = ["esp32s3", "panic-handler", "exception-handler", "print-uart"] } +esp-println = { version = "0.2.2", features = ["esp32s3"] } +smart-leds = "0.3.0" +ssd1306 = "0.7.1" [features] default = ["rt", "vectored"] @@ -51,12 +51,12 @@ eh1 = ["esp-hal-common/eh1"] rt = ["xtensa-lx-rt/esp32s3"] smartled = ["esp-hal-common/smartled"] ufmt = ["esp-hal-common/ufmt"] -vectored = ["esp-hal-common/vectored"] +vectored = ["esp-hal-common/vectored"] [[example]] name = "hello_rgb" required-features = ["smartled"] [[example]] -name = "spi_eh1_loopback" +name = "spi_eh1_loopback" required-features = ["eh1"]