Commit graph

4878 commits

Author SHA1 Message Date
Rasmus Melchior Jacobsen
efc71e08c4 Default to Async mode 2023-05-25 20:07:42 +02:00
Rasmus Melchior Jacobsen
bac8ad565e Remove TryLockError, 2023-05-25 20:07:42 +02:00
Rasmus Melchior Jacobsen
525e065474 Align examples 2023-05-25 20:07:42 +02:00
Rasmus Melchior Jacobsen
44b6494ab7 Let FlashLayout and FlashRegion depends on a Blocking/Async mode generic 2023-05-25 20:07:42 +02:00
Rasmus Melchior Jacobsen
6df6239704 Run format with nightly 2023-05-25 20:07:42 +02:00
Rasmus Melchior Jacobsen
c6ffece410 Add more missing nightly guards 2023-05-25 20:07:41 +02:00
Rasmus Melchior Jacobsen
34a2804b54 Fix unused get_sector and ensure_sector_aligned 2023-05-25 20:07:41 +02:00
Rasmus Melchior Jacobsen
cdb1447569 Add missing nightly guards 2023-05-25 20:07:41 +02:00
Rasmus Melchior Jacobsen
7477785bbb Align examples 2023-05-25 20:07:41 +02:00
Rasmus Melchior Jacobsen
0e90e98e9b stm32: Add async flash write/erase to f4 2023-05-25 20:07:41 +02:00
Rasmus Melchior Jacobsen
f616b22159 Fix yet another v1 error 2023-05-25 18:16:46 +02:00
Rasmus Melchior Jacobsen
c5bf36eebf Fix oversampling message for usart v1 2023-05-25 17:56:52 +02:00
goueslati
abbaaeee37 stm32/ipcc: support for MAC 802.15.4 2023-05-25 16:39:43 +01:00
Rasmus Melchior Jacobsen
387a4fcb8e Exclude usart_v1 2023-05-25 17:24:22 +02:00
Rasmus Melchior Jacobsen
cd6256a924 Add assume_noise_free to usart configuration
Effectively setting cr3.onebit
2023-05-25 17:24:22 +02:00
bors[bot]
06f5c309c0
Merge #1485
1485: Align with updated stm32 metapac r=Dirbaio a=rmja

This now depends on https://github.com/embassy-rs/stm32-data/pull/192 as it seems that ppre1 is using the enum, but ppre2 does not.

Please have a good look at this. I do not have a G4 chip so I cannot verify this change.

Co-authored-by: Rasmus Melchior Jacobsen <rmja@laesoe.org>
2023-05-25 14:51:13 +00:00
bors[bot]
a58c7b60bc
Merge #1471
1471: embassy-net: Make TcpSocket::abort() async r=Dirbaio a=mkj

This lets callers ensure that the reset packet is sent to the remote host. Otherwise there isn't a way to wait for the smoltcp stack to send the reset.

Requires changes to smoltcp to wake after the reset has been sent, see https://github.com/smoltcp-rs/smoltcp/compare/master...mkj:smoltcp:abort-wake

This commit also adds a "TCP accept" demo of the problem. Without the `.await` for abort() it gets dropped before the RST packet is emitted.

Co-authored-by: Matt Johnston <matt@ucc.asn.au>
2023-05-25 14:20:04 +00:00
Rasmus Melchior Jacobsen
673396c0e7 Update metapac version again 2023-05-25 16:19:46 +02:00
Rasmus Melchior Jacobsen
963f3e3059 Align with updated stm32 metapac 2023-05-25 16:06:02 +02:00
Matt Johnston
373eb97357 Add std example of a TCP listener
This also demonstrates calling .abort() on a TCP socket and ensuring
that the reset packet is sent out.
2023-05-25 20:43:36 +08:00
Matt Johnston
b20427b2ec net: Make flush() wait for RST packets from abort()
Add docs to note that dropping a TcpSocket early will
prevent the .abort() RST from being sent.
2023-05-25 20:43:36 +08:00
Rasmus Melchior Jacobsen
c02759ad91 Fix unused errors 2023-05-25 13:59:32 +02:00
Rasmus Melchior Jacobsen
8b1eaf00a0 Simplify SR->Result 2023-05-25 13:54:40 +02:00
Rasmus Melchior Jacobsen
baf1c2efbe Align with new bind_interrupt 2023-05-25 13:42:42 +02:00
Rasmus Melchior Jacobsen
cd8198037f Actually transition to dual bank mode - key was required 2023-05-25 13:08:40 +02:00
Rasmus Melchior Jacobsen
e65ff85b88 Default to Async mode 2023-05-25 13:04:48 +02:00
Rasmus Melchior Jacobsen
9370973846 Remove TryLockError, 2023-05-25 13:04:48 +02:00
Rasmus Melchior Jacobsen
8b13a7b338 Align examples 2023-05-25 13:04:48 +02:00
Rasmus Melchior Jacobsen
dfd5603171 Let FlashLayout and FlashRegion depends on a Blocking/Async mode generic 2023-05-25 13:04:48 +02:00
Rasmus Melchior Jacobsen
966f0abf48 Run format with nightly 2023-05-25 13:04:48 +02:00
Rasmus Melchior Jacobsen
1329a387e0 Add more missing nightly guards 2023-05-25 13:04:47 +02:00
Rasmus Melchior Jacobsen
6804b6c0b4 Fix unused get_sector and ensure_sector_aligned 2023-05-25 13:04:47 +02:00
Rasmus Melchior Jacobsen
ff3a70ed9d Add missing nightly guards 2023-05-25 13:04:47 +02:00
Rasmus Melchior Jacobsen
0a26870d36 Align examples 2023-05-25 13:04:47 +02:00
Rasmus Melchior Jacobsen
b2775fc90c stm32: Add async flash write/erase to f4 2023-05-25 13:04:47 +02:00
Dario Nieuwenhuis
6efcc9acaa
Merge pull request #1483 from embassy-rs/remove-oidc
ci: replace openid connect with static secret.
2023-05-25 04:25:43 +02:00
Dario Nieuwenhuis
2a589b7904 ci: replace openid connect with static secret.
The oidc token is only valid for 5min, builds are starting to fail because HIL tests
take more than 5 min and we only obtain it once at start.

Instead of fixing it, let's remove it. My hope for OIDC was to allow running
HIL tests on PRs from forks if the author is in a list of trusted users.
However GHA simply doesn't give the ID token to PRs from forks. 🤷
Same limitation as with static tokens. So it's useless complexity, let's kill it.
2023-05-25 03:54:49 +02:00
bors[bot]
5f10eadb8d
Merge #1475 #1478 #1482
1475: Add YieldingAsync adapter r=Dirbaio a=rmja

This PR calls `yield_now()` for long blocking `NorFlash` read and erase operations.
The motivation for this change is to allow for other tasks on the same executor to get something done between these long running operations, for example a task that feeds a watchdog. This will allow the watchdog to have a timer relative to e.g. one sector erase, instead of all sector erase.

1478: stm32: Minor fixes in flash regions for F4 dual bank layout r=Dirbaio a=rmja

This PR has the following fixes:
* Ensure that `FlashRegion` instances can only be created within the embassy-stm32 crate.
* Remove `Drop` trait for `AltFlashLayout`, as it is hard to use, as one cannot take the individual regions out from the struct. Instead of going back to single bank mode on `Drop`, we instead transition to single bank mode when calling `Flash::into_regions()`.
* Add missing `otp_region` to the dual bank layout and implement `NorFlash` for the alternate regions.

1482: Add ConcatFlash utility r=Dirbaio a=rmja

This PR adds a `ConcatFlash` utility that can be used to concatenate two `NorFlash` flashes. This is especially useful when concatenating multiple flash regions with unequal erase size.


Co-authored-by: Rasmus Melchior Jacobsen <rmja@laesoe.org>
2023-05-25 01:05:32 +00:00
bors[bot]
224faccd4c
Merge #1340 #1474
1340: Add I2S for f4 r=Dirbaio a=xoviat

This is only for f4, but it puts us equal to or ahead of the standard rust hal.

1474: stm32: Fix watchdog timeout computation r=Dirbaio a=rmja



Co-authored-by: xoviat <xoviat@users.noreply.github.com>
Co-authored-by: Rasmus Melchior Jacobsen <rmja@laesoe.org>
2023-05-25 00:42:10 +00:00
bors[bot]
ce1078994d
Merge #1479
1479: Move stm32 to bind_interrupts r=xoviat a=xoviat



Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-05-24 23:47:35 +00:00
xoviat
b6ba1ea53a stm32: move lora to bind_interrupts 2023-05-24 18:09:04 -05:00
xoviat
316be179af stm32: move to bind_interrupts
disable lora functionality for now
2023-05-24 17:29:56 -05:00
Rasmus Melchior Jacobsen
e785e1bc22 Add ConcatFlash utility 2023-05-24 14:40:34 +02:00
Dario Nieuwenhuis
3cc0ec654a
Merge pull request #83 from papyDoctor/master
Update examples in README.md
2023-05-24 11:41:03 +00:00
Olivier Monnom
a19f8c32ff
Update examples in README.md 2023-05-24 09:22:05 +02:00
Rasmus Melchior Jacobsen
87acf5f50f Add missing set_default_layout() in "other" family 2023-05-23 23:01:55 +02:00
Rasmus Melchior Jacobsen
14e3e72b0f Add missing implementations for f4 alternate regions 2023-05-23 22:51:26 +02:00
Rasmus Melchior Jacobsen
faf506b300 Remove Drop for AltFlashLayout 2023-05-23 22:50:41 +02:00
Rasmus Melchior Jacobsen
879c621394 Ensure FlashRegion can only be created within this crate 2023-05-23 22:49:27 +02:00
bors[bot]
627d7f66ef
Merge #1477
1477: embassy-embedded-hal: Add i2c transaction to I2cDevice r=Dirbaio a=CBJamo

Not sure why this was a todo before, but this seems to be working fine in my limited testing.

Co-authored-by: Caleb Jamison <caleb@hellbender.com>
2023-05-23 09:20:44 +00:00