1905 Commits

Author SHA1 Message Date
Björn Quentin
f247b4099c
Remove flip-link feature, replace by flip-link option (#3001)
* Fix renamed config options

* Make `flip-link` feature into a config-option

* Remove `psram-quad`/`psram-octal` - replaced by `psram`

* Changelogs

* Fix

* Add `esp_config::Validator::Enumeration`

* Fix HIL-tests

* HIL: use octal psram for the S3

* Fix xtask

* xtask

* examples

* Make `spi-address-workaround` only available on ESP32

* Always allow `cfg(spi_address_workaround)`

* Make config-options valid for all targets
2025-01-23 15:21:46 +00:00
Dániel Buga
e842ec4c6c
Slight GPIO cleanup, un-stabilize Io (#3021)
* Clean up, add fixme

* Destabilize Io, add inherent set_interrupt_handler

* Explicitly mark functions, not the impl block
2025-01-23 15:02:11 +00:00
Juraj Sadel
2bb0a55cd3
Introduce PinGuard and reconnecting an output signal to a different pin now clears previous connections (#3012)
* wip

* Fix and clean up

* Introduce PinGuard and reconnecting an output signal to a different pin clears previous connections

* Add demft for PinGuard

* Keep pins around in SpiDma

* Simplify i2c

* Changelog

* Clean up

* Don't use PeripheralRef directly

* Handle RTS pin

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-01-23 14:04:09 +00:00
Kirill Mikhailov
fc2815b9fc
gpio, spi and i2c::master cleanup, smaller updates (#3010)
* `gpio` and `i2c::master` cleanup, smaller updates

fmt

* spi docs update

* fmt

* alter `split` doc example for different pin types

* address reviews

* adjust to changes after rebase
2025-01-23 12:27:01 +00:00
Björn Quentin
16af010e71
esp-wifi: fix possible deadlock (#3015)
* Fix possible deadlock

* CHANGELOG

* avoid `mem::forget`
2025-01-22 14:21:54 +00:00
Jesse Braham
4ea6b76f0a
Add configuration structs for GPIO drivers, make constructors fallible (#2990)
* Add configuration structs for GPIO drivers, make constructors fallible

* Update all examples and HIL tests to use new GPIO driver API

* Update migration guide

* Update `CHANGELOG.md`

* Fix errors

* Add `apply_config` functions

* Fixes
2025-01-22 14:20:06 +00:00
Kirill Mikhailov
67c9159176
Add separate config for Rx and Tx (UART) (#2965)
* wip

* wip2

* derive Default for Config and TxConfig

* Roll back changes related to SharedConfig

* fmt

* sure

* Changelog + migration guide entry

* `tx.apply_config(&TxConfig)` -> `tx.apply_config(&Config)`

 to be consistent

* address review

* Reflect the removal of the rx prefix in migration guide

* reviews + rebase
2025-01-22 09:58:29 +00:00
Dániel Buga
ae35b465bf
Fix DMA not having data available in time (#3003)
* Fix DMA not having data available in time

* Fix not registering I2S interrupts when only using TX
2025-01-21 20:28:15 +00:00
Kirill Mikhailov
3cb90cba62
UART documentation fixes (#2996)
* UART documentation fixes

* reviews

* sure

* reviews
2025-01-21 17:23:15 +00:00
Dániel Buga
537829df36
Remove Deref to pac register block from peripheral singletons (#2956) 2025-01-21 14:12:27 +00:00
Zach Grimaldi
9e4cbbd316
fix: default uart tx_idle_num to 0 (#2859)
* feat: uart configurable `tx_idle_num`

* fix: remove extraneous setter

* fix: use `ConfigError` instead of `assert!`; clarify unit of bit time

* fix: remove unneeded assert

* chore: revert by updating to newest main

* fix: just set to 0

* fix: unsafe on the register modification

* Fix changelog

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-01-21 12:26:57 +00:00
Dániel Buga
5ec8be4af2
Fix LCD_CAM disabling its clocks (#3007) 2025-01-21 10:31:20 +00:00
TheTechRobo
53ba3ce95d
Add support for 32MB flash (#3004)
This doesn't seem to be listed on the "Firmware Image Format" page in
the docs, but it follows the pattern of the other values.

Confirmed working on my ESP32-S3-WROOM-2 with 32MB flash.
2025-01-21 07:34:10 +00:00
Dániel Buga
04ba779f2d
Async: !Send (#2980)
* Actually add inherent set_interrupt_handler fns

* Mark Async drivers !Send
2025-01-20 18:31:02 +00:00
Sergio Gasquez Arcos
9ab751f55f
Update I2C module documentation (#3000)
* feat: Avoid raw md link

* docs: Improve i2c master docs

* fix: Typo

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

---------

Co-authored-by: Juraj Sadel <jurajsadel@gmail.com>
2025-01-20 16:03:32 +00:00
Benedikt
d1ee2ba733
RMT: Small cleanups (#2991)
* rmt: remove unnecessary generic parameter from *ChannelInternal

* rmt: minor cleanup of clock configuration

simplify usage of cfg attributes

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-01-20 10:46:58 +00:00
flippette
6a8bcfa8df
make esp_wifi::init take impl Peripheral for the RNG source (#2992)
* implement Peripheral<P = Self> for Rng and Trng

* make esp_wifi::init take impl Peripheral for RNG source

* implement Sealed for Rng and Trng

* use Copy impl for Rng in Peripheral::clone_unchecked
2025-01-20 10:45:41 +00:00
Dániel Buga
0894e301c9
Replace pointer derefs with regs function (#2974)
* Do not mix peripheral singletons with PAC types

* Replace pointer derefs with regs function
2025-01-20 08:30:05 +00:00
Dániel Buga
18ef297a47
Remove RtcPin trait impls from Flex (#2938) 2025-01-17 16:41:28 +00:00
Björn Quentin
5f2c0ec5f2
Support 3-wire-SPI (#2919)
* Support 3-wire-SPI

* CHANGELOG.md

* Remove 'Error::ArgumentsInvalid', more docs

* Rebase Fix

* `DataMode::Single` -> `DataMode::FourWire`

* Rename, again

* docs wording

* Honor ESP32

* Have some testing for DataMode::Single

* Mark `with_sio0/1` unstable
2025-01-17 16:34:34 +00:00
Sergio Gasquez Arcos
c88dbefff8
Avoid using nb::Result as a return type (#2882)
* feat: Avoid using nb::Result in spi

* feat: Avoid using nb::Result in hmac

* feat: Avoid using nb::Result in sha

* feat: Avoid using nb::Result in usb_serial_jtag

* feat: Avoid using nb::Result in adc::read_oneshot

* feat: Avoid using nb::Result in rsa::ready

* feat: Avoid using nb::Result in timer::wait

* feat: Avoid using nb in uart and twai. Udpate examples and tests to avoid using block!

* feat: Block on sha calls, remove Option<> results

* feat: Block on hmac calls, remove Option<> results

* fix: Clippy lints

* feat: Block on spi calls, remove Option<> results

* feat: Block on timer calls, remove Option<> results

* feat: Block on twai calls, remove Option<> results

* docs: Fix wait docstring

* feat: Remove embedded_hal_nb traits

* feat: Block on uart calls, remove Option<> results

* feat: Remove nb stuff from usb_serial_jtag

* feat: Block on rsa calls, remove Option<> results

* feat: Clippy lints

* feat: Make read_bytes return how many bytes it read from the fifo and fix docs/tests

* fix: run_test_periodic_timer test

* feat: Only remove nb from stabilizing drivers

* feat: Remove unused functions

* feat: Remove emnbedded-hal-nb

* test: Adapt tests

* docs: Update changelog and migration

* test: Adapt tests

* docs: Update migration guide

* docs: Update migration

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

* docs: Update changelog and migration guide

* feat: Make `write_bytes` return an Result

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-01-17 15:46:20 +00:00
Tomasz Kramkowski
48b52e087b
0.22 migration document additions/fixes (#2986)
* fix small typo

* Adjust `new_with_config` removal example

Remove the `config` parameter construction as it has changed and is not
relevant to this example.

* Mention builder lite

* Mention `Spi` enum prefix removal

* Remove `new_with_config` from unrelated examples

* Code block fix `dif` -> `diff` typo
2025-01-17 15:45:59 +00:00
Björn Quentin
5d0145eca9
esp-wifi: Late enable BT interrupts (#2981)
* Enable BT interrupts AFTER setting the callback

* Reduce logging level

* Use published `edge-*` crates

* CHANGELOG.md
2025-01-17 15:45:26 +00:00
Dániel Buga
40d552fd7b
Create newtypes for all PAC peripherals, mark unstable peripheral singletons (#2957)
* Create newtypes for all PAC peripherals, mark unstable peripheral singletons

* Hide unstable singletons
2025-01-17 15:20:34 +00:00
Benedikt
2105ba0f81
RMT: Use gpio::Level for carrier and pulse levels (#2989)
* rmt: Use gpio::Level instead of bool to specify output levels

* rmt: Use gpio::Level for PulseCode::level{1|2}
2025-01-17 11:58:34 +00:00
liebman
da7dda37a8
i2s: fix pin offset for 8bit parallel on i2s1 (#2886)
* i2s: fix pin offset for 8bit parallel on i2s1

* i2s: fix pin offset for 8bit parallel on i2s1

* changelog

* changelog

* fix changelog
2025-01-17 10:36:06 +00:00
Benedikt
e150a537fc
rmt: don't use the paste! macro (#2976)
There's no need for it, the PACs have accessor methods that take channel
indices (which were already used in a few places).
2025-01-17 09:08:51 +00:00
Dániel Buga
3fac1979d0
Add repr(C) to DmaDescriptor, allow unstably constructing dma::Channel (#2988)
* Add repr(C) to DmaDescriptor

* Allow creating DMA channel drivers
2025-01-17 08:55:18 +00:00
Benedikt
81382bafc7
RMT: Implement builder-lite for {Rx|Tx}ChannelConfig (#2978) 2025-01-16 17:48:22 +00:00
Taiki Endo
0120cb3ecc
Fix esp-println build failure when critical-section feature is disabled (#2979) 2025-01-16 17:07:28 +00:00
Dániel Buga
a50ce4f8a1
Fix low_power_wait (#2975) 2025-01-16 17:06:18 +00:00
Benedikt
866dc91cc6
Rmt: Improve codegen for enable_listen_interrupt (#2960)
* rmt: consolidate listen_interrupt() calls

such that they reduce to a single load/modify/store operation

* rmt: avoid EnumSet::iter for better codegen with optlevel=s

This iterator generates relatively complex code, which is not reliably
reduced to the intended simple memory access, even if the `events`
argument is constant at compile time. Rather, the loop might be
retained, which is inefficient and leads to much larger code.

Tested on riscv using cargo objdump, with the following cargo profile

[profile.release]
codegen-units = 1
debug = true
debug-assertions = false
incremental = false
lto = 'fat'
opt-level = 3|'s'
overflow-checks = false
2025-01-16 17:05:44 +00:00
Benedikt
6583f1c617
docs: RMT_CHANNEL_RAM_SIZE counts pulse codes, not bytes (#2955)
checked all values against the technical reference manuals
2025-01-16 17:04:59 +00:00
Dániel Buga
660e43effa
Do not rerun CI when a PR is marked ready (#2958) 2025-01-16 11:37:01 +00:00
Scott Mabin
224c38ff66
xtask depends on esp-metadata which has a MSRV of STABLE (currently 1.84) (#2977) 2025-01-16 10:46:39 +00:00
Scott Mabin
4b66e3dba7
prepare for esp-hal@0.23.1 (#2966) v0.23.1 esp-wifi-v0.12.0 2025-01-15 16:39:12 +00:00
Dániel Buga
7ea1296fe9
Fix warnings & clean up (#2961)
* Fix precedence warnings

* Clean up

* Try to catch documentation warnings

* Deny rustdoc lints, fix issues

* Check documentation for wifi and embassy

* Fix h2
2025-01-15 16:00:27 +00:00
Dániel Buga
04f62ec36d
Fix priority locks on RISC-V (#2964)
* Use normal interrupt lock when priority==max

* Fix priority locks
2025-01-15 15:04:33 +00:00
Jesse Braham
4ec3731519
Remove extraneous keyword from Cargo manifest (#2962) 2025-01-15 12:23:29 +00:00
Jesse Braham
59a2c17a52
New package releases (#2959)
* Fix some styling issues in top-level README.md

* Update package dependencies and bump version numbers

* Update each `CHANGELOG.md` file for packages to be published

* Update `esp-hal` migration guide

* Fix typo in `esp-hal` changelog
v0.23.0
2025-01-15 11:37:36 +00:00
Dániel Buga
240f79021d
Define a stable set of SPI tests (#2934) 2025-01-15 10:05:19 +00:00
Dániel Buga
571760884b
Update our time driver for upcoming embassy changes (#2701)
* Add a timer-driven task

* Spawn another timer

* Log

* foo

* Do not access current time on each schedule

* Update generic queue

* Minimize alarm priorities

* Point to github with patches

* Fix build without any queue impl selected

* Remove explicit generic-queue features

* Define cfgs, fix calling something uninitialized

* Clean up RefCell+generic queue

* Fix arg order

* Feature

* Fix single integrated-timer queue

* Fix next expiration when arming

* Add note

* Adjust impl to latest changes

* Local patch

* Refactor the refactor refactor

* Track the timer item's owner

* Clear owner on dequeue

* Clean up

* Point at the right branch

* Fix panic message

* Hide private function

* Remove integrated-timer references

* Point at upstream embassy

* Configure via esp-config

* Document, clean up, fix

* Hack

* Remove patches

* Update config separator, test the complex variant

* Undo esp-config hack

* Remove trouble example, update edge-net

* Update test deps

* Document

* Update bt-hci.

* Fix generic queue

* Fix panic message

* Fix UB

* Fix rebase

* Resolve UB

* Avoid mutable reference in interrupt executor

---------

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2025-01-14 16:17:58 +00:00
Björn Quentin
5e05402e98
I2c addr (#2864)
* I2C: prepare to support 10-bit addresses later

* Introduce I2C Timeout enum

* Migration guide

* CHANGELOG.md

* Timeout::Maximum

* Internal Enum

* Check timeout

* Address review comments

* Timeout -> SclTimeout

* Remove `as_u8`

* Implement idea from review

* Review

* Renaming

* Fix migration guide

---------

Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
2025-01-14 14:16:02 +00:00
Dániel Buga
2da7cbc812
Unstabilize AtCmdConfig (#2953) 2025-01-14 13:02:37 +00:00
Jesse Braham
e6c38c59b7
Bump MSRV of all packages to 1.84, add MSRV policy to each README.md (#2951)
* Various top-level `README.md` updates

* Set MSRV to 1.84.0 for all packages

* Add MSRV policy to each `README.md`

* Update each `CHANGELOG.md`
2025-01-14 11:01:28 +00:00
Dániel Buga
4e70ad6ced
Minor pre-release cleanup (#2950)
* Default-enable unstable features until 1.0

* Update delegate
2025-01-14 10:29:59 +00:00
Kirill Mikhailov
398555ee73
Avoid public API changes due to config options. (#2945)
* csi_enable: from option to feature

* fix

* enable feature for example

* migration guide update

* changelog entry

* address reviews
2025-01-14 09:53:45 +00:00
Björn Quentin
8fb9fbddd5
ESP32-S3: Fix PSRAM start address calculation (#2880)
* ESP32-S3: Fix PSRAM start address calculation

* Change code for clarity

* Explain

* Link to esp-idf docs
2025-01-14 08:57:05 +00:00
Juraj Sadel
0bf6e4606b
i2c_master: Add interrupt APIs (#2944)
* i2c_master: Add interrupt API

* changelog
2025-01-14 07:23:51 +00:00
Björn Quentin
732c442c24
Main macro (#2941)
* Re-organize code

* Update dependencies

* Introduce `esp_hal::main` macro

* Migration Guide

* CHANGELOG.md

* Move around

* Remove redundant features, improve error message

---------

Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
2025-01-13 17:08:47 +00:00