Commit Graph

1553 Commits

Author SHA1 Message Date
Dániel Buga
d5afeeddc8
H2: enable TWAI, enable delay test (#2199)
* Add TWAI support for H2

* Enable delay test on h2

* Also enable example

* Changelog

* De-CAN the example
2024-09-20 07:04:52 +00:00
Dániel Buga
5de267ab09
Fix known SPI issues (#2179)
* Re-enable tests

* Clean up

* Pass two lengths to configure_datalen

* Add Dominic's test changes

* Ensure DMA buffers are properly aligned

* Impl Format on DmaDescriptor

* Fix waiting for transaction to complete

* Fix DMA transfers

* Changelog

* Avoid explicit panic in test case

* Remove redundant test case

* Reintroduce wait for ESP32
2024-09-19 18:00:50 +00:00
Scott Mabin
ba63beb3b2
Move binary logging to sys crate (#2183)
* Move binary logging to sys crate

* make ieee take radio clks by value

* rename wifi-logs to binary-logs and fix compilation

* update sys to use correct size types

* move rtc_clk_xtal_freq_get to esp-hal

* changelogs and migration guide

* s/wifi-logs/sys-logs/g

* activate log features for esp-wifi-sys

* ble log fix c2

* fix logs using latest sys rev

* fix warning
2024-09-19 15:19:54 +00:00
Dániel Buga
25eff6a255
Enable I2S tests on ESP32 and work around first sample issue (#2194)
* Enable I2S tests on ESP32 and work around first sample issue

* Fix sample->channel assignment inconsistency

* Add to changelog
2024-09-19 15:13:25 +00:00
Scott Mabin
d9d771706f
esp-config (#2156)
* Initial esp-config poc, replacing the place-spi-driver-in-ram feature

* Allow documentation generation for configuration options

* add `Value::Number` and a macro to parse

* Add Value::String and replace esp-wifi's config

* repo maint

* make bool parsing stricter and number parsing more flexible

* use hand rolled const str to int

* Collect unknown config options

* friendly errors

* also batch invalid values

* dump msrv to 1.79

* Mention perf boost from disabling logging

* review suggestions

* output selected config

* changelogs and migration guides

* review feedback

* avoid multiple case conversions where possible

* refactor generate, fix bug, add full test

* run host tests in CI

* add more esp-config tests

* review comments

* add cargo env workaround
2024-09-19 08:58:29 +00:00
Dániel Buga
46be3b19b5
Some minor I2S cleanups (#2190)
* Clean up rx_start

* Improve readability of register manipulation

* Enable failing tests on ESP32

* Improve consistency

* Merge tests

* Disable ESP32 for now

* Clean up some cfgs

* Avoid as pointer-casts

* Inline wait_for_dma_done

* Remove a level of indirection

* Fix typos

* Resolve questionmarks
2024-09-19 07:33:52 +00:00
Dániel Buga
f765a6b094
Remove Debug2Format from esp-hal (#2184) 2024-09-18 19:53:19 +00:00
Dániel Buga
c0a9934e62
Pass --verify when running HIL tests (#2188) 2024-09-18 14:39:35 +00:00
Dániel Buga
b1ca30e404
Disable problematic ESP32 test (#2185) 2024-09-18 13:58:54 +00:00
Dániel Buga
d9532bbba7
Fix and enable I2S tests on ESP32-S2 (#2181)
* Fix PDMA channels, use peripheral signal instead of external connection

* Fix i2s test setup for esp32s2
2024-09-18 09:43:37 +00:00
Dániel Buga
344ee133bc
Move SPI tests into the same file (#2177)
* Implement Peripheral for Level

* Move SPI tests into the same file

* Fix test on H2

* Also fix C6 signal numbers
2024-09-18 07:08:51 +00:00
Dániel Buga
fc92beebe6
Guide: Clarify that Level can be used as an output signal (#2176)
* Clarify that Level can be used as an output signal

* Implement Peripheral for Level
2024-09-18 07:01:16 +00:00
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