306 Commits

Author SHA1 Message Date
Jesse Braham
a7673b35f7
Remove scan_*_max and scan_n* functions from esp-radio (#3963)
* Remove `scan_*_max` and `scan_n*` functions

* Derive `BuilderLite` for `ScanConfig`

* Update migration guide for `esp-radio`

* Update changelogs
2025-08-20 13:22:26 +00:00
Juraj Sadel
7534606ab6
esp-radio: Hide C-types from public API (#3907)
* Hide C-types from public API

* Add accessories for all events
2025-08-19 13:43:39 +00:00
Scott Mabin
7c944ec939
s/esp-radio-preempt-baremetal/esp-preempt/g (#3938)
* s/esp-radio-preempt-baremetal/esp-preempt/g

esp-preempt will hopefully one day be more useful than just a scheduler
for esp-radio, therefore I've removed the radio prefix for that future
goal. I also felt that baremetal didn't really add much other than
noise, so I've removed that postfix too.

* fix xtask

* remove test code

* fixups
2025-08-15 13:52:42 +00:00
Juraj Sadel
ca4e28da4a
Don't use OTA partition table in radio examples (#3921) 2025-08-12 07:15:16 +00:00
Jesse Braham
8c86bf727a
Restructure example applications into self-contained projects (#3915)
* Move all `embassy` examples to `async` and convert to individual projects

* Move all peripheral examples to `peripheral` and convert to individual projects

* Move all interrupt examples to `interrupt` and convert to individual projects

* Move all `ble` examples to `ble` and convert to individual projects

* Move all `esp-now` examples to `esp-now` and convert to individual projects

* Move all Wi-Fi examples to `wifi` and convert to individual projects

* Move all `ieee802154` examples to `ieee802154` and convert to individual projects

* Move all OTA examples to `ota` and convert to individual projects

* Remove files which are no longer required

* Update `xtask` to handle new examples project layout

* Update `examples/README.md`

* Don't hide TOML parsing error in `is_published`

* Update `fmt-packages` subcommand to handle new examples project layout
2025-08-11 10:22:42 +00:00
Benedikt
ca04263b7b
RMT: Make PulseCode a newtype rather than an extension trait (#3884)
* RMT: make PulseCode a newtype rather than an extension trait on u32

This has several advantages:
- the meaning of `u32` used as pulse code becomes more explicit
- it allows using `PulseCode` methods in `const` context (which is otherwise
  not possible because Rust does not presently support associated const
  fn in traits).
- it allows providing custom `defmt::Format` and `core::fmt::Debug` impls
  for `PulseCode`, greatly helping with debugging

I have taken the liberty to implement `core::fmt::Debug` in a slightly
non-standard way: The most natural implementation would probably use a
struct-style output like

  PulseCode { length1: 42, level1: Level::High, length2: 24, level2: Level::Low }

However, that is very lengthy and not really human-readable anymore when
dealing with an array of `PulseCode`s. Thus, this uses the more compact format

  PulseCode(H 42, L 24)

This provides `u32: From<PulseCode>` and `PulseCode: From<u32>` impls and
converts rx and tx methods to accept `impl Into<PulseCode>` and
`impl From<PulseCode>`, respectively.
This should help to reduce how much user code needs to change (but replacing
`u32` type annotations with `PulseCode` will be required).

By applying `#[repr(transparent)]` to `struct PulseCode`, it is
guaranteed to match the layout of `u32` such that accessing the hardware
buffer via `*mut PulseCode` pointers is valid.

* RMT: Address review on PulseCode refactor, further refine the interface a bit

- introduce Level::const_from and Level::const_into
- pre-compute a few more shifts and masks (this is unlikely to affect
  generated code, since the compiler would have const propagated them
  anyway, but it helps to keep the PulseCode impl more readable)
- improve docstrings
- remove PulseCode::empty in favor of PulseCode::default, keep
  PulseCode::end_marker for now (but it's not completely clear that this
  interface is optimal; see also the FIXME note on adding a variant of
  this methods that supports settings levels and length1)
- make PulseCode::new_unchecked pub and shuffle it around in the code so
  that it doesn't show up first in the docs
- factor out PulseCode::symbolX methods for internal use in debug
  formatting
- sprinkle a few more #[inline] to be totally sure that this really adds
  no overhead over having plain u32
- convert methods receivers from &self to self given that PulseCode is
  Copy (which probably doesn't matter much since all these methods
  should always be inlined)
- remove PulseCode::as_u32() and make the tuple field pub: There's no
  safety implication of marking this pub, and field access still
  provides a const-compatible way to obtain the wrapped value
2025-08-08 07:51:49 +00:00
Björn Quentin
3ab3490d62
Move malloc etc to esp-alloc, common C functions to esp-rom-sys, define "C functions" in esp-radio weak (#3890)
* Provide malloc, free and friends in esp-alloc

* Mute warning

* Remove some (now unused) global symbols

* Have a way to opt-out of esp-alloc's malloc,free etc.

* Fixes

* Move some common C functions from esp-radio to esp-rom-sys

* Fix

* Make esp-readio symbols weakly linked

* CHANGELOG.md

* Align MSRV, cleanup visibility

* Init before `assume_init`

* Linker script fixes

* Fix examples

* Remove heapless - esp-radio is alloc

* Fix examples

* Whitespace

* realloc_internal

* Make `__esp_radio_putchar` a no-op if `sys-logs` is not enabled
2025-08-05 11:58:31 +00:00
Björn Quentin
3c12be8d24
Move exception handler from esp-backtrace to esp-hal (#3887)
* Move exception handler from esp-backtrace to esp-hal

* CHANGELOG.md

* Fix

* Only use defmt compatible display hints

* Workaround xtensa-lx-rt and riscv-rt not implementing defmt::Format

* Add `defmt` feature to xtensa-lx-rt and esp-riscv-rt

* Favor feature gates over random `allow`s - remove unnecessary `allow`s
2025-08-01 07:57:42 +00:00
Juraj Sadel
0fbbe2d22c
esp-wifi: Add unstable feature, mark ble, esp-now, csi, sniffer, and smoltcp features and APIs as unstable (#3865)
* esp-wifi: Add unstable feature, mark ble, esp-now and csi features and APIs as unstable

* changelog

* fix hils

* rebase and reviews

* rebase

* Make at least wifi_embassy_dhcp work without unstable feature

* remove rand_core

* rebase

* Check if a feature is selected which needs unstable

* reviews and fix ci

* reviews
2025-07-31 07:59:05 +00:00
Kirill Mikhailov
66b196a5f8
preempt crates: Rename esp_wifi-prefixed symbols to match new esp-radio crate name (#3881)
* rename `esp_wifi`-prefixed symbols to match new `esp-radio` crate name

* fmt

* rename the rest of functions + example variable renaming

* add migration guide

* reword 😅
2025-07-30 15:17:05 +00:00
Kirill Mikhailov
4eb4c89944
Fold esp-ieee802154 package into esp-radio (#3861)
* folding esp-ieee802154 to `esp-radio`

* remove the package

 Edit monorepo changelog to reflect the ieee-crate changes

* edit readme

* fix cargo.toml

* changelog update

fix changelog entry

* address reviews

* edit changelog

* remove useless "fmt.rs" file

* address reviews

* fix HIL build

sure

oh

fix hashmap inconsistency
2025-07-28 14:31:15 +00:00
Kirill Mikhailov
8ca0f94715
Get rid of EspRadio prefix in esp-radio structs (#3869)
* get rid of `EspRadio` prefix in esp-radio structs

* changelog entry + migration guide entry

* reword entries

* fmt run

* Fix migration guide entry

* edit the changelog entry to still reflect `esp-wifi` changes
2025-07-28 11:40:56 +00:00
Kirill Mikhailov
73ef8d9227
Rename esp-wifi to esp-radio (part 1) (#3858)
* rename `esp-wifi` to `esp-radio`

* Add migration guide entry

* changelog entry

* address reviews

* more fixes

* address reviews

* Thank you for this rebase!

* mmm, rebase

* Remove unnecessary diff

bob

* get rid off all `esp-wifi` references

* drop the links ƒrom the table
2025-07-25 12:26:08 +00:00
Dániel Buga
07214ef80d
Split out preempt driver and default impl (#3855) 2025-07-25 06:35:19 +00:00
HaoboGu
bccd9d770a
Bump embassy-usb version (#3848)
* Bump `embassy-usb` version

Signed-off-by: Haobo Gu <haobogu@outlook.com>

* Add `embassy-usb` update to CHANGELOG.md

Signed-off-by: Haobo Gu <haobogu@outlook.com>

---------

Signed-off-by: Haobo Gu <haobogu@outlook.com>
2025-07-22 13:07:37 +00:00
Dániel Buga
0d9f43db29
Rewrite RNG (#3829) 2025-07-21 15:10:35 +00:00
Simon Neuenhausen
3d6e522cbc
Allow splitting control over modem clocks. (#3687)
* Minimal architecture for split RCC.

* Removed critical section.

* Add all modem clock controllers and adjust esp-ieee802154.

* Fixed incorrect cfg.

* Fixed unstable attribute usage.

* Replaced AtomicU8 with Cell<u8>

* Reverted example channel back to 15

* Added unstable attribute to ModemClockController impls.

* Remember to actually increase the ref count.

* Experimentally removed RadioClockController

* Merged ref counters and made decrease panic if zero is reached.

* Removed RADIO_CLK peripheral.

* Removed RADIO_CLK again.

* Revert "Removed RADIO_CLK again."

This reverts commit 6da2d2834850068aa21bc52b141de2cfd8154acc.

* Removed RADIO_CLK without reformatting the files.

* Applied changes to examples and hil-tests.

* Fixed OS adapter for C2 and H2

* Adjusted docs and used unwrap!

* Fixed comments.

* Added changelog.

* Fixed esp-wifi for esp32h2.

* Changed comment for PHY_CLOCK_REF_COUNTER.

* Fixed lint for esp32c2.

* Update esp-hal/src/clock/mod.rs

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

* Update esp-hal/src/clock/mod.rs

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

* Removed unnecessary comments and made init_radio_clocks unstable.

* Update esp-hal/src/clock/mod.rs

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

* Fixed lint.

* Removed clocks_ll functions for chips that don't have those peripherals.

* fmt

* Changed modem clock controller stealing.

* Added lifetime

* fixed peripheral stealing again

* Made modem_clock_controller not const.

* Used type alias instead of function for peripheral stealing.

* fmt

* Adjusted remaining comments.

* Added note about coex.

* fmt

* misc

* Revert "misc"

This reverts commit d8740421e0dff84af605160939e246f2308a48e1.

* Regenerated esp metadata

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-07-08 17:23:55 +00:00
Dániel Buga
517b5ccbe2
Make cargo xfmt respect the format config (#3739)
* Make cargo xfmt respect the format config

* Make sure comments and doc code have the same width
2025-07-03 08:18:02 +00:00
Dániel Buga
21f1d89f15
Generate peripherals macro call & remove paste (#3713)
* Expand peripheral metadata

* Generate peripherals macro call

* Remove paste from peripherals

* Add missing peris

* Fix ETM and TRACE0 naming

* Remove redundant tsens symbol

* Remove RTCIO stuff from h2

* Rename S2 RTC_CNTL

* Add missing SYSCON back to S2

* Do not mark the GPIO singleton stable

* Treat unlisted drivers as not available

* Assign stability based on driver info

* Fmt

* Remove unused info
2025-07-01 19:31:21 +00:00
Björn Quentin
cc2083fd1a
Introduce esp-rom-sys crate (#3688)
* Move ROM function definitions to esp-hal-rom crate

* Patch ESP32 ROM-functions, use it in esp-storage

* Allow placing additional code in IRAM

* esp-storage depends on esp-hal-rom

* Move ROM function wrappers from esp-hal to esp-hal-rom

* Make bootloader-support crate use CRC ROM function

* Minor polishing

* changelogs

* Make CI green

* Define (some) spiflash ROM functions in esp-hal-rom

* Lint

* Avoid duplicate definition of `__assert_func`

* Rename to `esp-rom-sys`

* Mention versioning this crate in the README

* Fixes

* Check self-version

* Docs

* Clippy

* Check if version bump is allowed

* Unconditionally place spiflash ROM function patches (if present) in rwtext

* Cleanup

* Change how unacceptable version bump requests are detected

* Initial version 0.1.0

* Docs

* Use correct version

* Force esp-rom-sys bumps to patch

* Fix
2025-07-01 13:05:01 +00:00
Benedikt
c71cbcd2c3
RMT: Refactor driver internals (less macros, type-erased channels) (#3505)
* RMT: Move some methods from (Tx|Rx)ChannelInternal to ChannelInternal

Adds a new `ChannelInternal` trait implemented on `Channel`s, which
bundles some methods that conceptually make sense for both rx and tx
channels (whether the implementation is exactly the same is
chip-specific).
This avoids a small amount of code duplication.

* RMT: Define input/output signals via a const array

Allowing a default implementation of the getter functions in the ChannelInternal
trait, and more importantly, paving the way for type-erased channels
(where it will become necessary to map Channel number to signal at runtime).

The array is indexed by ch_index, i.e. the index of the channel among
channels of the same type (for devices with separate rx/tx channels).

* RMT: move some `Sized` bounds from methods to trait

To avoid repetition. There's no downside, since the trait is only
implemented for a single type anyway, which is Sized.

These traits are user-visible, but since they can't be implemented by users,
and this only makes the bounds stricter, it should require not changes
to user code.

* RMT: Use composition with ConstChannelAccess, reduces macro usage

instead of an extension trait implemened via the impl_*_channel macros.
This reduces macro usage, making the code easier to reason about, and it also
paves the way for type-erased channels by adding a second implementation
of RawChannelAccess.

This touches many lines, but is a fairly mechanical change that should
be easier to review by ignoring whitespace changes.

Previously, channel architecture was as follows:

- `Channel` is parameterized by a const generic `CHANNEL: u8` number
- low-level hardware operations are implemented via the
  *ChannelInternal traits directly on `Channel`. This is done via the
  `impl_*x_channel` macros to account for the different channel
  capabilities (rx/tx only or rx+tx)

This PR changes this to:

- `Channel` contains an `Raw: RawChannelAccess<Dir=Rx|Tx>` where `Rx`
  and `Tx` are ZSTs used as markers for a channel configured for a given
  direction.
- low-level operations are implemented on the `Raw` type, depending on
  a bound on RawChannelAccess::Dir
- the `Raw` types can only be constructed safely from the
  `ChannelCreator`, which ensures that only valid combinations of channel
  number and `Dir=Rx|Tx` can exist.
- currently, the only implementation of `RawChannelAccess` is
  `ConstChannelAccess`, which has a `CHANNEL: u8` const generic
  parameter, just as `Channel` did before. Thus, the compiler should be
  able to inline and const-propagate code just as before.

These new types are user-visible. Thus, if code directly names `Channel`
types, it needs to be adapted. If it just uses a method chain such as
`rmt.channelX.configure(...).transmit(...)`, no changes should be
required.

* RMT: rm (Rx|Tx)ChannelCreatorAsync, use mode generic on (Rx|Tx)ChannelCreator

this de-duplicates some code,
and may be useful to implement user code (e.g. setup functions) that is
independent of DriverMode

* RMT: Rewrite pending_interrupt_for_channel using indexed PAC accessors

This deduplicates some code. I've also changed the return type
(usize -> u8) for better consistency, since channel indices are generally
typed as u8.

* RMT: add DynChannelAccess as basis for type-erased channels

Channels can now be `degrade`d to their type-erased variants.

* RMT: Move around some code

The channel definition used to be somewhere in the middle of channel
implementation. There's no change to the code other than its location.

* RMT: slightly more readable subsclicing

* RMT: Move some chip-specific code to a cfg_if! switch

There's no reason for these to reside in separate modules, and this
restructuring meshes well with moving the Rmt definition to a macro as
well, which will be done next.

* RMT: Declare Rmt struct via macro to avoid repetition

Reduces boilerplate at the cost of a somewhat complex macro.

* RMT: Move RmtState

Which was previously in the middle of channel implementation, but
conceptually is more global to the module, thus more natural define
earlier.

* RMT: explicity mark a few private functions in submodule as pub(super)

* RMT: use DynChannelAccess::conjure to simplify async_interrupt_handler

If the compiler decides to unroll the loops, the resulting code should
be essentially the same. Otherwise, it should be more compact. In any
case, from a developer point of view, this is much more concise and
removes one chip-specific case.

* RMT: Use type-erased channels for some HIL tests

* RMT: don't reset clock divider in start_tx

This seems to fix flaky loopback tests where tx/rx pulse code length
differs by 1.

This matches IDF, which also doesn't reset channels on each transmit
operation, but only once on channel creation, and when a sync_manager is
used (which the Rust driver doesn't support, and which would also need
to be handled differently anyway).

* RMT: implement degrade() even if the channel is already type-erased

This makes wrapping channels in custom structs slightly more convenient
since it allows taking any channel and type-erasing it in that structs
constructor.

* RMT: rename (Rx|Tx)ChannelCreator methods to avoid trait disambiguation problems

For devices with channels that support both Rx and Tx, Rust cannot
disambiguate the trait at the call site (because it doesn't look at the
argument types to do so).

Renaming the methods avoids that. The alternative is to use
fully-qualified names to call the trait methods (i.e. left-side
turbofish), or to import the traits only in a limited scope. Both are
much more verbose than the _rx/_tx suffixes to method names.

* RMT: add basic async HIL test

* RMT: remove overcomplicated WithMode trait from tests

according to a suggestion by @bugadani

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2025-06-24 12:11:05 +00:00
Dániel Buga
581eec517e
Do not enable static_cell/nightly (#3676) 2025-06-23 09:43:11 +00:00
Björn Quentin
45248100f4
Simple ota example (#3629)
* Fix esp-bootloader-esp-idf

* Use OTA enabled partition table for examples

* Add simple OTA example

* CHANGELOG.md

* Create a dummy `ota_image` in CI

* mkdir

* Remove unnecessary details from CHANGELOG

* Make non-Window's users life easier

* Test ROM function in esp-bootloader-esp-idf

* Fix
2025-06-13 13:42:09 +00:00
Björn Quentin
3b181a342d
Always show example description before compiling it (#3622) 2025-06-11 08:05:16 +00:00
Juraj Sadel
c6437c7a44
Update examples and qa-test to new bootloader (#3541) 2025-05-26 10:37:41 +00:00
Simon Fondrie-Teitler
a5d7c11c34
Fix example running commands (#3543) 2025-05-23 22:01:14 +00:00
James Sizeland
dcd55a0ab6
Update wifi_embassy_ble.rs (#3539)
* Update wifi_embassy_ble.rs

add reference link to trouble as an easier signpost than duplicating examples here.

* add changelog entry for trouble reference

* add PR ref

* remove changelog ref
2025-05-23 13:02:12 +00:00
Dániel Buga
16897bb68d
Tweak features and dependencies (#3425)
* Group optional dependencies

* Separate version from crate name

* Restore defmt-log mutual exclusivity

* Gate ufmt

* Remove usb-device

* Feature-gate unsable dependencies behind unstable

* S2: assume single core for portable-atomic

* Clean up feature flag docs

* Sack debug

* Fix clippy

* Update examples

* Fix usb-otg feature

* Fix fmt

* Add version to log dep

* Also mark bluetooth private

* Correct changelog/MG

* Clean up esp-hal-embassy

* Clean up ieee802154

* Clean up esp-println

* Move the timestamp function up

* Move info from readme to feature docs

* Clean up esp-storage

* Clean up esp-wifi

* Fix examples

* Add a note for the private features
2025-05-05 11:33:55 +00:00
Dániel Buga
cb4b09fb62
Rework GPIO matrix impl (#3395)
* WIP

* Clean up init_gpio

* Expand docs a bit

* Remove Input/OutputConnection

* Not everything has PCNT and it's not important for the example

* Remove Frozen, enable input when creating the signal

* Hide fields, add getters

* Update MG

* Add force GPIO matrix fns

* Fix formatting

* Mention latency in the docs

* Rename number to gpio_number

* Deduplicate pin setup code

* Reword associated peripheral

* Rename with_inverted_input/output

* Remove link to doc-hidden OutputSignal

* Fix link syntax
2025-04-25 10:33:29 +00:00
Björn Quentin
11ff06a368
Fix esp32 coex (#3403)
* Make sure to enable relevant interrupts

* Fix more

* Make `current_runlevel` public

* Check that interrupts are enabled when initializing

* Try to be more honest in `is_in_isr`

* Adjust log levels

* Really fix ESP32 COEX

* Improve COEX example

* fmt

* CHANGELOG

* CHANGELOG

* Clarify on `esp_bt_controller_config_t`

* Take INTENABLE into account

* Test esp-wifi init fails

* Simplify test code

* Clarify comment

* fmt

* Rename

* Adapt the test

* Revert unrelated changes (esp_bt_controller_config_t)

* Align Xtensa (current_runlevel)

* Additional test

* Change test
2025-04-24 11:39:07 +00:00
Kirill Mikhailov
b33b877592
Bump edition to 2024, bump MSRV to 1.85 (#3391)
* inter-state

* inter-state (2)

* warnings fix

* fix warnings

* fmt + changelogs

* another unsafe extern "C" doode

* real fmt now

* MSRV + format

* Ignore unsafe_op_in_unsafe_fn lint for now in esp-hal and esp-wifi

* msrv + fmt

* ugh....

* get lcd_cam example right

* expr_2021 -> expr experiment

* gagagugu

* reviews

* more unneeded unsafes (help)

* finish esp-hal unsafe cleanup

* each unsafe call is marked separately

fmt

* should be good now (?)

* piece was never an option...

* dumb
2025-04-22 10:39:11 +00:00
Dominic Fischer
7b4b41c0ed
Add DMA memcpy support to the S2 (#3352)
* Expose CopyDmaChannel

* Add DMA memcpy support to the S2

* whoops, esp32 is a thing

* clear can be a no-op

* sigh

* rust

* enable the DMA channel

* The S2 wants RX first...

* fmt
2025-04-09 13:57:15 +00:00
Dániel Buga
0a4089b4d3
Refactor GPIO pin types (#3349) 2025-04-09 08:20:37 +00:00
Dominic Fischer
96daf998c8
Migrate DMA memcpy driver to newer DMA API (#3329)
* Migrate DMA memcpy driver to newer DMA API

* remove irrelevant HIL test

* Relax descriptor lifetime
2025-04-08 08:10:32 +00:00
Björn Quentin
fecd592d57
Basic read partition table functionality, partition "views" (#3316)
* Basic read partition table functionality, partition "views"

* CHANGELOG.md

* Check changelog

* derive defmt

* impl nor-flash

* fmt

* Review comments

* Fix

* Fix

* CI check

* Less unwrap, more tests

* add `fmt.rs`

* Simplify

* Update `fmt.rs`

* (Hopefully) last polishing
2025-04-03 15:19:20 +00:00
Björn Quentin
4f4e063c7a
Remove heapless from esp-wifi (#3317)
* Remove heapless from esp-wifi

* CHANGELOG.md

* defmt

* More defmt derives

* Use new scan API

* Simplify scan result

* Update migration guide

* Back again

* Review comments

* Validate

* Address review comments
2025-04-03 13:33:46 +00:00
Dominic Fischer
4c3c4253ed
Migrate SPI Slave to new DMA API (#3326)
* Migrate SPI Slave to new DMA API

* fix bad merge
2025-04-03 11:30:55 +00:00
Dániel Buga
9db968b473
Remove Peripheral/PeripheralRef (#3305)
* Rework GPIOs without Peripheral/PeripheralRef

* Completely remove Peripheral/Ref

* Remove lifetime from DMA Channel structs

* Try to document changes

* Explain reborrow

* Add lifetime to Instance traits, make them public

* Add Trace to changelog

* Remove lifetimes from Instance traits

* Rewrite section about singletons

* Remove unintended doc comment

* Remove inherent degrade

* Fix reiniting esp-wifi

* Add examples to the root-level docs
2025-04-03 10:40:07 +00:00
Juraj Sadel
dca82d60b1
fix wifi_embassy_access_point example, use interfaces.ap instead of interfaces.sta (#3321) 2025-04-02 09:52:38 +00:00
Björn Quentin
cbdaeb648d
esp-wifi: Move esp-now and sniffer into Interfaces (#3283)
* esp-now interface

* sniffer is now a "wifi-interface"

* Remove Drop from EspNowManager

* Fix

* CHANGELOG.md

* Fix

* Don't silently fallback to EspNowWifiInterface::Sta
2025-03-24 13:02:56 +00:00
David Laban
7a6d381e19
Make wifi_embassy_access_point_with_sta example listen on both network addresses (#3121)
* Make wifi_embassy_access_point_with_sta listen on both network addresses

* turns out it does work on esp32s2

* update example instructions

* whitespace
2025-02-20 09:35:38 +00:00
Dániel Buga
ff2a46dbc8
UART: make async operations cancellation-safe, update others for consistency (#3142)
* Make async operations cancellable

* Handle thresholds

* Fix written amount calculation

* Fix waiting for events

* Don't return 0 bytes, don't modify TX threshold

* Add read_exact implementation

* Fix tests

* Add tests

* Inline constant into the default values

* Make FIFO config stable

* Fix doc links

* Changelog

* Remove duplicate changelog entries

* Check for RX error

* Fix write_async not recalculating available space

* Fix ESP32 timeout loop

* Check the unmasked interrupt bits to actually detect errors

* Improve naming

* Change async handler to not clear interrupt status

* Test and fix case where write_async returned Ok(0)

* Tweak docs

* Address review feedback

* Use embedded_io to fill buffer in test

* Rename
2025-02-20 08:19:55 +00:00
Scott Mabin
07463bfabf
unstabilize Uart::split, globally remove _bytes postfix (#3137)
* unstabilize split, remove unneeded bounds

* remove _byte postfixes, make uart::flush fallible (inline with the async variant), unify read/write logic for inherent impls and trait impls

* fix tests

* changelog and migration

* put trait dm bound on driver structs

* changelog again

* fixups

* fixups

* fix uart tests

* small docs update

* small docs update

* test fix

* rebase fixup
2025-02-17 12:58:04 +00:00
Björn Quentin
0138d462b7
Rethink WiFi API (#3027)
* Rethink WiFi API

* Fix
2025-02-14 10:02:35 +00:00
Dániel Buga
1e58278a6a
Remove redundant macro syntax (#3135) 2025-02-14 08:04:07 +00:00
Björn Quentin
68c660f1c5
CI optimizations (#3129)
* CI Improvements

* Fix

* Lint with stable

* Fix

* Xtensa

* cleanup
2025-02-13 15:20:10 +00:00
Easyoakland
d1fd24fc32
fix #3051: pass attributes through heap_allocator macro (#3133)
* pass attributes through heap_allocator macro

* Update changelog

* use global path in macro

* fix typo.

use 64*1024B of dram2_uninit not 72

* Fix doc example

* Add PR number to changelog
2025-02-13 09:24:01 +00:00
Dániel Buga
392d5ccdc1
Unstabilize CPU-related functionality, merge modules (#3099)
* Move Cpu to a new module

* Move cpu_control's contents into cpu

* Merge raw_core functions

* Hide cpu control APIs

* Move reset into cpu

* Fix software_reset_cpu

* Allow inlining cpu functions

* Changelog

* Mark software_reset no-return

* Move WakeupReason

* Remove PeripheralIter

* Move cpu into system

* Mark system stable
2025-02-07 14:15:26 +00:00
Dániel Buga
8c69e8cb51
Newtype fugit Rate, Instant and Duration (#3083)
* Newtype fugit Rate, Instant and Duration

* Document, remove time::now

* Fix perf

* Tweak docs
2025-02-04 17:23:08 +00:00
Björn Quentin
9a34d0e931
Allow set_power_saving even for coex (#3081)
* Allow `set_power_saving` even for coex

* CHANGELOG.md

* Remove useless migration guide entry
2025-02-03 09:08:11 +00:00