338 Commits

Author SHA1 Message Date
Björn Quentin
ba73154c36
Runtime ISR binding for TWAI (#1384)
* Runtime ISR binding for TWAI

* CHANGELOG.md

* Fix EH-0.2 TWAI implementation
2024-04-03 13:46:21 +00:00
Björn Quentin
efcf7d4074
Don't use #[interrupt} in the serial_interrupts.rs example (#1385) 2024-04-03 13:14:35 +00:00
Björn Quentin
256d7198f9
Timers runtime isr binding (#1348)
* Runtime ISR binding for TIMG/SYSTIMER

* CHANGELOG.md

* Implement `set_interrupt_handler` only for blocking

* Adapt HIL test
2024-04-03 08:14:27 +00:00
Jesse Braham
55864b1ba7
UsbSerialJtag: async/blocking constructors, runtime interrupt binding support (#1377)
* Refactor `usb_serial_jtag` driver to take an operational mode as a generic parameter

* Update module documentation

* Update `CHANGELOG.md`
2024-04-02 23:45:14 +00:00
Björn Quentin
4aca01a7b6
I2C runtime ISR binding (#1376)
* I2C runtime ISR binding

* CHANGELOG.md
2024-04-02 18:03:36 +00:00
Jesse Braham
99b0c774ac
Use fewer embedded-hal@0.2.x traits in examples, build HAL without default features in CI (#1372)
* Clean up `embedded-hal-02` related imports

* Clean up some random warnings

* Update various examples to no longer depend on `embedded-hal-02` feature

* Build `esp-hal` without default features enabled in CI
2024-04-01 17:33:23 +00:00
Jesse Braham
dc6f8378e2
Build esp-hal for the ESP32-P4 in CI (#1370)
* Build `esp-hal` for the ESP32-P4 in CI (but do not perform other checks, yet)

* Get CI passing again for ESP32-P4
2024-04-01 13:56:08 +00:00
Scott Mabin
32587d7569
cleans up some timg fixmes, allows for use of timers without eh02 (#1367) 2024-04-01 12:43:18 +00:00
Björn Quentin
6f01b5aba3
Runtime ISR binding crypto accelerators (#1354)
* Runtime ISR binding for ECC,SHA,RSA

* CHANGELOG.md

* CHANGELOG.md

* Fix examples

* Remove obsolete `free` from ECC driver

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-03-29 23:13:19 +00:00
Jesse Braham
7d5372f57d
Decouple the twai driver from the embedded-hal traits (#1355)
* Decouple the TWAI driver from the `embedded-hal` and `embedded-can` packages

* No longer require `embedded-hal`/`embedded-can` for the TWAI example

* Update `CHANGELOG.md`
2024-03-28 14:44:09 +00:00
Björn Quentin
4077734c3c
Runtime DMA interrupt binding (#1300) 2024-03-26 13:56:48 +00:00
Björn Quentin
fd4f5592a4
RMT: allow driver to init as blocking or async (#1341)
* RMT: allow driver to init as blocking or async

* CHANGELOG and minor fixes
2024-03-25 13:54:03 +00:00
Jesse Braham
ace679f13b
Make examples less dependent on embedded-hal where able (#1342)
* Add support for building a package without its default features to `xtask`

* Do not require `embedded_hal_02` traits in examples where they are not required

* Do not require `embedded_hal_02` traits for filling a buffer with random bytes
2024-03-25 13:14:22 +00:00
Jesse Braham
8da8425907
Update READMEs, housekeeping (#1339)
* Remove patches and just use git dependency for PACs instead

* Various `README.md` normalization/updates for simpler packages

* Update `README.md` for `esp-hal` and `esp-lp-hal`

* Update repo-level `README.md`
2024-03-22 17:11:20 +00:00
Sergio Gasquez Arcos
3efdbe9420
docs: Fix i2c pins (#1340) 2024-03-22 15:09:20 +00:00
Scott Mabin
d5e4995777
uart: allow driver to init as blocking or async (#1294)
* uart: allow driver to init as blocking or async

* adds a mode type param to Uart types
* remove #[interrupt] usage
* add constructor for blocking and async modes
* blocking constructor takes optional interrupt
* async chooses the correct handler to bind at runtime
* moves interrupt enable for uart into the driver

* changelog
2024-03-21 21:51:09 +00:00
Scott Mabin
93d31e76d8
Add InterruptHandler wrapper (#1299)
* Add InterruptHandler

* Which takes the handler and a prio.
* Updates the `#[handler]` macro to create this for us.

* changelog
2024-03-21 15:45:35 +00:00
Scott Mabin
25f509ce74
discard interrupt symbols from lto so that lto doesn't end up rebinding them (#1327) 2024-03-21 15:38:07 +00:00
Björn Quentin
4e5020f83f
Enable TWAI for ESP32-C6 (#1323)
* Enable TWAI for ESP32-C6

* CHANGELOG.md

* Make Clippy happy, again

* Make Clippy happy. For real this time

* Remove debug code
2024-03-21 15:16:44 +00:00
Scott Mabin
2cc7a8ccbd
document usb port differences and recommend usb_serial_jtag example (#1321) 2024-03-21 13:41:46 +00:00
Björn Quentin
33c7c32c53
Async-TWAI (#1320)
* Apply changes from https://github.com/esp-rs/esp-hal/pull/951

Co-authored-by: Paul Paterson <ptpaterson@gmail.com>

* Fix ESP32-S3 async-twai

* Fix ESP32-C6, prepare ESP32, ESP32-S2

* Whitelist twai examples on ESP32-S2

* Fix copy+paste introduced bug

---------

Co-authored-by: Paul Paterson <ptpaterson@gmail.com>
2024-03-21 12:37:43 +00:00
Zgarbul Andrey
4a0a19e253
Delay::delay (#1298)
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-03-20 23:45:02 +00:00
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
Jesse Braham
e5b393fe4d
Use task arena instead of embassy-executor's nightly feature (#1314) 2024-03-20 14:36:05 +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
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
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
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
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
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
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
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
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
Timo
0c99d8bb60
Add TimerWakeupSource for the esp32-c6 deepsleep. (#1201) 2024-02-28 16:59:49 +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
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