1725 Commits

Author SHA1 Message Date
Dániel Buga
3a4a7632b1
[DMA 4/8]: Apply Peripheral pattern (#2526)
* Create DMA Channels inside peripherals

* Add PARL_IO into_async functions

* Update tests and examples

* Restore configurable priority via DmaChannel

* Add mode param to DPI driver

* Fix test by raising SPI frequency

* Fix split

* Changelog

* Update esp-hal/CHANGELOG.md

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

---------

Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
2024-11-22 09:05:22 +00:00
Dániel Buga
f81b5f6c7f
Run a custom script before running HIL tests (#2580)
* Do not cycle USB power

* Call a script before running tests
2024-11-21 15:17:35 +00:00
Dániel Buga
973671c3cb
[DMA 3/8] Remove ChannelCreator types, temporarily disable burst mode (#2403)
* Remove ChannelCreator types and burst mode

* Fix up I2sParallel

* Always enable burst transfering descriptors

* Configure burst transfer with a non-bool for future chip support

* Reuse buffer preparation code

* Update LoopBuf as well

* Update lcd_cam tests

* Rename config, fix changelog
2024-11-21 15:01:29 +00:00
Björn Quentin
f9203dc523
Disable peripherals when unused (#2544)
* Disable peripherals when unused

* Fixes

* CHANGELOG.md

* Fix

* Address review comments

* Have dedicated guards for CAM and LCD

* Re-use `Cam`'s guard

* De-duplicate, assert

* fmt

* Require CriticalSection

* Address comments

* Remove redundant guard

* Use `GenericPeripheralGuard`

* Renaming
2024-11-21 09:21:28 +00:00
Dániel Buga
457ed44802
Slight cleanup throughout (#2575)
* Slight cleanup throughout

* Explain empty build script
2024-11-21 09:06:49 +00:00
Jesse Braham
02ddad47c0
Add new migration guides (#2571) 2024-11-21 09:05:33 +00:00
Dániel Buga
a824963943
Avoid old API in SPI example in migration guide (#2578) 2024-11-21 08:25:33 +00:00
Scott Mabin
2fc10d684c
API guideline touchups (#2573)
* guideline touchups

* review comments
2024-11-21 07:41:26 +00:00
Dominic Fischer
8600c4009f
ESP32-S3: Added SDMMC signals (#2556)
* ESP32-S3: Added SDMMC signals

* fmt

* Daniel's request

* changelog

---------

Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-11-20 21:49:24 +00:00
Jesse Braham
3c1aba5088
Add --no-verify for esp-riscv-rt to xtask publish (#2570) 2024-11-20 10:44:24 +00:00
Jesse Braham
bdfec3781f
New package releases (#2569)
* New package releases

* Update `CHANGELOG.md` for all packages to be published
v0.22.0 esp-wifi-v0.11.0
2024-11-20 09:16:33 +00:00
Dániel Buga
73a6e32971
Add pin driver examples, explain drivers a bit better (#2563)
* Add pin driver examples, explain modes

* Remove redundant blinky mention

* Wireless keyboard strikes agan

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>

* Add println macro to before_snippet

---------

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
2024-11-19 13:53:12 +00:00
Dániel Buga
432622ca9f
Clarify embassy migration guide (#2565) 2024-11-19 13:31:43 +00:00
Dániel Buga
70fe8fb077
Remove some unnecessary prelude reexports (#2564)
* Remove some unnecessary prelude reexports

* Fix test
2024-11-19 13:31:08 +00:00
Dominic Fischer
7821968df8
Introduce RGB/DPI driver (#2415)
* Introduce RGB/DPI driver

* Choose different pin for HIL test

* fail

* Use official devkit

* merge update

* non_exhaustive

---------

Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-11-19 10:15:09 +00:00
Dániel Buga
26fd1a40d9
Avoid polling for no reason (#2551) 2024-11-19 07:58:02 +00:00
Scott Mabin
9c06c69600
Touch up the migration guide for esp-wifi (#2561) 2024-11-18 14:41:11 +00:00
Dániel Buga
4f6d51fefa
Add missing Sealed impl (#2560)
* Add missing Sealed impl

* Typos

* It compiles
2024-11-18 14:15:40 +00:00
Jesse Braham
2472e36232
Add the qa-test package (#2558)
* Teach `xtask` about the `qa-test` package

* Create the `qa-test` package and move some examples to it

* Check `qa-test` package in CI

* Add `README.md`
2024-11-18 11:00:17 +00:00
Dániel Buga
c6404fe569
Forget our problems (#2541) 2024-11-14 15:30:48 +00:00
Jesse Braham
d68550c485
Add a publish subcommand to the xtask (which performs a dry-run by default) (#2539)
* Update and reorganize xtask dependencies

* Add a publish subcommand (which performs a dry run by default)

* Update xtask/src/main.rs

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>

---------

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
2024-11-14 11:27:30 +00:00
Dániel Buga
52c65dd149
[DMA 2/N] Split DMA IN/OUT handlers (#2521)
* Separate IN/OUT handlers

* Split DMA IN/OUT handlers

* Reset channel async status when re-creating

* Remove resolved TODO

* Hide Cpu iterator functions
2024-11-14 10:49:16 +00:00
Jesse Braham
64f4fea403
Remove some examples which are adequately covered by documentation (#2538) 2024-11-14 09:32:18 +00:00
Dániel Buga
38dde2ebbd
[DMA 1/N] Add mode to DMA channel drivers (#2519)
* Add mode to DMA channel drivers

* Swap dma Channel CH and DM

* Fix copy-paste mistake
2024-11-14 08:03:05 +00:00
Jesse Braham
959631ee55
Fix nightly lint errors (#2537) 2024-11-14 07:59:55 +00:00
Jesse Braham
014a04faad
Use correct toolchain when building documentation or running doctests via xtask (#2536)
* Add an alias for `fmt-packages` (since I always get this wrong)

* Use correct toolchain when building documentation or running doc tests
2024-11-14 07:38:50 +00:00
Jesse Braham
f3346a80b9
Update documentation to recommend esp-generate instead of esp-template (#2535)
* Update documentation to recommend `esp-generate` instead of `esp-template`

* Hide the `trm_link` macro in the documentation
2024-11-14 07:32:10 +00:00
Jesse Braham
c19c7fcf01
Remove get_core() in favour of Cpu::current() (#2533)
* Remove `esp_hal::core()` in favour of `Cpu::current()`

* Update migration guide

* Update `CHANGELOG.md`
2024-11-13 16:13:47 +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
Dániel Buga
b11fc0fce8
Remove NoClkPin (#2531) 2024-11-13 15:07:55 +00:00
Jesse Braham
099e0eacdf
Use newest published PACs (#2530) 2024-11-13 15:06:22 +00:00
Dániel Buga
b538e48ea4
Fix RMT test (#2529) 2024-11-13 13:52:11 +00:00
Björn Quentin
7da4444a7e
Fail RMT one-shot transactions if end-marker is missing (#2463)
* Fail RMT one-shot transactions if end-marker is missing

* CHANGELOG.md

* Add test

* Fix

* Fix

* RMT: use u32, turn PulseCode into a convenience trait

* Clippy

* Adapt test
2024-11-13 11:29:36 +00:00
Dániel Buga
8cbc249e2e
I2c: attempt empty writes (#2506)
* Attempt 0-length writes

* Deduplicate

* Changelog

* Test existing address

* Name addresses

* Fix formatting
2024-11-13 09:57:30 +00:00
Easyoakland
30276e1609
implement wifi event handling with data (#2453)
* implement event handling for apsta{,dis}connect and probe

add to wifi_access_point example

* hide internal `Option` to simplify api

* move handler call logic to event.rs

* update_handler_leak

* - Add comments

- match simpler api from `std::panic::update_hook`

- do not assume size_of in prelude

- make all events handleable

- box static instead of leak

* update changelog

* elide lifetime on default handler

* newtypes for all event types.

* add doc to newtypes

* fix previous doc example

* - `get_handler` -> `handler`
- pass critical section to event handlers
- comment on perf of Box<ZST>
- don't pass `prev` in `update_handler`, instead call previous handler first unconditionally

* pass cs to dispatch_event_handler

* don't print "unhandled event" for handled events.
2024-11-13 08:49:41 +00:00
Dominic Fischer
456bcfb7c6
Remove redundant Enable trait (#2523)
Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-11-13 08:26:18 +00:00
Björn Quentin
0b452f7933
C6/H2 Make higher LEDC frequencies work (#2520)
* ESP32-C6/H2: Make higher LEDC frequencies work

* FMT

* CHANGELOG.md
2024-11-13 08:11:01 +00:00
Dániel Buga
5d9cc1a588
Add ESP32-S2 alternate functions (#2512) 2024-11-12 12:18:16 +00:00
Björn Quentin
5d120f7a70
Remove the integrated blocking networking stack (#2488)
* Add simple example using `smoltcp-nal`

* Remove the blocking networking stack

* Renaming

* Fix CI

* CHANGELOG.md

* Fixes after re-base

* Update esp-wifi/MIGRATING-0.10.md

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

* Improve diff in migration guide

---------

Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
2024-11-12 11:43:01 +00:00
Dániel Buga
6cb5d9643f
Deduplicate impl, chunk data in ehal transaction Operations (#2481) 2024-11-12 10:49:30 +00:00
Dániel Buga
fbc57542a8
Remove pins from Io (#2508)
* Split pins off of Io

* Remove the GPIO peripheral

* p.GPIO
2024-11-12 10:36:25 +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
cf10f07a9e
Add validation to esp-config (#2475)
* Clean up and re-organize `lib.rs` a bit (sorry)

* Add configuration validation, some other refactoring/improvements

* Add a built-in range validator, re-document the `generate_config` function

* Update build scripts to reflect new configuration API
2024-11-12 10:14:14 +00:00
Jesse Braham
57fc5df858
Modify bump-version subcommand to also bump dependent packages' dependencies (#2514) 2024-11-12 07:08:32 +00:00
Jesse Braham
33659380dd
Update revision of PACs and fix all build errors (#2515) 2024-11-11 21:27:50 +00:00
Dániel Buga
4af44b1498
Introduce Driver and move implementation into it (#2480) 2024-11-11 15:43:07 +00:00
Dániel Buga
2c14e595db
I2C: add apply_config, implement SetConfig, add with_sda and with_scl (#2477)
* Implement apply_config, SetConfig

* Remove pins from constructors

* Implement timeout changes, document them

* Fix up changelog
2024-11-08 22:51:42 +00:00
Dániel Buga
e10ae2ddff
GPIO: do not overwrite interrupt handler (#2486)
* Prefer defmt unwrap

* Auto-bind the GPIO interrupt handler

* Changelog

* Bind interrupt handler when initializing the hal

* Remove user handler overhead unless user handler is bound

* Add tests

* Try to preserve direct-bound handlers

* Fix match

* Don't rely on the vector table to check direct binding

* Fix comment
2024-11-08 17:04:06 +00:00
Sergio Gasquez Arcos
7402ad61ed
Expose CSI API in esp-wifi (#2422)
* feat: (WIP) add CSI api

* feat: Enable G_CONFIG.csi_enable and update example

* fix: Allow user to set the dessired cb method

* fix: Clippy warnings

* fix: Add missing doccomments

* feat: Add csi_enable config

* refactor: Update CsiConfiguration c6 struct

* feat: Create set_csi WifiController and EspNowManager methods

* docs: Update changelog

* refactor: Rename CsiConfig struct

* docs: Document c6 version of CsiConfig

* feat: impl From<CsiConfig> for crate::include::wifi_csi_config_t

* style: Rustfmt

* docs: Fix comment

Co-authored-by: Dániel Buga <bugadani@gmail.com>

* docs: Fix typo

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

* feat: Enable CSI on examples by default

* feat: Handle errors

* style: Rustfmt

* feat: Update error

* feat: Panic if csi config is not enabled

* feat: Cfg CSI stuff when CSI is disabled instead of panicing

* fix: Clippy lints

* feat: Fix signed bitfields

* feat: Pass the cb via ctx

* feat: Update CSI callback to use closures

* refactor: Rename promiscuous_csi_rx_cb to csi_rx_cb

* feat: Move extra boxing inside set_receive_cb

* feat: Refactor CSI callback to use generic types

* refactor: Remove Sized bound from CsiCallback trait

* feat: Add csi_enable field to EspWifiConfig and update CsiCallback trait for conditional compilation

* feat: Remove unnecessary boxes

* feat: Update callback type in set_csi to require Send trait

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

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
Co-authored-by: Juraj Sadel <jurajsadel@gmail.com>
Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
2024-11-08 16:33:13 +00:00
Björn Quentin
3c4b7f0f66
Test more embassy interrupt spi dma (#2490)
* Add C3,C6 and H2 for `embassy_interrupt_spi_dma`

* Test more

* Don't require physically connected pins
2024-11-08 13:43:34 +00:00