Commit Graph

1459 Commits

Author SHA1 Message Date
Sergio Gasquez Arcos
6f40dc2cca
Add issue templates (#2124)
* feat: Add issue templates

* feat: Address review comments

* feat: Add GH discussion link
2024-09-10 10:32:55 +00:00
Alexandra Clifford
e1c27f1b22
Some minor esp-ieee802154 updates (#2114)
* Use default CCA threshold value (per esp-idf)

* apply different consts for h2 versus c6 in tx power convert func

* Fix compile error when building with binary-logs feature

* Fix possible integer underflow error
2024-09-09 17:15:57 +00:00
Björn Quentin
ddf4ff7e9d
Make sure we can compile with defmt (#2126)
* Set DEFMT_LOG in CI

* Set DEFMT_LOG in CI

* Set DEFMT_LOG in CI

* Fix BLE vs DEFMT issue

* Fix ESP32 defmt problems in psram.rs

* Use `defmt` feature on `bt-hci`
2024-09-09 16:40:30 +00:00
Dániel Buga
be82a6521a
Allow pin drivers as wakeup sources (#2095)
Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-09-09 10:45:46 +00:00
Dominic Fischer
3ea95bd0d8
Faster SHA (#2112)
Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-09-09 10:18:38 +00:00
Björn Quentin
6295c5f9da
Esp wifi/fix wifi logs (#2117)
* Fix `wifi-logs` feature

* Some clarifications in the esp-wifi migration guide

* CHANGELOG.md

* Review comments

* Check more features
2024-09-09 10:15:52 +00:00
Dániel Buga
05941ccc37
Touch pin definition overhaul (#2109)
* Merge touch macros

* Add missing touch pins, remove trait impl indirection

* Remove unused stuff

---------

Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
2024-09-09 10:05:43 +00:00
amsam0
82a9abfff8
Allow setting RTC time (#1883)
* Initial WIP RTC set implementation

* Deprecate get_time_raw and add docs + some cleanup

* Update rtc time example

* Format

* Update changelog

* Add some comments linking the PR

* Small compilation fixes

* C6 and H2 fixes

* Remove parantheses from if statement lol

* Remove accidental changelog change

* Implement boot time wrapping to avoid overflows

* Remove unused get_rtc_time_ms and get_rtc_time_us functions

* Make get_rtc_time_us public and re-add get_rtc_time_ms as public

* Update changelog

* Remove get_time_raw and replace with public get_rtc_time_raw

* Changelog reordering

* Function renaming

* Use fugit and update changelog

* Small typo fix

* Fix changelog addition from merging

* Use chrono for current_time and set_current_time

* Fix changelog

* Update example

* Fix merge errors

* Rename `time::current_time` to `time::uptime`

* Revert "Rename `time::current_time` to `time::uptime`"

This reverts commit fe8446899747c88d5b9f945f319e1133b90773ee.

* Format

* Add info to migration guide

* Fix compilation for esp32c2

* Remove information about setting RTC time from migration guide since it isn't really relevant

---------

Co-authored-by: naturecodevoid <44983869+naturecodevoid@users.noreply.github.com>
2024-09-09 08:32:15 +00:00
Björn Quentin
d71434adfb
esp-wifi uses global allocator, esp-alloc supports multiple regions (#2099)
* esp-wifi uses global allocator, esp-alloc supports multiple regions

* CHANGELOG.md

* Apply suggestions

* Use `alloc` when linting esp-wifi

* Make coex example build for ESP32

* Re-enable some wifi examples for ESP32-S2

* Optionally depend on `esp-alloc` (by default)

* Rename INSTANCE -> HEAP
2024-09-06 15:42:19 +00:00
Björn Quentin
b3d2aaddd0
Prepare esp-backtrace 0.14.1 (#2107) 2024-09-06 14:47:09 +00:00
Scott Mabin
a3f734028a
ensure that clock init happens after rtc domain is initialized (#2104) 2024-09-06 13:58:35 +00:00
Ulf Lilleengen
93f1012663
Add integration with bt-hci crate (#1971)
* Add integration with bt-hci crate

Implementing traits from bt-hci allows the BleConnector to
be used with the Trouble BLE stack.

* use packed based read interface

* Improve example to allow another connection after disconnect

* update trouble version

* Workaround for spurious command complete events

* fix formatting

* ignore notify errors in example

* fix clippy warnings

* remove async feature from hal dependency

* remove deprecated feature from example

* Adopt to api changes

* Api fix for esp32

* Set rust-version of esp-wifi

* bump MSRV to 1.77 for CI and esp-hal

* Add changelog entry
2024-09-06 13:08:25 +00:00
Szybet
e6da89627b
Update esp-println version in usage section (#2100) 2024-09-06 11:48:21 +00:00
Björn Quentin
598212a020
Make additional memory available as dram2_uninit (#2079)
* Make additional memory available as `dram2_uninit`

* CHANGELOG.md
2024-09-06 10:55:33 +00:00
Dániel Buga
d6813a4bf0
Random additional GPIO cleanups, implement Peripheral for drivers (#2094)
* Reuse enable_iomux_clk_gate

* Remove public functions

* Remove set_to_input

* Deduplicate constructor

* Deduplicate is_listening

* Hide PinFuture better

* Deduplicate set_int_enable

* Align macro indentation

* Typo

* Slightly simplify the touch_into macro

* Implement the AnalogPin trait directly

* Provide default impls for simple forwarding methods

* Newtype ErasedPin

* Merge rtc_pin macros

* Fmt

* Changelog

* Fix migration guide

* Fix example

* Fix ETM
2024-09-06 10:26:23 +00:00
Sergio Gasquez Arcos
b5f0246129
Reordered RX-TX pairs to be consistent (#2074)
* feat: Update rx-tx order in i2s

* feat: Update rx-tx order in dma macros

* feat: Update rx-tx order in spi

* feat: Update rx-tx order in aes

* feat: Update rx-tx order in mem2mem

* feat: Update rx-tx order in twai and split methods

* feat: Update rx-tx order in twai

* feat: Update rx-tx order in twai and uart docs

* docs: Add sentence about order

* docs: Update changelog

* feat: Update rx-tx order in embassy_interrupt_spi_dma tests

* style: Rustfmt

* docs: Migrating guide

* fix: Typo

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

* fix: Diff

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

* fix: Tests rx-tx order

* fix: Update new_with_default_pins order

* feat: Update rx/tx order in hil_test::common_test_pins!

* feat: Update dma_extmem2mem example

* fix: Revert deleted input arg

* style: rustfmt

* feat: Disable test_asymmetric_dma_transfer for S2

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2024-09-06 09:56:10 +00:00
liebman
492e35aa74
esp-wifi: other crates also provide strchr (littlefs2-sys) (#2096)
* esp-wifi: other crates also provide strchr (littlefs2-sys)

* esp-wifi: other crates also provide strchr (littlefs2-sys)

* changelog

* fmt :-(
2024-09-06 09:22:33 +00:00
Juraj Sadel
17daa464ba
Enable ESP32 HIL (#1977)
* Enable ESP32 HIL

* RMT fixed

* SPI DMA partially works, _pcnt tests not working

* bckup

* finish

* readme and cleanup

* rebase + cleanup

* RMT S2 pin typo + clean forgotten comments

* review comments

* update 10000

* indentation

* replace cfg gate with cfg_if
2024-09-06 08:53:27 +00:00
Anthony Grondin
fba475ee40
Add missing #[doc(hidden)] in xtensa-lx-rt-proc-macros (#2097) 2024-09-06 06:36:54 +00:00
Scott Mabin
70126c8149
Rename esp_hal::time::current_time to esp_hal::time::now (#2091)
* rename esp_hal::time::current_time to esp_hal::time::uptime

* changelog

* move more things to init

* s/uptime/now/g
2024-09-05 14:57:56 +00:00
Dániel Buga
f11c18a6b9
Optionally type-erased GPIO drivers (#2075)
* Remove type erased gpio structs

* Implement Peripheral for ErasedPin

* Simpler type erasing, accept ErasedPin in pin drivers, remove type erased drivers

* Reformulate pin drivers using Flex

* Erase gpio types by default

* Accept any pin in AnyPin

* Add changelog and migration guide

* Fix tests and examples

* Undo rename of clone_unchecked
2024-09-05 14:14:51 +00:00
liebman
a5ab73959e
i2c: fix embedded-hal transactions (#2028)
* i2c: fix embedded-hal transactions

* changelog+fmt

* small naming cleanup

* i2c: fix 1 byte reads

* typo

* small cleanup and add a few internal docs

* update changelog

* rebase & CHANGELOG

* extract next op conversion

* fix `setup_read()` logic for 0 length reads.

* return error for 0 length reads and 0 length  writes where start=false

* comment about max_len in setup_write()

* filter out 0 length read operations in `transaction()`

* Short circuit for problematic 0 lengths in read_operation and write_operation

* don't short circuit a 0 length write operation if stop=true

* handle write_read when the read bufer is empty
2024-09-05 14:05:00 +00:00
M4tsuri
4f97befdde
Implement sleep and wakeup functionalities for ESP32C2 #1920 (#1922) 2024-09-05 13:39:46 +00:00
liebman
a2af2ac65e
lcd_cam: fix wrong buffer length used if 16bit and len<=8192 (#2085)
* lcd_cam: fix wrong buffer length used if 16bit and len<=8192

* changelog
2024-09-05 13:07:00 +00:00
Gnome!
4d9ea52eae
[esp-hal-procmacros] Update to proc-macro-error2 (#2090) 2024-09-05 11:40:52 +00:00
Dominic Fischer
b6aceb1de8
Improve SHA driver API (#2049)
Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-09-05 11:39:46 +00:00
Dániel Buga
5370afb1eb
Build examples in debug mode (#2078)
* Build examples in debug mode

* Allow building psram examples in debug mode in CI

* Don't rebuild tests, try to avoid rebuilding dependencies
2024-09-05 10:04:07 +00:00
Dániel Buga
42a0417fba
Fix nightly warnings (#2082) 2024-09-05 07:40:22 +00:00
Scott Mabin
80c0a81718
fix issue handler, don't rebuild on main the merge queue checks this for us (#2077) 2024-09-04 16:02:47 +00:00
Dániel Buga
fb694110d2
Accept ErasedPin in AnyPin (#2072)
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-09-04 15:17:39 +00:00
Dániel Buga
e898e89f60
Remove AnyInputOnlyPin (#2071)
* Remove AnyInputOnlyPin

* Add section to migration guide

* Remove unnecessary enum

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

---------

Co-authored-by: Dominic Fischer <14130965+Dominaezzz@users.noreply.github.com>
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-09-04 15:11:08 +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
99bf346898
Remove the need to manually pass clocks around (#1999)
* Clean up passing clocks to drivers

* Update changelog

* Initialise Clocks in a critical section

* Fix calling now() before init

* Fix doc

* Fix esp-wifi migration guide

* Add safety comment

* Update tests
2024-09-04 14:13:51 +00:00
Dániel Buga
7688504289
Remove Gpio type aliasses (#2073)
* Remove Gpio type aliasses

* Clean up examples
2024-09-04 13:37:56 +00:00
Kirill Mikhailov
9bec6a1806
Adding I2C HIL test (#2023)
* i2c hil test

* pin

* fmt

* Test

* WIP (gpio test left)

* Finalize the CODE part (to be cleaned up)

fmt

* Smaller cleanup

* cleanup

* rebase

* fix

* getting last chips ready

* Addressing reviews
2024-09-04 12:45:58 +00:00
Jesse Braham
b7b916f03a
Remove most trait implementation features from esp-hal (#2070)
* Eliminate esp-hal's `ufmt` feature

* Eliminate esp-hal's `embedded-hal-02` feature

* Eliminate esp-hal's `embedded-hal` feature

* Eliminate esp-hal's `embedded-io` feature

* Eliminate esp-hal's `async` feature

* Update `CHANGELOG.md`

* Remove `async` from required features for HIL tests

* Update migration guide
2024-09-04 06:15:27 +00:00
Gnome!
49e14b7ccb
Remove lazy_static in favor of OnceLock (#2063)
* [esp-metadata] Remove lazy_static in favor of OnceLock

* [esp-wifishark] Remove lazy_static in favor of normal initialisation

* [ieee802154-sniffer] Shorten SelectorConfig initialisation

* [ieee802154-sniffer] Remove lazy_static in favor of normal initialisation
2024-09-03 14:43:35 +00:00
Björn Quentin
0cf7abfc47
Make esp-wifi build on stable, again. Bump to 0.9.1 (#2067)
* Make esp-wifi build on stable, again. Bump to 0.9.1

* CHANGELOG.md

* MSRV check esp-wifi

* ESP32-S2 doesn't support Bluetooth
2024-09-03 16:10:20 +02:00
Dániel Buga
647e34f401
Remove NoPinType (#2068) 2024-09-03 13:36:14 +00:00
Björn Quentin
9c3b17166f
Bump to esp-wifi 0.9.0 (#2066) 2024-09-03 13:30:28 +01:00
Björn Quentin
5420ce0959
WPA2 ENTERPRISE (#2004)
* WPA2 ENTERPRISE

* Defmt, Clippy, Changelog

* Defmt, again

* Clippy, again

* Mention corresponding JIRA ticket

* Rename

* fmt

* Use Mutex in scheduler

* Adapt wifi_delete_queue

* Adapt log level
2024-09-03 11:22:39 +00:00
Dániel Buga
9465244e0d
Fix various SPI/DMA issues (#2065)
* Add failing test

* Fix enabled interrupt

* Fix using the correct waker

* Changelog

* Enable test on more devices that have SPI3
2024-09-03 10:02:21 +00:00
Dániel Buga
08d406ee2b
storage: Clean up ROM function declarations (#2058)
* Clean up external function declarations

* Tweak syntax
2024-09-02 15:24:41 +00:00
Dániel Buga
c21287a5ef
Provide ehal impls for DummyPin (#2019)
Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-09-02 15:16:26 +00:00
Gnome!
671003ace6
[esp-metadata] Make clap dependency optional (#2055) 2024-09-02 14:31:23 +00:00
Dániel Buga
580222758e
Fix hil-test xtask instruction (#2062)
* Fix hil-test xtask instruction

* Fix another mention
2024-09-02 14:08:17 +00:00
Dániel Buga
447411fb58
Rework hal initialization (#1970)
* Rework hal initialization

* Turn sw interrupt control into a virtual peripheral

* Return a tuple instead of a named struct

* Fix docs

* Remove SystemClockControl

* Move software interrupts under interrupt

* Re-document what's left in system

* Update time docs

* Update sw int docs

* Introduce Config

* Fix tests

* Remove redundant inits

* Doc

* Clean up examples&tests

* Update tests

* Add changelog entry

* Start migration guide

* Restore some convenience-imports

* Remove Config from prelude
2024-09-02 13:38:46 +00:00
Björn Quentin
d60bafbf05
Improve CP0-disabled error message (#2061)
* Improve CP0-disabled error message

* CHANGELOG.md
2024-09-02 13:38:10 +00:00
Scott Mabin
b620e35ebe
automatically apply status:needs-attention to new esp-hal issues (#2030) 2024-09-02 11:43:36 +00:00
Dominic Fischer
11f90b9e8b
Protect SYSTIMER/TIMG shared registers (#2051)
* Protect SYSTIMER/TIMG shared registers

* some review comments

* more review comments

* more review comments

* bring back portable_atomic

---------

Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-09-02 11:40:25 +00:00