Commit Graph

8897 Commits

Author SHA1 Message Date
Anthony Grondin
ae5b78b27a
feat(embassy-net): Implement wait_recv_ready() + wait_send_ready() for UdpSocket
- Provides `pub async fn wait_recv_ready(&self) -> ()` and `pub fn poll_recv_ready(&self, cx: &mut Context<'_>) -> Poll<()>`.
This allows polling / waiting on a socket until it can be read, without dequeuing any packets.

- Provides `pub async fn wait_send_ready(&self) -> ()` and `pub fn poll_send_ready(&self, cx: &mut Context<'_> -> Poll<()>`
This allows polling / waiting on a socket until it becomes writable.
2024-09-24 22:01:49 -04:00
Dario Nieuwenhuis
af6fbb0ee1
Merge pull request #3371 from CBJamo/rp23_pwm_b_pin
rp23: Disable pad isolation on PWM A pins.
2024-09-24 23:04:56 +00:00
Caleb Jamison
b743dce8e4 Only B pins can be inputs. 2024-09-24 18:55:05 -04:00
Caleb Jamison
a498bf11af Disable pad isolation on PWM A pins.
Also fixes minor bug for 2040 where A pins didn't have their pull
up/down enabled.
2024-09-24 18:45:20 -04:00
Peter Krull
5e1912a2d3 Reverse generics order, remove spin_get 2024-09-24 12:37:32 +02:00
Peter Krull
999807f226 Added SealedWatchBehavior to limit access to core functions 2024-09-23 20:29:50 +02:00
Peter Krull
a669611d7c Discontinue peek, add AnonReceiver 2024-09-23 20:09:35 +02:00
Dario Nieuwenhuis
0ede8479dc
Merge pull request #3367 from CBJamo/rp2350_debug_pin_fix
Fix rp2350b pins >31 on debug builds
2024-09-23 17:41:19 +00:00
Caleb Jamison
0b8c4587c2 Fix rp2350b pins >31 on debug builds 2024-09-23 13:38:43 -04:00
Peter Krull
a2c473306f
Merge branch 'embassy-rs:main' into multi-signal 2024-09-23 19:02:59 +02:00
Ulf Lilleengen
2935290a62
Merge pull request #3366 from kingofpayne/main
Fixed signature script in bootloader documentation
2024-09-23 15:08:22 +00:00
Olivier Hériveaux
05d453bfd8 Fixed signature script in bootloader documentation 2024-09-23 16:11:45 +02:00
Ulf Lilleengen
81573b1a6d
Merge pull request #3364 from hansihe/fix-fdcan-preemption-dequeued-frame-return
Fix return value of `fdcan` `write`
2024-09-23 08:09:17 +00:00
Dario Nieuwenhuis
e70b7099f1
Merge pull request #3363 from embassy-rs/spi-word-tests
stm32/spi: fix non-u8 word sizes, add tests.
2024-09-23 00:17:08 +00:00
Dario Nieuwenhuis
a71098d824 stm32/tests: test spi u8 and u16 word sizes. 2024-09-23 02:06:58 +02:00
Dario Nieuwenhuis
fb0afa8a0f stm32: update metapac. Fixes SPI version on L0. 2024-09-23 02:06:58 +02:00
Dario Nieuwenhuis
68b783aedf stm32/spi: fix hang/corruption of word sizes other than 8bit. 2024-09-23 02:06:58 +02:00
Dario Nieuwenhuis
59dcffbc60 stm32/gpdma: clear tr3 just in case. 2024-09-23 02:06:58 +02:00
Dario Nieuwenhuis
f2f96a731c stm32/gpdma: ensure bndt in bytes doesn't overflow. 2024-09-23 02:06:58 +02:00
Dario Nieuwenhuis
9705f3332b
Merge pull request #3337 from doesnotcompete/feature/h7rs-usb
Add OTG_HS support for STM32H7R/S
2024-09-22 23:56:17 +00:00
Dario Nieuwenhuis
b9553badb3
Merge pull request #3362 from showier-drastic/main
stm32/spi: issue correct DMA word length when reading to prevent hang
2024-09-22 19:39:47 +00:00
Hans Josephsen
e2d2b0f362 Currently the return value of write is broken, it never returns the
previous frame even when present.

This happens because a slice of length 64 is always passed to Frame::new
from within the `abort_pending_mailbox` function, causing `Frame::new`
to return None.

The fix is to take a subslice of length `data_length`.
2024-09-22 12:40:46 +02:00
Shaw Drastin
db31e36485 stm32/spi: issue correct DMA word length when reading
Currently, when calling read() of the SPI bus, DMA always transmits u8,
which will cause hang if SPI transfer size > 8bit. Use matching word
size for TX DMA instead.
2024-09-22 11:13:10 +02:00
Dario Nieuwenhuis
233905e18c
Merge pull request #3356 from peterkrull/ringbuffered-uartrx-deadlock
stm32: Fix RingBufferedUartRx hard-resetting DMA after initial error
2024-09-22 08:56:46 +00:00
Kevin
85b7c8957c Add presence check for OTG_HS peripheral on STM32H7R/S series 2024-09-22 01:11:32 +02:00
Kevin
6d9af8304c Add USBPHYC clock configuration for H7RS series 2024-09-22 00:23:07 +02:00
Kevin
2f60d78ea3 Add OTG_HS support for STM32H7R/S 2024-09-22 00:23:07 +02:00
Grant Miller
f2646b29a6 Make clone_unchecked work 2024-09-21 07:52:54 -05:00
Dario Nieuwenhuis
afd8a86962
Merge pull request #3359 from NZRosto/main
Correctly gate `time` feature of embassy-embedded-hal in embassy-stm32
2024-09-21 01:11:41 +00:00
Reed
3328c5d656
Correctly gate time feature of embassy-embedded-hal in embassy-stm32 2024-09-21 12:31:38 +12:00
Dario Nieuwenhuis
3020bf3662
Merge pull request #3355 from Gerharddc/main
embassy_stm32/eth: support compliance testing
2024-09-20 13:47:25 +00:00
Gerhard de Clercq
5ea934d4ba embassy_stm32/eth: support compliance testing
This change adds the possibility to perform compliance testing with
STM32 systems by directly exposing SMI when needed. Users can
then use this to configure PHY registers for test modes.
2024-09-20 09:57:31 +02:00
Nathan Perry
89bad07e81 embassy_sync: Sink adapter for pubsub::Pub
Corresponding to the `Stream` impl for `pubsub::Sub`. Notable
difference is that we need a separate adapter type to store
the pending item, i.e. we can't `impl Sink for Pub` directly.
Instead a method `Pub::sink(&self)` is exposed, which
constructs a `PubSink`.
2024-09-20 01:58:03 -04:00
Peter Krull
3aeeeb0d78 stm32: Start DMA before clearing, avoid panic in updater ringbuffer impl 2024-09-19 20:07:08 +02:00
Peter Krull
4fcc8e39d6 stm32: Only check errors on running RingBufferedUartRx, reduce number of small one-time functions 2024-09-19 19:21:34 +02:00
Peter Krull
2a9cdaabaa stm32: Moved comment to match request_stop 2024-09-19 18:25:08 +02:00
Peter Krull
907d55ea82 stm32: Added request_pause to DMA, and use it for RingBufferedUartRx 2024-09-19 18:14:09 +02:00
Ulf Lilleengen
d7780fcf83
Merge pull request #3354 from mammothbane/main
embassy_sync/pubsub: fix PubSubBehavior visibility
2024-09-19 12:55:50 +00:00
Nathan Perry
893b8d79e8 embassy_sync/pubsub: fix PubSubBehavior visibility
https://github.com/embassy-rs/embassy/pull/2969 appears to have broken
direct `publish_immediate()` on `pubsub::Channel`, as it functionally
made `PubSubBehavior` private and didn't delegate this method to the new
(private) `SealedPubSubBehavior`.

This change moves `publish_immediate`, `capacity`, and `is_full` from
`SealedPubSubBehavior` to `PubSubBehavior` in order to restore them to
`pub` visibility.
2024-09-19 08:44:45 -04:00
Ulf Lilleengen
cdb44f1272
Merge pull request #3349 from embassy-rs/e-b-introduce-reverted-magic
Add revert state in embassy-boot
2024-09-19 07:24:33 +00:00
Ulf Lilleengen
4e1efd93fd Fix defmt support for example boot app 2024-09-19 09:22:47 +02:00
Ulf Lilleengen
df23a77bfc Add led to example to demonstrate revert state detection 2024-09-19 09:16:19 +02:00
Ulf Lilleengen
ab0a227e4c Ensure bootloader state is parsed correctly 2024-09-19 09:16:19 +02:00
Ulf Lilleengen
b1897c58fa Add revert state in embassy-boot
The revert state signals that a firmware revert has taken place,
allowing the application to know if a firmware update attempt was
reverted.
2024-09-19 09:16:19 +02:00
Dario Nieuwenhuis
45cbcb513d
Merge pull request #3350 from embassy-rs/net-fixes2
net: add all combinations of wait methods for link/config up/down.
2024-09-18 19:51:37 +00:00
Dario Nieuwenhuis
bee53af36a net: add all combinations of wait methods for link/config up/down. 2024-09-18 21:37:42 +02:00
Dario Nieuwenhuis
60f93b42e2 net-esp-hosted: set wpa3_supported=true.
I've noticed wpa3 still works without this flag, so I'm not sure what this does tbh...
2024-09-18 21:24:50 +02:00
Dario Nieuwenhuis
a406a01459 net-esp-hosted: remove useless fn init. 2024-09-18 21:24:35 +02:00
Dario Nieuwenhuis
d12e98aaf4
Merge pull request #3338 from ionspin/add-rp2350-trng-support
RP2350 TRNG support
2024-09-17 22:17:23 +00:00
Dario Nieuwenhuis
e597c6b959
Merge pull request #3332 from CBJamo/rp2350_pio_pins
rp: rp2350 pio pin fixes
2024-09-17 22:15:37 +00:00