Commit graph

3265 commits

Author SHA1 Message Date
Mathias
6fa74b0c02 make prepare_update async 2022-09-26 10:36:21 +02:00
Mathias
b2a327a858 Add get_state helpers to allow self-testing before calling mark_booted 2022-09-26 06:53:40 +02:00
Mathias
7f16b1cd23 Add blocking API to FirmwareUpdater, and allow for a split prepare/write api 2022-09-26 06:01:18 +02:00
Mathias
b743d9f48c Add HIL test for bufferedUart 2022-09-26 05:32:45 +02:00
bors[bot]
3c24ad2db6
Merge #969
969: usb: fix compile errors with the log feature r=Dirbaio a=newAM



Co-authored-by: Alex Martens <alex@thinglab.org>
2022-09-25 21:59:52 +00:00
bors[bot]
a226e86503
Merge #961
961: Parameterize Signal with RawMutex r=ivmarkov a=ivmarkov

The `RawMutex` parameter is deliberately chosen to be the second one, so as it can take as a default `CriticalSectionRawMutex`. This way backwards compatibility is preserved, and users utilizing the `critical-section` crate everywhere can just continue to use the more ergonomic single-generic-parameter version of Signal.

I'm thinking we should probably do the same for `Channel`, and move the `RawMutex` parameter as the last one in the list, with a `CriticalSectionRawMutex` being its default. But that's a backwards-incompatible change of course.

Co-authored-by: ivmarkov <ivan.markov@gmail.com>
2022-09-25 07:46:43 +00:00
ivmarkov
c5ce02b30e Remove default, reorder generic params 2022-09-25 09:40:36 +03:00
ivmarkov
8536666148 Remove default, reorder generic params 2022-09-24 20:27:27 +03:00
ivmarkov
ca92302d03 Parameterize Signal with RawMutex 2022-09-24 20:26:51 +03:00
Alex Martens
a45fb2d718 usb: fix compile errors with the log feature 2022-09-24 09:42:06 -07:00
bors[bot]
eeb1515e9f
Merge #958
958: Implement proper `Drop` for `BufferedUarte` r=lulf a=ZoeyR

The drop method in `BufferedUarte` was prone to hanging indefinitely and also didn't actually disable the peripheral. I mostly copied over the drop method from `Uarte` with some modifications since `BufferedUarte` could have a transmit lasting indefinitely.

Co-authored-by: Zoey Riordan <zoey@dos.cafe>
2022-09-23 11:58:43 +00:00
Zoey Riordan
b4f2c2a05e Re-add timer.stop() 2022-09-23 12:34:02 +02:00
Mathias
18dc0dea63 Drop rp2040-flash as dependency, as they pull in rp2040-hal for rom-data functions, which are now part of this HAL as well 2022-09-23 08:12:32 +02:00
Mathias
9d674f0212 First iteration attempt on implementing generic flash mutation access for RP2040 2022-09-23 07:59:10 +02:00
Mathias
816778e3fa Add RP2040 ROM functions and intrinsics aliases 2022-09-23 07:58:48 +02:00
Dario Nieuwenhuis
4f33cc5d1a Replace futures::future::join -> embassy_futures::join::join. 2022-09-23 07:58:48 +02:00
Dario Nieuwenhuis
2fed9f949a Replace futures::future::poll_fn -> core::future::poll_fn. 2022-09-23 07:58:48 +02:00
Dario Nieuwenhuis
7412a859fd Update Rust nightly.
Removes feature(generic_associated_types)
2022-09-23 07:58:48 +02:00
Mathias
0db1332da8 Implement RealTimeClock for embassy-rp 2022-09-23 07:58:48 +02:00
Ulf Lilleengen
334dfcdb65 Take into account size of revert index
Fixes a bug in the partition assertions that ensures that the state
page(s) have enough space for 2x active partition range.

Add unit test to verify that panic is observed.
2022-09-23 07:58:48 +02:00
Ulf Lilleengen
54ba472540 Remove BootFlash borrow
Compiler will infer a different lifetime for BootFlash than for the
borrowed flash, which makes it require more type annotations than if it
was just owning the type. Since it doesn't really matter if it owns or
borrows in practical use, change it to own so that it simplifies usage.
2022-09-23 07:58:48 +02:00
Alex Martens
4322293f63 rp: let SPI RX overflow during async write 2022-09-23 07:58:48 +02:00
Alex Martens
c14527486d rp: fix async SPI read and write 2022-09-23 07:58:48 +02:00
Alex Martens
81298394b5 rp: remove extraneous newlines in logs 2022-09-23 07:58:48 +02:00
Mathias
5d1576ea73 Add time-driver feature to docs 2022-09-23 07:58:48 +02:00
Mathias
f46b838746 Feature-gate time-driver in embassy-rp 2022-09-23 07:58:48 +02:00
Joakim Hulthe
3f672c8a93 Make rustfmt happy 2022-09-23 07:58:48 +02:00
Joakim Hulthe
e5af4c4bce Add .into_inner() and .get_mut() to Mutex 2022-09-23 07:58:48 +02:00
Vincent Stakenburg
7bb9620b1a make State::new() const, consistent with others 2022-09-23 07:58:48 +02:00
Mathias
2e7916c5fe Add RP2040 ROM functions and intrinsics aliases 2022-09-23 06:45:44 +02:00
bors[bot]
dacbc9acd5
Merge #963
963: Remove some uses of the `futures` crate r=Dirbaio a=Dirbaio

- use `Future` from `core`
- `poll_fn` is now stable in `core` since Rust 1.64 (out today)
- Use `join` from `embassy-futures`.


Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-09-22 15:46:07 +00:00
Dario Nieuwenhuis
10d1ad2343 Replace futures::future::join -> embassy_futures::join::join. 2022-09-22 16:48:35 +02:00
Dario Nieuwenhuis
a0487380da Replace futures::future::poll_fn -> core::future::poll_fn. 2022-09-22 16:42:49 +02:00
bors[bot]
c1e25067da
Merge #962
962: Update Rust nightly. r=Dirbaio a=Dirbaio



Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-09-22 14:39:02 +00:00
Dario Nieuwenhuis
897b72c872 Update Rust nightly.
Removes feature(generic_associated_types)
2022-09-22 16:38:14 +02:00
Andrew Ealovega
5914d80968 Add non blocking Bxcan constructor.
Signed-off-by: Andrew Ealovega <Andrew@Ealovega.dev>
2022-09-21 22:29:57 -04:00
Zoey Riordan
5f7e0eb2ae Fix builds on other nrf pacs 2022-09-21 14:06:56 +02:00
Zoey Riordan
15b4f9db90 Remove unused function 2022-09-21 11:19:47 +02:00
Zoey Riordan
0f55f5a73d Remove left-in comments and logs 2022-09-21 11:06:06 +02:00
Zoey Riordan
3d708a459c Implement proper Drop for BufferedUarte 2022-09-21 10:48:02 +02:00
bors[bot]
3b58ac1bf8
Merge #949
949: (embassy-rp): Implement RealTimeClock r=lulf a=MathiasKoch

Basically a 1:1 port of the great implementation effort made by `rp-hal`

Co-authored-by: Mathias <mk@blackbird.online>
2022-09-21 07:19:23 +00:00
Mathias
1d3e41f970 Remove code-duplication in async bufferedUart implementations 2022-09-21 06:00:35 +02:00
bors[bot]
44d7a84e47
Merge #957
957: Take into account size of revert index r=lulf a=lulf

Fixes a bug in the partition assertions that ensures that the state page(s) have enough space for 2x active partition range.

Add unit test to verify that panic is observed.

Co-authored-by: Ulf Lilleengen <ulf.lilleengen@gmail.com>
2022-09-20 12:56:46 +00:00
Ulf Lilleengen
b418c0e4d6 Take into account size of revert index
Fixes a bug in the partition assertions that ensures that the state
page(s) have enough space for 2x active partition range.

Add unit test to verify that panic is observed.
2022-09-20 14:04:57 +02:00
bors[bot]
11da25800b
Merge #956
956: Remove BootFlash borrow r=lulf a=lulf

Compiler will infer a different lifetime for BootFlash than for the borrowed flash, which makes it require more type annotations than if it was just owning the type. Since it doesn't really matter if it owns or borrows in practical use, change it to own so that it simplifies usage.

Co-authored-by: Ulf Lilleengen <ulf.lilleengen@gmail.com>
2022-09-20 07:55:20 +00:00
Ulf Lilleengen
d0fe654c82 Remove BootFlash borrow
Compiler will infer a different lifetime for BootFlash than for the
borrowed flash, which makes it require more type annotations than if it
was just owning the type. Since it doesn't really matter if it owns or
borrows in practical use, change it to own so that it simplifies usage.
2022-09-20 09:54:37 +02:00
bors[bot]
6663390224
Merge #954
954: rp: fix async SPI read and write r=lulf a=newAM

Closes #953 

Co-authored-by: Alex Martens <alex@thinglab.org>
2022-09-19 07:26:10 +00:00
bors[bot]
ac13675f3a
Merge #955
955: rp: remove extraneous newlines in logs r=Dirbaio a=newAM



Co-authored-by: Alex Martens <alex@thinglab.org>
2022-09-18 23:22:14 +00:00
Alex Martens
0c6933fefb rp: remove extraneous newlines in logs 2022-09-18 14:54:24 -07:00
Alex Martens
295cc997ae rp: let SPI RX overflow during async write 2022-09-18 12:23:17 -07:00