81 Commits

Author SHA1 Message Date
Jesse Braham
59a2c17a52
New package releases (#2959)
* Fix some styling issues in top-level README.md

* Update package dependencies and bump version numbers

* Update each `CHANGELOG.md` file for packages to be published

* Update `esp-hal` migration guide

* Fix typo in `esp-hal` changelog
2025-01-15 11:37:36 +00:00
Jesse Braham
e6c38c59b7
Bump MSRV of all packages to 1.84, add MSRV policy to each README.md (#2951)
* Various top-level `README.md` updates

* Set MSRV to 1.84.0 for all packages

* Add MSRV policy to each `README.md`

* Update each `CHANGELOG.md`
2025-01-14 11:01:28 +00:00
Björn Quentin
732c442c24
Main macro (#2941)
* Re-organize code

* Update dependencies

* Introduce `esp_hal::main` macro

* Migration Guide

* CHANGELOG.md

* Move around

* Remove redundant features, improve error message

---------

Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
2025-01-13 17:08:47 +00:00
Jesse Braham
036d08e09f
Annotate builder functions with #[must_use] (#2841) 2024-12-19 10:10:23 +00:00
Scott Mabin
85d30e9816
Updates for Xtensa enabled 1.83 compiler (#2615)
* test ci

* fix ci with new compiler

* god bless clippy fix

* refmuts

* clippy

* tests work

* use new compiler

* use new compiler

* bump MSRV of esp-hal and crates that depend on esp-hal

* fix eyesore

* clippy again

* remove hardcoded compiler version

* bump rust-version as well

* note MSRV bump in changelog
2024-12-17 15:02:03 +00:00
Jesse Braham
1a2bee6f1f
Add derive macro for BuilderLite, add #[non_exhaustive] to some enums and structs (#2614)
* Add a derive procmacro to implement the Builder Lite pattern for a struct

* Add `#[non_exhaustive]` and derive `BuilderLite` where necessary in I2C module

* Add `#[non_exhaustive]` and derive `BuilderLite` where necessary in UART module

* Add `#[non_exhaustive]` and derive `BuilderLite` where necessary in SPI module

* Update `CHANGELOG.md`

* Fix build errors in HIL tests

* Fix generated doc comments

* Return a `ParseError` rather than panicking

* Add a method to set the value to `None` for `Option` types
2024-11-27 15:54:43 +00:00
Dániel Buga
aed0fac0eb
Rewrite time driver (#2559)
* Rewrite time driver

* Don't store priority

* Changelog

* Fix doc example

* Use separate locks for Alarms

* Mention generic queues

* Cache the next wakeup timestamp

* Immediately repoll if timestamp is in the past

* Add benchmark

* Remove equality check for now

* Enable interrupts when allocating the alarm

* Clean up

* Use relaxed ordering

* wut

* Typo

* Move benchmar

* fmt
2024-11-25 17:02:47 +00:00
Jesse Braham
b06c7a470c
Remove unnecessary features from esp-hal-procmacros, enable rtc-slow feature for Xtensa devices (#2594)
* Remove unnecessary features from `esp-hal-procmacros`

* Enable the `esp-hal-procmacros/rtc-slow` feature for Xtensa devices

* Update CHANGELOGs
2024-11-25 15:18:14 +00:00
Jesse Braham
bdfec3781f
New package releases (#2569)
* New package releases

* Update `CHANGELOG.md` for all packages to be published
2024-11-20 09:16:33 +00:00
Jesse Braham
92b91257e9
Remove get_ prefix from functions (#2528)
* Remove `get_` prefixes from functions

* Update migration guides for `esp-hal` and `esp-wifi`

* Update `CHANGELOG.md` files
2024-11-13 15:40:26 +00:00
Jesse Braham
321ca2f131
Add CHANGELOG.md for remaining packages which do not have one (#2518)
* Add `CHANGELOG.md` for remaining packages which do not have it

* Update `changelog` workflow to check all relevant packages
2024-11-12 10:17:11 +00:00
Jesse Braham
d655fe665f
New package releases (#2310)
* Bump version numbers of all packages to be published, update deps as needed

* Update all `CHANGELOG.md` files

* Update migration guide headings
2024-10-10 10:19:04 +00:00
Scott Mabin
08030d5541
bump all semver compatible deps (#2303) 2024-10-08 12:56:30 +00:00
Gnome!
4d9ea52eae
[esp-hal-procmacros] Update to proc-macro-error2 (#2090) 2024-09-05 11:40:52 +00:00
Dániel Buga
39109a4a05
Remove gpio dispatch macro-defining proc macro (#2069)
* Keep a single PinType trait

* Merge impl blocks

* Deduplicate usb pad workaround

* Deduplicate some bit manipulation

* Remove gpio dispatch proc macro

* Inline PinType into GpioProperties
2024-09-04 14:47:24 +00:00
Dániel Buga
8e6411bd31
Random cleanups in non-checked packages (#2034)
* Deduplicate feature check macros

* Re-enable rust-analyzer for most of the workspace

* Cargo fix

* Turn off defmt

* Only build xtask

* Clippy pls

* Fix CI

* Fix paths

* Always create doc directory first

* Revert r-a

* Update esp-hal-procmacros/src/lp_core.rs

Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>

---------

Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
2024-08-30 14:45:54 +00:00
Dániel Buga
fce510f50a
Disable object's unnecessary features in proc macro that loads LP code (#2018)
* Disable object/decompress

* Only enable elf support in object
2024-08-30 14:37:27 +00:00
Jesse Braham
5917275108
Version 0.20.0 (#2038)
* Update package dependencies and bump version numbers

* Update `CHANGELOG.md` for each package to be published

* Remember to update `xtensa-lx-rt` too :)

* Add and use TrapFrame::new() in esp-wifi

* Bump `xtensa-lx-rt` by minor instead of patch, as there are breaking changes

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2024-08-29 19:29:33 +00:00
Jesse Braham
776f34cff1
Re-export the esp_hal_procmacros::main macro from esp-hal-embassy instead of esp-hal (#1828)
* Re-export the `main` procmacro from `esp-hal-embassy` rather than `esp-hal`

* Fix documentation warnings

* Flatten the `time_driver` module

* clippy

* Update `CHANGELOG.md`
2024-07-18 09:31:03 +00:00
Jesse Braham
77b6cb8615
New package releases (#1800)
* Use published versions of all dependencies, update dependencies as needed

* Fix `embassy_usb_serial` example build errors after updating `embassy-usb`

* New package releases
2024-07-15 20:23:13 +00:00
W Etheredge
a2883ac318
Take 2 on #[ram] soundness (#1677)
* Improve `#[ram]` soundness

* Allow `Atomic*` in `#[ram(persistent)]`

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-07-10 13:30:48 +00:00
Jesse Braham
2bef914e7c
Update and improve esp-lp-hal (#1754)
* Fix warning in `esp-hal-procmacros` when building for `esp-lp-hal`

* Document cargo features, use `embedded-hal@1.x.x` by default

* Derive more traits on public types, assorted cleanup and improvements

* Implement `embedded-hal-nb` and `embedded-io` traits for UART

* Update `CHANGELOG.md`

* Silence `clippy` for now...

* Module documentation for UART

* Update module documentation format
2024-07-09 17:06:54 +00:00
Juraj Sadel
4c5e493b1b
esp-hal: Add runnable doctests to peripheral drivers (#1663)
* Check docs examples II

* rebase and update

* fix root crate macro expansion in doctest snippets

* clean up and fmt

* add xtask run-doc-test subcommand and check in CI

* address review comments

* remove commented printlns

* fix the host target check

* rebase and update

* hide docs for before_snippet macro and remove commented block code in twai
2024-06-11 10:18:09 +00:00
Jesse Braham
e50f663842
New package releases (#1654)
* Bump dependencies and version numbers of packages to be published

* Update relevant `CHANGELOG.md` files
2024-06-04 16:11:42 +00:00
Jesse Braham
48e3e912f3
Extract embassy support into esp-hal-embassy package (#1595)
* Extract embassy support into `esp-hal-embassy` package

* Update relevant packages/examples/tests to get CI green again

* Add back `defmt` support

* Re-export `Executor` and `InterruptExecutor` rather than making `executor` module public

* Document the `esp-hal-embassy` package

* Update `CHANGELOG.md`

* Hack together a "fix" for the `SYSTIMER` time driver

* Make `clippy` shut up
2024-06-03 11:27:20 +00:00
Björn Quentin
2faa2654cb
GPIO Refactoring (#1542)
* GPIO Refactoring

* CHANGELOG.md

* Addressed review comments

* Use `Level` instead of plain bool in public API

* Let drivers enable analog functions
2024-05-15 08:49:33 +00:00
Dominic Fischer
866933bf6f
Fix entry macro for ULP hal (#1488) 2024-04-22 14:42:10 +00:00
Jesse Braham
822bef12c7
New package releases (#1464) 2024-04-18 16:02:45 +00:00
Jesse Braham
71db9fa55c
Remove partial support for the ESP32-P4 (#1461)
* Remove all code for and mentions of the ESP32-P4

* Update `CHANGELOG.md`
2024-04-17 14:49:00 +00:00
Jesse Braham
586744070b
Remove some #[allow] attributes and an unused function (#1440)
* Remove TODO comments from linker scripts for ESP32-C6/H2

* Small refactor in Xtensa interrupt module to get rid of some allow attributes

* Remove unused function and attribute from `esp-hal-procmacros`
2024-04-16 10:45:57 +00:00
Jesse Braham
f6925480f2
Remove unused function from esp-hal-procmacros (#1421) 2024-04-11 09:29:29 +00:00
Björn Quentin
1fdfc9270e
Remove the #[interrupt] macro (#1409) 2024-04-09 10:11:57 +00:00
Jesse Braham
fd9f7895f6
Extract inner modules of gpio module into their own files (#1397)
* Extract inner modules of `gpio` module into their own files

* Update `CHANGELOG.md`

* Add missing doc comment in `gpio::lp_io` module

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-04-05 12:33:49 +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
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
Anthony Grondin
1b2dab1dff
Add missing #[doc(hidden)] attributes for embassy proc macros (#1302)
Fixes https://github.com/esp-rs/esp-hal/issues/1233
2024-03-21 22:10:15 +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
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
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
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
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
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
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
9bf70ff792
Combine the esp-ulp-riscv-hal and esp32c6-lp-hal packages (#1115)
* Combine `esp-ulp-riscv-hal` and `esp32c6-lp-hal` into a single package

* Update LP core examples

* Update CI workflow

* Fix `LP_UART` example
2024-01-26 13:46:51 +00:00
Juraj Sadel
bc96351c17
C6: Basic LP_UART driver (#1113)
* WIP

* Add basic LP_UART C6 driver

* Add lp-uart example for C6

* modify entry macro and fmt

* final cleanups

* revert lp_core_basic example and add lp_core_uart and uart examples

* changelog

* review changes

* second changelog

---------

Co-authored-by: Jesse Braham <jesse@beta7.io>
2024-01-25 16:22:14 +00:00
Jesse Braham
e5cd1bd33e
Add initial support for the ESP32-P4 (#1101)
* Add `esp32p4` feature to `esp-hal-procmacros`

* Add `esp32p4` feature to `esp-hal-common`

* Create the `esp32p4-hal` package

* Add ESP32-P4 to CI workflow

* Fix a silly typo :)

* Update `CHANGELOG.md`
2024-01-22 15:28:05 +00:00
Jesse Braham
c55a6b70ae
New package releases (#1018)
* Fix typos in top-level `README.md`

* Bump version numbers of all packages and update necessary dependencies

* Update `CHANGELOG.md` files
2023-12-12 10:17:17 -08:00
Dániel Buga
39519dfdc9
RISC-V executors (#947)
* RISC-V executors

* Add multiprio example to RISC-V SoCs

* Check new examples

* Hack in support for generic queue

* Reserve SoftwareInterrupt0 for multicore thread-mode executors

* Merge interrupt executors

* Merge thread-mode executors

* Document the new features and expand on time drivers

* Main tasks don't have to return !

* Unify multiprio examples

* Undo C6 log output change
2023-11-22 14:36:53 +00:00
Björn Quentin
c612fecfae
Clear LP/RTC RAM (#916)
* Clear LP_RAM/RTC RAM to make sure .bss is cleared

* Rename `ulp-riscv-hal` to `esp-ulp-riscv-hal`

* CHANGELOG.md entry
2023-11-09 14:06:58 +01:00