2336 Commits

Author SHA1 Message Date
Dániel Buga
946cbf842e
Fix duration_since_epoch (#3582) 2025-06-02 11:12:44 +00:00
Björn Quentin
68986d375c
Fix ESP32 MAC address from efuse (#3579) 2025-05-30 13:33:20 +00:00
Dániel Buga
d3a303c4be
Use the I2C future on ESP32, add sw timeout for S2 (#3571) 2025-05-30 13:19:01 +00:00
Dániel Buga
5992933ca7
Simplify esp-wifi timer code (#3576)
* Simplify esp-wifi timer code

* Reserve and use FROM_CPU_INTR2 on RISC-V
2025-05-30 11:35:59 +00:00
Björn Quentin
42e239ccf1
Summarize failed CI checks (#3574) 2025-05-30 09:16:10 +00:00
Dániel Buga
3fec3376a4
Disable timer as part of preempt::disable (#3575) 2025-05-30 08:06:17 +00:00
Dániel Buga
79b6464321
I2c: clear bus on error (#3570)
* Make sure connect_pin is not generic

* Allow Driver to access Config

* Implement bus clearing

* Explain that the first ever command needs to be a start

* Extract constant
2025-05-30 06:40:59 +00:00
Kirill Mikhailov
59cfe438fe
change common test pins for esp32 (#3573) 2025-05-29 16:36:16 +00:00
Scott Mabin
e97de69b42
use 1.87 in CI, bump MSRV to 1.86 (#3560)
* use 1.87 in CI, bump MSRV to 1.86

* update API baseline files (rustdoc json format change)

* Add api-baseline regen guide to guidelines
2025-05-29 13:45:22 +00:00
Dániel Buga
f5305a6686
Add i2c blocking timeout test, unwrap results (#3567)
* Add blocking timeout test

* Don't ignore return values
2025-05-29 10:51:49 +00:00
Dániel Buga
13b46968f3
Create new semver baseline on release (#3568)
* Fix bumping renamed packages

* Generate new baseline

* Print PR body if too long

* Extract and test version bump code

* Also handle simple dependencies
2025-05-28 15:05:20 +00:00
Dániel Buga
6a49e9e0cd
Parametrize I2C tests a bit better (#3566) 2025-05-28 10:52:18 +00:00
Dániel Buga
efbd0cb12a
Accept double quotes in docu workflow input (#3565) 2025-05-28 09:26:53 +00:00
Dániel Buga
e5c66e8f98
Disable I2C arbitration (#3559) 2025-05-28 09:15:33 +00:00
Dániel Buga
f203d25cb7
Remove probe speed override for C2 (#3562) 2025-05-27 15:56:55 +00:00
Björn Quentin
7e2f1b1d31
Include uninit in noinit section (#3558)
* Include `uninit` in noinit section

* CHANGELOG.md

* Include `defmt` in flip-link test
2025-05-27 13:06:36 +00:00
Dániel Buga
3f4350d883
Fix an I2C race condition (#3555)
* Remove redundant reset

* Prevent timeout when interrupted
2025-05-27 11:19:07 +00:00
Renken
631b4aab41
Expose ADC asynchronous functionalities where applicable (#3443)
From a user's perspective, logic based on asynchronous ADC
functionalities using esp-hal v0.23 is no longer possible with
v1.0.0-beta.0. This is due to the fact that asynchronous traits used to
implement the latter are gatekept behind a module, called `asynch`,
accessible only to the esp-hal crate itself. As a result, users cannot
write generic logic that requires the implementation of such traits as
they are currently private.

See https://github.com/esp-rs/esp-hal/discussions/3441 for a concrete
example.

Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
2025-05-27 09:19:14 +00:00
Dániel Buga
692b7dddc2
Publish based on release plan (#3542)
* Publish and tag based on release plan

* Update wording

* Update xtask/src/commands/release/execute_plan.rs

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

---------

Co-authored-by: Juraj Sadel <jurajsadel@gmail.com>
2025-05-26 11:37:38 +00:00
Björn Quentin
0f4b29d49d
No need to ref-count wifi anymore (#3550)
* No need to ref-count wifi anymore

* CHANGELOG.md
2025-05-26 11:29:36 +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
Dániel Buga
ff3c5f4bb3
Apply release plan (#3510)
* Execute plan

* Update plan

* dry-run by default

* dry-run version bumps

* Apply skip-changelog label as well

* cleany uppy

* xtask changes for CI doc generation

* Allow running documentation workflow for release PRs

* Build debug xtask

* Fix docs build for esp-config

* Push release PR to upstream

* Fix base url

* Fall back to default manifest if request is not a success

* Build all documentation regardless of its version

* Restore building landing page

* Build with the correct base url

* Avoid deploying the xtask

* Feature-gate documentation-index
2025-05-23 16:02:44 +00:00
Frostie314159
743e4ff3ff
Updated PACs. (#3540)
* Updated PACs.

* Added changelog entry

* Removed git for PACs.

* Removed changelog entry.
2025-05-23 14:35:02 +00:00
Björn Quentin
51e23fe14d
Fix ESP32 PSRAM (in combination with esp-storage) (#3524)
* Fix ESP32 PSRAM (in combination with esp-storage)

* CHANGELOG.md

* Cleanup

* Add test
2025-05-23 14:28:18 +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
c8da165aa5
Prepare a release plan (#3506)
* Add plan subcommand

* Skip binary files when replacing placeholders

* Specify the next step

* Make the plan ordered

* Prevent creating a plan that includes an unpublished crate

* Explain repo_dependencies

* Tweak plan comment

* Check branch during planning

* Tweak logs

* Hint about --allow-non-main
2025-05-22 11:07:57 +00:00
chrysn
60512a3f6d
Update enumset dependency to enable defmt (#3490)
* Update enumset dependency to enable defmt

* fixup! Update enumset dependency to enable defmt
2025-05-21 12:40:15 +00:00
Kirill Mikhailov
c53e0bf788
UART: Adding HW and SW flow control config option (#3435)
* Add HW and SW flow control option

* Fmt + warnings

* changelog entry

wrong unstable macro

* address reviews

* get away with using 1 pin only

* unnecessary function call

* Address reviews + use "byte" instead of misleading "character" (at_cmd)
2025-05-21 10:36:07 +00:00
Dániel Buga
d66b1397a2
Read from Cargo.toml whether a crate is published (#3507) 2025-05-21 09:27:16 +00:00
Dániel Buga
79ac43ca3d
Also update renamed packages (#3502) 2025-05-20 13:57:28 +00:00
Dániel Buga
74c1f13e1f
Move release-related code to their own module (#3501) 2025-05-20 13:15:53 +00:00
Benedikt
fe25980e53
RMT: Minor cleanups, simplify address calculations, extend HIL test (#3477)
* RMT: simplify/avoid a few cfg attributes

* RMT: factor address calculation into new function channel_ram_start()

* RMT: don't repeatedly read *ChannelInternal::memsize()

Moving this into separate variable greatly increases readability of the
code. It also avoids unnecessary repeated volatile reads of the
corresponding register.

* RMT: rework SingleShotTxTransaction offset calculation

This is not a big simplification yet, but will help will help with
simplifying the somewhat obscure `ram_index` calculation.

* RMT: rework SingleShotTxTransaction offset calculation, part 2

This removes the somewhat hard to parse
    let ram_index = (((self.index - memsize) / (memsize / 2)) % 2) * (memsize / 2);
calculation, by resorting to the ping-pong method also used by the idf
code.

Importantly, even with the previous code, ram_index cannot in fact assume any
possible in-range value in channel RAM, but only either 0 or memsize / 2
(except at the end of a transaction, when there's no data left).

Thus we can update it via
    ram_index = memsize / 2 - ram_index
such that will alternate ("ping-pong") between 0 and memsize / 2.

* RMT: error out on config.memsize == 0

* RMT: fix bogus cfg attributes

This is inside of a #[cfg(any(esp32, esp32s2))] block, so esp32s3 can
never happen: The result of nested cfg attributes was still correct, but
writing it like this doesn't make any sense.

* RMT: remove unnecessary integer literal type annotation

* RMT: remove spurious code from clear_interrupts()

- update() is known to be a no-op here
- For other chips, resetting pointers and setting mem_owner is not done
  in clear_interrupts(), but in start_rx. clear_interrupts() is only used in
  situations where either the channel was unused before (i.e. should be
  stopped), or we explicitly called Self::stop() before. Thus, match
  other chips here.

* RMT: clear mem_owner in start_tx

While I haven't seen this happen, it appears to be possible that one of
the subsequent channels (or even the current channel) was used for RX before.
Thus, ensure that mem_owner is set correctly for TX.

* RMT: small refactoring

There should be no functional change, but this should make it even more
obvious that the return value is exactly the number of codes written.

* RMT: in SingleShotTxTransaction, improve error handling

I haven't seen any error here in practise, but it seems that this could
have locked up in the `while !is_threshold_set()` loop before in case of
an error or early stop code in the data.

* RMT: avoid one register access

* RMT: update HIL tests to use wrapping and extended RAM

* RMT: address review regarding data-writing loops

Make the code less startling by performing writes to the hardware in a
more imperative style via the for-loop; slightly refactor slice
splitting.

* RMT: Update changelog
2025-05-20 13:11:26 +00:00
Dániel Buga
3d29a8765a
Add a version placeholder and replace on version bump (#3485)
* Use a version placeholder in MGs

* Replace version placeholder in package files

* Document bump-version better
2025-05-20 11:58:49 +00:00
Dániel Buga
f782b06326
Validate dependencies before bumping crate version (#3483)
* Extract BumpedPackage

* Validate dependencies before bumping crate version

* Clean up

* Remove redundant write
2025-05-20 10:12:58 +00:00
Dániel Buga
aeaab9a95b
Give more time to ECC tests (#3500) 2025-05-19 14:46:06 +00:00
Mateusz
1e0a5b3381
Added UartInterrupt::RxTimeout support (#3493)
* feat: add UartInterrupt::RxTimeout listen support

* add missing RxTimeout checking in `fn interrupts()`

* update changelog

* fix PR id
2025-05-19 13:31:15 +00:00
Robin Mueller
466dcc2a15
allow stealing the RMT channel creator + Drop bugfix (#3496) 2025-05-19 08:49:41 +00:00
Dániel Buga
74de9d65d6
Update allocator_api2 (#3487) 2025-05-19 07:38:07 +00:00
Dániel Buga
fbdb99ec6a
xtask: Bump version in changelog, add check-changelog (#3478)
* Parse and update changelog on version bump

* Add check-changelog

* Fix changelogs

* Check changelog format in CI

* Fix log string

* Update readme

* Add tests, remove empty changelog groups
2025-05-19 07:15:47 +00:00
Danila Gornushko
ec035d7a9c
Remove the Unused section for esp-alloc stats (#3486)
* remove the Unused section for esp-alloc stats

* added changes to the CHANGELOG.md
2025-05-19 07:15:31 +00:00
Björn Quentin
7b7844a855
Semver-Check (#3439)
* Semver-Check

* Clippy

* Improve

* Fix

* Adjust log level

* Add initial API baseline

* CI

* Fix

* Docs

* Debug CI

* Honor CARGO_TARGET_DIR

* Compressed API baseline

* Renaming

* Refactor

* Move code to commands mod

* Prepare for 1.85

* Address review comments

* Simplify
2025-05-09 14:40:42 +00:00
Dániel Buga
00e1cf7d7d
Extract bump_version code (#3472) 2025-05-09 11:05:06 +00:00
Dániel Buga
5b842231f5
xtask: Tweak dependency updates (#3471)
* Do not add version to a dependency that does not specify it

* Also bump dependencies in examples/tests

* Also update build and dev dependencies
2025-05-09 09:16:17 +00:00
Dániel Buga
3d7d6f8453
Deduplicate error handling (#3481) 2025-05-09 09:15:09 +00:00
Dániel Buga
e2a9fc7437
Try to fix timeout errors when the I2C driver is preempted (#3458)
* Add test case

* Check completion before error
2025-05-08 15:05:22 +00:00
Björn Quentin
29060aee6a
Enable problem-matchers in CI (#3480) 2025-05-08 13:07:51 +00:00
Dániel Buga
8271760498
Increment beta version (#3470) 2025-05-08 12:25:57 +00:00
Björn Quentin
123544deb7
Group CI output (#3476) 2025-05-08 12:22:50 +00:00
Benedikt
710a0b996f
RMT: Simplifications and fixes for extended channel RAM (#3453)
* RMT: Remove duplicate conditionals

The next check,

    config.memsize > NUM_CHANNELS - T::CHANNEL

just below includes this case and exits with the same error.

* RMT: move chip-specific code to chip_specific modules

Moves configure_clock and clear_memsizes from Rmt methods to the chip_specific
sub-modules:

- configure_clock dispatches to functions from chip_specific anyway,
  using the same #cfg attributes as the chip_specific module
- clear_memsizes also uses the same #cfg attributes, and it deals with
  low-level register access, which is generally contained in the chip_specific
  module

* RMT: small refactor of divider calculation using let-else

The same check as before, but slightly more concise, and getting rid of
the explicit cast.

* RMT: simplify is_memory_blocks_available and set_memory_blocks_unavailable

by removing unnecessary checks for special-case values that actually behave the
same as the general case that is handled in the loops

* RMT: merge is_memory_blocks_available and set_memory_blocks_unavailable

Both are only used in conjunction anyway.

There's a TOCTOU issue here: ChannelCreator is Send + Sync, so it can be
used from ISR context or on different cores for multicore targets.
This commit does not address that yet, but is a first step to fixing the
race condition, which would require making the check-then-modify atomic
(atomic per channel would probably be sufficient).

* RMT: move reserve_memory from trait to chip_specific module

Mainly, this also fixes incorrect indexig of ch_tx_conf0, ch_rx_conf0
for some chips (esp32s3, esp32c3, ...).

It also allows for some deduplication of the logic in reserve_memory.
Generally, since this function deals with the collection of all channels
rather than just a single one, it feels more natural to move it to the
module rather than the per-channel trait.

* RMT: avoid race condition via critical_section

This is not a great solution, but resolving this in a better way seems
to require more design work: The PAC crates don't seem to provide atomic
CAS operations on registers, thus it is not easily possible to reserve
the memory belonging to another channel than the current one without
causing a race condition: Another channel could be used to concurrently
reserve the same memory, either from an ISR context, or from another
core on multi-core chips.

* RMT: Release channel RAM on Channel drop

This should allow it to be re-used, either by other subsequent channels,
or by the initial channel if it was used for a non-'static lifetime and
is re-initialized.

* RMT: add global STATE and use it to control channel RAM access

Right now, this removes the use of critical_section previously
introduced as a stopgap solution to a race condition.

It will generally be useful to track state in a global static atomic for adding
fully interrupt-driven transfers later on.

* RMT: Fix regression form #3292 where tx transaction doesn't write
enough data

The idea is to fill half of the available RAM in on each threshold
event. Increasing the amount of available RAM in this calculation was
forgotten when adding support for extended channel RAM.
2025-05-08 12:05:06 +00:00