Commit Graph

1738 Commits

Author SHA1 Message Date
Dániel Buga
ef98e2b24f
[DMA 7/8]: Remove Dma, move channels to Peripherals (#2545)
* Move DMA channels into Peripherals

* Initialize DMA in the critical section needed for clock management

* Update esp-hal/MIGRATING-0.22.md

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

---------

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-11-25 09:31:18 +00:00
Kirill Mikhailov
8b36a43c07
Remove more examples. Update doctests. (#2547)
* WIP

* WIP(1)

* done

* changelog entry

* swint example needs to lose some weight

+ fix psram

* get twai and touch examples back, lcd example to qa, less embassy

* more moving

* move changelog entry

* address reviews

upd: revert "is_not_release" check

* rebase + a bit more changes

remove useless feature

* address review

remove inappropriate doctest tutorial

* get all sleep examples back and to qa-test

fmt

* get rid of some redundant printlns in doctests

* etm timer upd

* make printlns great again

* writeln! -> println!

* clear "timer with interrupts" doctest
2024-11-25 08:13:35 +00:00
Dániel Buga
3adb0b288e
0.21 Migration guide fixes (#2592) 2024-11-23 15:20:14 +00:00
Dániel Buga
fe482bdd05
Auto-initialize PSRAM (#2546) 2024-11-23 14:10:44 +00:00
Dániel Buga
09511c750a
Trim down xtensa-lx (#2357)
* Remove mutex, InterruptNumber, bare_metal and spin

* Changelog
2024-11-23 01:01:37 +00:00
Dániel Buga
51215093ca
AES cleanups (#2588)
* Deduplicate DMA trigger impl

* Deduplicate write_mode

* Fix num_block

* Clean up CipherMode setting
2024-11-23 00:37:11 +00:00
Dániel Buga
45395d4cc9
Add custom AtomicWaker and embassy-sync mutex implementation (#2555)
* Add custom AtomicWaker

* Replace Option with a null waker

* Revert "Replace Option with a null waker"

This reverts commit 9a861571790d13087e1448fa9d209d2edf956cb8.

* Clippy

* Implement RawMutex

* Move AtomicWaker, reimplement using Generic
2024-11-23 00:36:32 +00:00
Scott Mabin
79ca9d07aa
[2/3] Timer refactor: TIMG (#2581)
* system timer simplfication

* Removes _all_ type params on Alarm
* Systimer no longer implements peripheral ref, the peripheral ref
  pattern is instead intended to be used on the higher level timer
  drivers
* Removed `Unit` as a type, in favour of an enum
* Alarms are back in the main `SystemTimer` "driver"
* Made all `Unit` modification methods unsafe, it's not possible to
  modify the `Unit`'s safely whilst timers and or the `time::now` API is
  in use

* fix examples and tests (by removing them :D)

* changelog and migration

* Review feedback

* changelog and migration

* /unit_count/unit_value/g

* changelog and migration

* /unit_count/unit_value/g

* system timer simplfication

* Removes _all_ type params on Alarm
* Systimer no longer implements peripheral ref, the peripheral ref
  pattern is instead intended to be used on the higher level timer
  drivers
* Removed `Unit` as a type, in favour of an enum
* Alarms are back in the main `SystemTimer` "driver"
* Made all `Unit` modification methods unsafe, it's not possible to
  modify the `Unit`'s safely whilst timers and or the `time::now` API is
  in use

* Make TimerGroup Timer's dumb and untyped

* changelog

* review

* review
2024-11-22 16:14:14 +00:00
Dániel Buga
e98674e8fa
[DMA 6/8] More helper types & working split (#2532)
* Add helper traits to simplify DMA channel trait bounds

* Document changes

* Update doc example

* Remove clutter from MG

* Move DmaEligible down to place helper types closer

* Rename

* Include split in the MG
2024-11-22 15:59:31 +00:00
Dániel Buga
c1f0c134c3
Use a separate lock in esp-println (#2567) 2024-11-22 12:29:26 +00:00
Dániel Buga
b5775667b4
[DMA 5/8]: Clean up macros (#2527)
* Deduplicate PDMA channel impl macro

* Explicitly provide AnyDma prefix, regblock and compatible peripherals

* Clean up defining interrupt handlers

* Clean up ad-hoc ignore macro branches
2024-11-22 11:28:41 +00:00
Scott Mabin
60a2c76005
[1/4] Timer refactor: system timer (#2576)
* system timer simplfication

* Removes _all_ type params on Alarm
* Systimer no longer implements peripheral ref, the peripheral ref
  pattern is instead intended to be used on the higher level timer
  drivers
* Removed `Unit` as a type, in favour of an enum
* Alarms are back in the main `SystemTimer` "driver"
* Made all `Unit` modification methods unsafe, it's not possible to
  modify the `Unit`'s safely whilst timers and or the `time::now` API is
  in use

* fix examples and tests (by removing them :D)

* changelog and migration

* /unit_count/unit_value/g

* etm doctest

* Review feedback
2024-11-22 11:24:06 +00:00
Dániel Buga
9c1d99d9b4
Don't read to clear interrupts (#2585) 2024-11-22 10:55:53 +00:00
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
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