Commit Graph

1011 Commits

Author SHA1 Message Date
Scott Mabin
e98cf71b67
Fix up docs and features; default to enabling eh1 instead of eh02 (#1313)
* Fix up docs and features; default to enabling eh1 instead of eh02

* Changelog

* Fix twai example

* Fixup from defaulting to eh1
2024-03-20 17:12:33 +00:00
Scott Mabin
a61ffef909
RISCV: remove the direct-vectoring & interrupt-preemption features and enable them by default (#1310)
* Remove the `direct-vectoring` feature

* Enables the feature by default
* renames the old direct_vectoring enable function `enable_direct`

* Make enable_direct safe, move it out of vectored module

* enable interrupt preemption by default for riscv

* remove pub from cpu intr handlers

* add enable_direct for Xtensa too

* Fix flip-link feature

* Fix up interrupt docs

* changelog

* fix clippy suggestions

* Disable P4 workflow
2024-03-20 16:19:22 +00:00
Björn Quentin
1f155cf301
ESP32: Apply Errata 3.6 fix in more places (#1315)
* ESP32: Apply Errata 3.6 fix in more places

* CHANGELOG.md entry
2024-03-20 15:46:38 +00:00
Jesse Braham
e5b393fe4d
Use task arena instead of embassy-executor's nightly feature (#1314) 2024-03-20 14:36:05 +00:00
Kirill Mikhailov
6d9048a873
Update PR Template (#1281)
* Update `PR Template`

* Minor improvements
2024-03-19 14:54:10 +00:00
sisoteuz
1846543873
Add ETM support for general purpose timers (#1287)
* Implement ETM for general purpose timers

* Revert changes to timer_interrupt example

* Add an example for ETM for general purpose timers

* Add newly introduced generic const param for Timer0

* Use id function on TimerGroupInstance instead of const parameter

* Revert const parameter on Timer1

* Specify supported chips

* Update CHANGELOG.md

* Update CHANGELOG.md

* Fix example

* Assign configured ETM channel to a variable to prevent drop

* Fix comments

* Move declaration of delay after critical section

* Use delay_millis instead of delay_ms

* Remove mut from delay

* Add documentation
2024-03-15 14:03:21 +00:00
Jesse Braham
3a9c248f11 Fix package metadata for esp-hal 2024-03-15 00:18:46 +00:00
Jesse Braham
b402692c72
Create safe wrappers for some ROM functions in the rom module (#1290)
* Create safe wrappers for some ROM functions in the `rom` module

* Replace transmute in ESP32-S3's `cpu_control` module with ROM function

* Inline *all* the things!

* Remove duplicate of `rom::regi2c_write` with ROM function
2024-03-14 16:45:06 +00:00
Jesse Braham
3079d9cc49
Feature gate embedded-hal@0.2.x implementations, rename eh1 feature to embedded-hal (#1273)
* Create an `embedded-hal-02` feature and gate implementations, rename `eh1` to `embedded-hal`

* Use native `Delay` APIs in examples where applicable

* Fix example imports, be explicit about about `embedded-hal-02` feature requirements

* Update `CHANGELOG.md`
2024-03-14 15:40:44 +00:00
Jesse Braham
1983a74cb1
Correct doc comment regarding effective measurement range of ADC for given attentuations (#1291)
#1229
2024-03-14 15:16:11 +00:00
Scott Mabin
de19bb0446
Fix core1 startup (#1286)
* Fix core1 startup

The original code tried to set the stack pointer and call the closure
_in the same stack frame_. This isn't possible, so the actual stack
being used was the 8K stack setup by ROM code. If this stack overflowed,
it could corrupt the ROM function .bss and .data which is why I was
seeing intermittent panic messages. I still don't understand all the
failure cases, but I know that now we are using the correct stack
properly.

* Improve multicore example

* Change log

* apply fix to esp32
2024-03-14 13:39:28 +00:00
Scott Mabin
7947cecd93
Reserve esp32 ROM stacks and adjust dram2 accordingly (#1289)
* reserve esp32 rom stacks and adjust dram2 accordingly

* changelog
2024-03-14 13:38:48 +00:00
Jesse Braham
7983923b16
Simplify building documentation, automatically generate documentation index (#1279) 2024-03-13 17:02:13 +00:00
Björn Quentin
1d3fa8e93b
Don't use #[interrupt] in GPIO driver (#1278) 2024-03-13 16:55:33 +00:00
Jesse Braham
6046528e0b
Remove package-level type exports (#1275)
* Remove package-level type exports

* Update imports in examples

* Update `CHANGELOG.md`
2024-03-13 15:50:00 +00:00
Björn Quentin
2b4c408333
Runtime interrupt binding (#1231)
* Interrupt runtime binding

* Add `set_interrupt_handler` for GPIO

* Fix

* Fix typo

* Make sure to produce a warning for an unused `#[handler]`

* Simplify GPIO interrupt handling

* Appease Clippy

* Make sure to patch the PACS in esp-hal

* Use latest PAC commit

* CHANGELOG.md entry
2024-03-13 15:45:34 +00:00
Jesse Braham
1f129744fd
Create the esp-metadata package, update esp-hal build script to use it (#1256) 2024-03-13 12:27:24 +00:00
Björn Quentin
c283563542
Simplify dma usage (#1238)
* Simplify SPI,I2S,AES

* Simplify PARL_IO and I8080

* Adapt docs

* Don't require `&mut` for tx-buffer

* Annotate DMA transfer structs as `#[must_use]`

* CHANGELOG.md entry
2024-03-13 10:14:56 +00:00
Kirill Mikhailov
cc9ccb3f83
Fix dead code section from IDF (#1272)
+changelog entry
2024-03-13 08:10:35 +00:00
Jesse Braham
465a87659e Begin next release cycle 2024-03-12 15:27:13 +00:00
Jesse Braham
92e3ea576b
New esp-hal release (#1268)
* New `esp-hal` release

* Update documentation index to point to new version
2024-03-12 15:22:59 +00:00
Jesse Braham
a0f3b39acc
Do not ensure randomness or implement CryptoRng for ESP32-P4/S2 (#1267)
* Do not ensure randomness or implement `CryptoRng` for ESP32-P4/S2

* Update `CHANGELOG.md`

* Make `clippy` happy
2024-03-12 15:06:49 +00:00
Jesse Braham
d3a5dcce86
Display a warning banner linking to docs.esp-rs.org when documentation is hosted on docs.rs (#1266)
* Display a warning banner linking to docs.esp-rs.org when hosted on docs.rs

* Fix a few warnings reported while building docs
2024-03-12 14:52:32 +00:00
Scott Mabin
301462a2de
use ROM memcpy over compiler builtins ROM (#1255) 2024-03-11 17:24:47 +00:00
Jesse Braham
e4ea62a53c
Un-pin the defmt package's version, bump esp-println and esp-backtrace dependency versions (#1264)
* Un-pin the `defmt` package's version for `esp-hal` and `esp-hal-smartled`

* Bump `esp-println` and `esp-backtrace` versions in the `examples` package

* Mention lack of MSRV guarantees when using `defmt` feature
2024-03-11 16:35:39 +00:00
Jesse Braham
513a063547
Create an xtask subcommand to generate eFuse fields (#1258)
* Use the `xtask` to generate eFuse fields from CSV, instead of at build time

* Rewrite the CSV parser so that it can handle the newer eFuse definitions

* Regenerate eFuse field definitions from latest ESP-IDF commit

* Include generation date and ESP-IDF commit hash in file headers
2024-03-11 14:22:31 +00:00
Jesse Braham
85ee380708 Begin next release cycle 2024-03-08 14:15:30 +00:00
Jesse Braham
e198f0eee4
New package releases (#1249)
* New package releases

* Fix the `CHANGELOG.md` check in CI

* `defmt` is annoying

* Update documentation index to point to new version, correct release date

* Remove docs.rs badge from and update docs link in `README.md`

* Silence `clippy`

* Fix documentation link in `esp-hal/README.md`
2024-03-08 14:01:07 +00:00
Jesse Braham
4bcd5cf611
Tweak the documentation URL slightly (#1250)
* Tweak the documentation URL slightly

* Ignore locally generated docs
2024-03-07 17:19:07 +00:00
Jesse Braham
518e995b2c
Add a workflow to build and deploy esp-hal documentation to GitHub Pages (#1248)
* update workflow

* Format `index.html`, update the URLs, add favicon, various other minor tweaks

* Move script into `.github/scripts`, add the package version to documentation path

* Split the building and deployment of documentation into its own workflow

---------

Co-authored-by: Kirill Mikhailov <konnor1980@yandex.ru>
2024-03-07 13:58:25 +00:00
Scott Mabin
e65951c882
Add new embassy features for esp32s2 and other systimers. Enable embassy tick rate features by default (#1247) 2024-03-06 17:04:05 +00:00
Jesse Braham
8841d82ead
Allow specifying an output directory when building documentation (#1241) 2024-03-05 16:10:46 +00:00
Juraj Sadel
0e0035c886
Update esp-hal/README (#1228)
* Remove referecnes to chip-specific HALs, briefly describe esp-hal tree and add quickstart

* Review comments

* Update esp-hal/README.md

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>

* Update esp-hal/README.md

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>

* Update esp-hal/README.md

Co-authored-by: Scott Mabin <scott@mabez.dev>

* review comments 2

* link examples/README

* Mostly rewrite `esp-hal/README.md` (oops :) ) (#4)

* Mostly rewrite `esp-hal/README.md` (oops :) )

* Fix a typo

---------

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-03-04 10:12:35 -08:00
Jesse Braham
e1c82065a5
Initial version of README.md for the examples package (#1237)
* Initial version of `README.md` for the `examples` package

* Minor grammatical nitpicks
2024-03-04 14:31:13 +00:00
Jesse Braham
3b6a3cf3a4
Fix some clippy/build warnings, clean up root Cargo manifest (#1230)
* Remove old package names from workspace exclude list

* Fix warning in `esp-hal-procmacros`

* Resolve clippy warnings
2024-03-01 05:56:02 -08:00
Jesse Braham
bfb530d3a3 Use newest published PACs 2024-02-28 19:01:37 +00:00
Kaspar Schleiser
3ec0f3b8ba
embassy: introduce InterruptExecutor::spawner() (#1211)
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-02-28 17:15:52 +00:00
Björn Quentin
e81957ee98
Make xtask work on Windows, add run-example command (#1215)
* Make xtask work on Windows, add `run-example` command

* Fix xtask for non-Windows users

* Use `find_map`
2024-02-28 17:04:29 +00:00
Timo
0c99d8bb60
Add TimerWakeupSource for the esp32-c6 deepsleep. (#1201) 2024-02-28 16:59:49 +00:00
Juraj Sadel
5b5770965e
Update README to match with unification changes (#1217)
* Remove referecnes to chip-specific HALs and briefly describe crates in ESP-HAL package

* review comments

* review comments 2
2024-02-28 16:44:35 +00:00
Jesse Braham
043baa7c4b
Remove repo-level VS Code settings, ignore settings files moving forward (#1223) 2024-02-28 16:21:01 +00:00
Björn Quentin
12176dbfff
Uart init (#1213)
* UART init for all chips

* Avoid UART reset for the console UART

* Fix comments

* CHANGELOG.md entry

* Introduce a `uart_peripheral_reset` function
2024-02-28 14:48:51 +01:00
Kirill Mikhailov
0240e2b597
Ensuring that the random number generator is TRNG. (#1200)
* Refactor `RNG` driver, ensure randomness for C6 and H2

* WIP: 3 more chips

* Finish

* Redesign

fmt

clippy

* Adjusting for review

+ changelog
2024-02-28 13:46:32 +00:00
Björn Quentin
76135cf8f9
Fix I2C read for ESP32-S2 (#1214)
* Fix I2C read for ESP32-S2

* CHANGELOG.md entry
2024-02-28 14:19:47 +01:00
Jesse Braham
6a663f8b1a
Unify: Remove the chip-specific HAL packages, adapt esp-hal for direct use [1/?] (#1196)
* Remove the chip-specific HAL packages

* Update some doc comments which were missed, fix build script for ESP32/S2

* Refactor/update `esp-hal-procmacros`

* Create the `examples` package, add back all of the previously existing examples

* Use `xtask` automation package for checking examples and documentation in CI

* Combine the `rt-riscv` and `rt-xtensa` features into a single `rt` feature

* Bump MSRV to 1.76.0 (shocking!)

* Re-document the features for the HAL

* No need to re-export the `riscv` package like this

* Make clippy happy, improve CI clippy checks

* Update `CHANGELOG.md`

* riscv: zero bss

Co-authored-by: Björn Quentin <bjoernQ@users.noreply.github.com>

* Address a number of review comments

* Correct pin number in `hello_rgb` example for ESP32-C3

* Address the remaining review comments

* More small tweaks/improvements

* Fix RMT examples (#11)

* Fix RMT examples

* Remove logger-init

* Make I2S examples work on ESP32 (#12)

* Make I2S examples work on ESP32

* Remove logger init

* Fix the direct-vectoring examples on all RISCV chips (#10)

* Update GPIOs for some examples...

* Embassy timer example fixes (#13)

* Switch to generic queue instead of integrated for all examples

* changelog

* Update GPIO in another example, make `rustfmt` happy

* Fix ESP32-S2 PSRAM

* Avoid UART0 and SPI flash pins (#15)

* Avoid UART0 and SPI flash pins

* Fix spi_eh1_device_loopback for non-ESP32

* Update examples/src/bin/gpio_interrupt.rs

Co-authored-by: Juraj Sadel <jurajsadel@gmail.com>

---------

Co-authored-by: Juraj Sadel <jurajsadel@gmail.com>

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
Co-authored-by: Björn Quentin <bjoernQ@users.noreply.github.com>
Co-authored-by: bjoernQ <bjoern.quentin@mobile-j.de>
Co-authored-by: Juraj Sadel <jurajsadel@gmail.com>
2024-02-27 14:10:11 +00:00
Fan Jiang
9a95c0aa88
Add option to configure the device driver IRAM placement (RFC) (#1096)
* SPI RAM patch

* SPI in IRAM

* Add DMA functions to IRAM

* Try fixing the interrupt latency issue

* Revert changes

* Rename the option name to `optimize-spi-in-iram`

* Fix clippy warning

* Fix typo
2024-02-21 16:04:54 +00:00
Felix Richter
4bc1aaaefa
fix esp32c3 uart initialization (#1156)
* fix esp32c3 uart initialization

Implement uart initialization according to the [esp32c3 technical
reference manual section 26.5.2.1](https://www.espressif.com/sites/default/files/documentation/esp32-c3_technical_reference_manual_en.pdf#subsubsection.26.5.2)

* add fix to changelog
2024-02-21 14:44:37 +00:00
Juraj Sadel
9378639e4c
C6: LP_I2C basic driver (#1185)
* After more analysis and coding

* More work is done, writing/reading WIP

* `write` prototype done, small fixes. Read next

* pre-rebase

* Rebased and updated

* Pre-final state of driver

* More work (near-final state) done

* WIP

* WIP

* working

* cleanup

* changelog

* address review comments

* remove Option from conjure and improve lp-i2c example description

---------

Co-authored-by: Kirill Mikhailov <konnor1980@yandex.ru>
2024-02-21 14:18:54 +00:00
Björn Quentin
bc2f1a02cc
Fix circular DMA (again) and small I2S improvements (#1189)
* Fix calculation of available buffer

* Lift requirement of circular DMA min buffer

* Have a separate set of convenience macros for circular DMA buffers

* Prefer `addr_of_mut!`

* Add `push_with` for I2S TX

* CHANGELOG.md
2024-02-21 12:20:19 +00:00
Scott Mabin
c18b5b4e78
Allow building on stable for riscv with the async feature (#1187) 2024-02-20 09:16:56 +00:00