Commit Graph

1491 Commits

Author SHA1 Message Date
Dominic Fischer
5ae76d727e
Remove pin generics from I8080 (#2171)
* Remove pin generics from I8080

* Doc example

* temp

* More docs

* doc fix

---------

Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-09-17 13:56:01 +00:00
Anthony Grondin
a787a13441
Implement TryFrom<u32> for ledc::timer::config::Duty (#1984)
* feat(buzzer): Add `esp-hal-buzzer` to drive a piezo-electric buzzer.

Provides a driver for a piezo-electric buzzer by abstracting LEDC and offering a user-friendly API for a buzzer

* Move songs into example and refactor songs module.

* Move `esp-hal-buzzer` to https://github.com/esp-rs/esp-hal-community/

* Update `CHANGELOG.md`

---------

Co-authored-by: Jesse Braham <jesse@beta7.io>
2024-09-17 13:44:12 +00:00
Dominic Fischer
9de459c663
Add more thorough I8080 HIL tests (#2173)
* Add I8080 HIL test

* add fixme comment

* fmt

---------

Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-09-17 12:01:27 +00:00
Dániel Buga
cc4c6e1a8e
Tweak xtensa interrupt handling (#2148)
* Tweak xtensa interrupt handling

* Deduplicate peripheral interrupt handling
2024-09-17 08:10:21 +00:00
Scott Mabin
45806dfba0
use esp types in peripheral docs (#2172) 2024-09-16 20:49:07 +00:00
Dániel Buga
65396dda1f
Fix UART when using RcFast clock source (#2170)
* Refactor test_send_receive_different_baud_rates_and_clock_sources

* Don't rely on external connections for UART test

* Enable (failing) RcFast for C2/C3

* Make sure fast clock is enabled
2024-09-16 20:48:25 +00:00
Dániel Buga
87c2741305
Migration guide fixes (#2168)
* Fix use of Input in guide

* Add AnyPin change to guide
2024-09-16 17:47:06 +00:00
Jesse Braham
f496579c3b
Remove the esp-hal-smartled package (#2169) 2024-09-16 17:17:26 +00:00
Dominic Fischer
d44affcbf5
Prevent screen tearing in I8080 example (#2167)
Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-09-16 14:36:21 +00:00
Dániel Buga
2971c08ed4
Fix double writes (#2159)
* Fix double writes

* Only flush if we need to read
2024-09-16 11:22:14 +00:00
Dániel Buga
c9c7aa9253
Slight timer cleanup (#2158) 2024-09-16 11:21:33 +00:00
Björn Quentin
831df5a83c
Be more clear about the esp-alloc feature in esp-wifi's migration guide (#2165) 2024-09-16 11:21:11 +00:00
Dániel Buga
dfb40c0416
Fix overflowing subtraction (#2164) 2024-09-16 10:47:16 +00:00
Dániel Buga
b5dd5aed17
Gpio cleanup (#2157)
* InterruptStatusRegisterAccess

* GpioRegisterAccess

* Remove GpioProperties

* Hide private methods

* Simplify the analog macro

* Fix typo

* Remove unused NMI status read

* Hide ISRA

* Fix macro syntax

* Simplify rtc_pins macro

* Fix type name
2024-09-16 10:14:34 +00:00
Dániel Buga
f48415e717
Fix esp_alloc doc (#2163) 2024-09-16 08:59:21 +00:00
Dániel Buga
2a74addee0
Fix DMA starving SPI (#2152)
* Fix DMA starving SPI

* Simplify cfgs

* Trigger an update before starting transaction

* Do not update after enable_dma, use start_operation
2024-09-13 08:51:31 +00:00
Demo for summer'23
351a64937b
one typo; one misleading comment fixed (#2153)
* one typo; one misleading comment fixed

* agreed simplification
2024-09-12 20:31:24 +00:00
Dániel Buga
562c891ef9
SPI pins are no longer optional (#2133)
* SPI pins are no longer optional, rename DummyPin

* Swap QSPI test expected levels

* Tweak documentation around Level, implement PeripheralOutput

* Fmt
2024-09-12 10:59:12 +00:00
Dániel Buga
515e67092b
Remove PcntSource (#2134) 2024-09-12 08:30:16 +00:00
Danila Gornushko
b5152dcae5
Add esp-alloc to trouble ble example (#2149)
* add esp-alloc to trouble ble example

* rustfmt
2024-09-12 07:11:54 +00:00
Dániel Buga
f8e2341116
Fix pin collision in I2S tests (#2147) 2024-09-12 06:34:31 +00:00
Dániel Buga
e7dab298f5
Rename and wrap ErasedTimer (#2144)
* Rename and wrap ErasedTimer

* Also rename conversion trait
2024-09-11 20:29:21 +00:00
Björn Quentin
24c545db4a
I2C error recovery (#2141)
* Recover from I2C errors (the hard way)

* Adjust test to cover the problematic case

* Replace macro-usage

* CHANGELOG.md entry

* Appease Clippy

* TIL: `Result::inspect_err` exists

* Turn public `recover` into private `internal_recover`
2024-09-11 15:50:25 +00:00
Dániel Buga
7a733a75db
GPIO interconnect (#2128)
* Allow accessing signal list via ErasedPin

* Replace AnyPin with more flexible signal config

* Update tests and examples

* Fix enable_from_gpio value

* Access signals from pin drivers

* DummyPin is not a pin

* Remove redundant public fns

* Various fixes, rename ErasedPin

* Changelog

* rustfmt

* Update i8080

* Typos and endless recursion

* Drop Pin suffix from traits

* Extract AF conversion

* Touch up changelog

* Clean up spi tests

* Refactor pull resistor handling

* Don't disable configured output functionality

* Clean up TODO

* Tweak docs

* Clean up examples
2024-09-11 15:15:55 +00:00
Dániel Buga
f2e0211c1b
Use AtomicPtr, explain caveats (#2110) 2024-09-11 10:39:29 +00:00
Dominic Fischer
127df3c311
Introduce traits for the DMA buffer objects (#1976)
* Introduce traits for the DMA buffer objects

* Move preparation to DMA module for reuse

---------

Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-09-11 10:31:29 +00:00
Juraj Sadel
f374d6a102
Enable SPI_DMA_XX_ASYNC and _PCNT tests on ESP32 and S2, remove GPIO usage from description (#2140) 2024-09-11 10:23:07 +00:00
Björn Quentin
312746fb14
Fix I2S examples (#2139)
* Fix I2S examples

* Fix remaining examples

* Mention asymmetric variant of the `dma_buffers!` macro in the migration guide
2024-09-11 09:11:42 +00:00
Dániel Buga
9f5a57d819
Clean up UART (#2132)
* Clean up

* Add note to significant order of ops
2024-09-10 16:11:00 +00:00
Dániel Buga
dafad9b487
Allow conjuring private::Internal (#2118)
* Allow conjuring private::Internal

* Hide reexport
2024-09-10 14:25:21 +00:00
Björn Quentin
7332f5834a
Fix SPI DMA write/read for ESP32, ESP32-S2 (#2131)
* Fix SPI DMA write/read for ESP32, ESP32-S2

* CHANGELOG.md

* Review comments
2024-09-10 13:23:52 +00:00
Sergio Gasquez Arcos
208339ddeb
fix: Matrix link (#2130) 2024-09-10 11:05:14 +00:00
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