984 Commits

Author SHA1 Message Date
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`
v0.16.0
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
Björn Quentin
5b3cf02153
Improve I2C NACK detection (#1184)
* Improve I2C NACK detection

* CHANGELOG.md entry
2024-02-19 16:13:39 +00:00
Björn Quentin
6712aa55f7
Wait for update before reading timer count (#1183)
* Wait for update before reading timer count

* CHANGELOG.md entry

* Wait for update before reading timer count (ESP32)

* Use latest PACs

* CHANGELOG.md fix
2024-02-19 14:51:58 +00:00
Scott Mabin
09fef6acc4
Fix get raw core and document the finer details (#1175)
* Fix and document the get_core functions

* Fix UNUSED_THREAD_ID_VALUE to allow proper operation on the esp32p4

* fix multicore cfgs

* changelog

* fixup cfgs and update comments
2024-02-19 12:00:14 +00:00
Björn Quentin
e3147b0322
Address latest Clippy lints (#1182) 2024-02-19 10:07:36 +00:00
Felix Richter
b0bb0ab1ce
wait for timer value to be latched for esp32(c3/c6) (#1178)
* wait for timer value to be latched for esp32(c3/c6)

* update changelog to include timer fix
2024-02-19 08:16:49 +00:00
Björn Quentin
172d2b8777
estimate_xtal_frequency for C6/H2 (#1174)
* `estimate_xtal_frequency` for C6/H2

* CHANGELOG.md entry
2024-02-16 12:53:24 +00:00
Jesse Braham
0483b47e77
Add build-package and bump-version subcommands to xtask package (#1172)
* Implement builder pattern for cargo command-line args, refactoring

* Add an `xtask` subcommand to build a package (not its examples)

* Add an `xtask` subcommand to bump the versions of packages
2024-02-16 11:21:31 +00:00
Björn Quentin
2a5996f408
Fix ESP32 hello_rgb example (#1173)
* Fix ESP32 hello_rgb example

* CHANGELOG.md
2024-02-16 11:18:16 +00:00
Björn Quentin
6e68da0f4d
ESP32-S3: Use 32K ICACHE (#1169)
* ESP32-S3: Use 32K ICACHE

* CHANGELOG.md entry
2024-02-14 15:35:23 +00:00
Sergio Gasquez Arcos
32824422a1
Autodetect xtal-freq (#1165)
* feat: Autodetect xtal-freq

* docs: Update changelog

* style: Clippy lints

* feat: Remove XtalClock::RtcXtalFreq24M variant

* feat: Adjust visibility of estimate_xtal_frequency

* feat: Remove xtal freq features
2024-02-14 11:09:35 +00:00
Jesse Braham
2b8db5c2c2
Add an xtask subcommand for building documentation (#1160)
* Fix a silly mistake from the initial implementation

* Improve the `build-examples` subcommand, make it usable with other packages

* Add a `build-documentation` subcommand

* Update `README.md`

* Add toolchain modifier when required
2024-02-13 22:39:01 +00:00
Jesse Braham
044b38e632
Remove clippy lint exceptions from CI workflow (#1167)
* Add `#[allow()]` attrs as needed to remove clippy exceptions in CI

* Remove clippy exceptions in CI workflow
2024-02-13 10:44:31 -08:00
Jesse Braham
ebdd59b0ae
Add the xtask package, implement automation for building examples (#1157)
* Create the `xtask` package, add command for building examples

* Do not perform changelog check for `xtask` package changes

* Fix unrelated `rustfmt` error
2024-02-12 15:38:19 +00:00
W Etheredge
c92d69cb09
esp-hal-smartled: Calculate cycles from clocks (#1154) 2024-02-12 15:36:30 +00:00
Jesse Braham
8903b1ea8b Update PACs to their latest (unpubished) versions an make required changes 2024-02-08 17:50:02 +00:00
Scott Mabin
42bfd4950a
Fix sealing for Rsa/Aes (#1149) 2024-02-08 15:14:00 +00:00
Björn Quentin
66090ac3b9
Remove (unused) heapless dependency (#1148) 2024-02-08 13:24:48 +00:00
Björn Quentin
ca58da4fa1
Fix circular DMA (#1144)
* Fix circular DMA

* CHANGELOG.md entry

* Fix CHANGELOG.md
2024-02-08 12:02:25 +00:00
Scott Mabin
f6ba8c6c53
Appease clippy (#1147)
* Fix clippy

* unify sealing

* more improvements

* fmt

* rebase

* h2adcefuse
2024-02-08 11:50:06 +00:00
Alexander Ananiev
3a456bb9dd
Add type for gpio::AnyPin (#1067)
This makes it possible to safely implement the InputPin and OutputPin
traits for AnyPin. Now you can convert any pin to AnyPin with the
appropriate type and use it in other library modules

Added:
- Peripheral implementation for AnyPin
- Implementation of Pin for AnyPin
- Implementation of OutputPin for AnyPin with type IsOutputPin
- Implementation of InputPin for AnyPin with type IsInputPin
- Upgrade types for AnyPin (for example InputOutputAnalogPinType ->
InputOutputPinType)
- Implementation of From<Gpio> for AnyPin with the appropriate type

Changed:
- The Gpio::degrage method returns AnyPin with the appropriate type
2024-02-08 07:29:30 +00:00
Kirill Mikhailov
a08b38d231
Adding clock support for ESP32-P4 (#1145)
* Begin adding clock support for ESP32-P4

* WIP

* WIP: more functionality added, minor example update

* WIP state (testing)

* Format

* Finalizing + populating reset_reason enum

* Update esp-pacs dependency

---------

Co-authored-by: Jesse Braham <jesse@beta7.io>
2024-02-07 19:35:25 +00:00
Jesse Braham
ac07f3c460
Document the features of the remaining packages (#1143)
* Document features for `esp-riscv-rt` package

* Document features for `esp-hal-smartled`

* Document features for `esp-hal-procmacros`
2024-02-06 07:12:05 -08:00
Jesse Braham
0f12654f4a
Refactor the Trace driver to be generic around its peripheral (#1140)
* Use patched version of PAC for C6/H2

* Rename `TRACE` peripheral to `TRACE0`

* Refactor `Trace` driver to be generic around its peripheral

* Update `CHANGELOG.md`
2024-02-06 09:14:15 +00:00
Jesse Braham
285cfe4c5d
"Fix" clippy checks in CI, resolve a bunch of clippy warnings (#1134)
* Fix a bunch of `clippy` warnings in the `esp-hal` build script

* Resolve most clippy warnings for ESP32 (no features)

* Do the same for ESP32-S2/S3...

* Same for C2/C3...

* CI check for clippy now actually works (and passes!) for Xtensa

* RISC-V chips (except P4) now pass clippy in CI

* Add some safety doc comments which I forgot to write

* The `PwmPeripheral` trait is no longer `unsafe`, and is instead now sealed
2024-02-02 16:00:06 +00:00
Björn Quentin
c0f9169879
Support Rust's stack-protector feature (#1135)
* Support Rust's `stack-protector` feature

* Update changelogs
2024-02-02 13:56:39 +00:00
Jesse Braham
a586cb311e
Rename the ADC constructor to new, make it infallible (#1133)
* Rename the ADC constructor to `new`, make it infallible

* Update `CHANGELOG.md`
2024-02-01 11:51:05 +00:00
Jesse Braham
f36e2e72d6 ESP32-P4: Use commit hash from upstream repo for esp-backtrace patch 2024-01-31 20:08:36 +00:00