Commit Graph

5501 Commits

Author SHA1 Message Date
bors[bot]
049c31613b
Merge #975
975: rp: Disable intrinsics by default. r=Dirbaio a=Dirbaio

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-09-26 17:57:48 +00:00
Dario Nieuwenhuis
1e95c4fcff rp: Disable intrinsics by default. 2022-09-26 19:53:22 +02:00
Guillaume MICHEL
daf2744716 Rework STM32 BufferedUart internals so we can split into Rx and Tx like embassy-nrf 2022-09-26 15:32:29 +02:00
Dario Nieuwenhuis
cb6d1fc514
Merge pull request #26 from danbev/bdc_version_const
Add constants for BDC_VERSION
2022-09-26 15:07:53 +02:00
Daniel Bevenius
3b04ef265c Add constants for BDC_VERSION
This commit adds two constants intended to be used with the
bdc_header.flags field. I believe these are the correct values after
looking at following lines in `whd_cdc_bdc.c`:

40a7ec2273/WiFi_Host_Driver/src/whd_cdc_bdc.c (L34-L35)
40a7ec2273/WiFi_Host_Driver/src/whd_cdc_bdc.c (L447)
2022-09-26 14:53:37 +02:00
Dario Nieuwenhuis
7bbd4671d3
Merge pull request #24 from danbev/suppress-warnings
Suppress compiler warnings
2022-09-26 14:12:34 +02:00
Daniel Bevenius
9962db4ecf Suppress compiler warnings
This commit adds the allow(unused) attribute to functions and constants
that are not currently used. There is one warning remaining but
https://github.com/embassy-rs/cyw43/pull/23 attempts to address that
one. The constants have been moved into a module to allow the attribute
to be applied to the module as a whole.

The motivation for this is that it will hopefully make it easier to
spot new warnings that might be introduced by new, or updated code.
2022-09-26 14:08:50 +02:00
bors[bot]
49070c75b6
Merge #972
972: Restructure USB crates r=Dirbaio a=Dirbaio

- Split driver from `embassy-usb` to a separate crate. This allows making breaking changes to `embassy-usb` without having to bump all the crates with driver impls, such as HALs.
- Merge classes into `embassy-usb`. Now that breaking changes to `embassy-usb` aren't that bad, having everything in a single crate is much easier.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-09-26 11:32:41 +00:00
Dario Nieuwenhuis
f27a47a37b usb: move classes into the embassy-usb crate. 2022-09-26 13:00:21 +02:00
Dario Nieuwenhuis
f4f5824972 usb: do not allow converting Directon to/from u8 2022-09-26 12:35:33 +02:00
Dario Nieuwenhuis
7f7c14b7bc usb: split driver trait to separate crate. 2022-09-26 12:29:27 +02:00
bors[bot]
dc376a2390
Merge #965
965: (embassy-rp): add RP2040 ROM functions and intrinsics aliases r=Dirbaio a=MathiasKoch

Add RP2040 ROM functions described in section **2.8.3.1. Bootrom Functions** of https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf

Make all ROM functions (normal and floating point) provide both a direct
call that does the operation and a module with a ptr() function to get
the function pointer.

Add a feature to enable automatic caching of the result of ROM table
function lookups.

Add a check for a V2 bootrom when using floating point functions that
require it.  Panic when it's not present.

Add a standardized macro for intrinsics export and connect the simple
ROM functions to intrinsics.

Direct copy from `rp-hal`! Full credit to those guys for all the heavy lifting.

Co-authored-by: Mathias <mk@blackbird.online>
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-09-26 09:58:06 +00:00
Dario Nieuwenhuis
fa7781c48d Add credits to rp-hal 2022-09-26 11:57:26 +02:00
bors[bot]
a9efbf18c6
Merge #960
960: Add non blocking Bxcan constructor r=Dirbaio a=andyblarblar

This PR adds a non-blocking constructor to the Bxcan Can wrapper struct. This allows for the creation of the Can periferal without blocking for a sync with the Can bus.

Co-authored-by: Andrew Ealovega <Andrew@Ealovega.dev>
2022-09-26 09:39:55 +00:00
bors[bot]
3c06a18b94
Merge #971
971: (embassy-boot): add blocking API to FirmwareUpdater r=lulf a=MathiasKoch

Also add a split `prepare_update` + `write_firmware` API, to allow for an optimized update API at the exchange of added complexity. 
The old API is left in place to allow users to choose the complexity level that fits their needs. 

Co-authored-by: Mathias <mk@blackbird.online>
2022-09-26 08:53:25 +00:00
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
Dario Nieuwenhuis
79a9a4eb98
Merge pull request #20 from danbev/glom_comment
Add comment about bus:txglom iovar
2022-09-25 23:39:08 +02:00
Dario Nieuwenhuis
270c4d2476
Merge pull request #21 from danbev/extra-time-waits
Comment out extra Timer:after calls
2022-09-25 23:38:36 +02:00
Dario Nieuwenhuis
6b35f654ba
Merge pull request #22 from danbev/antdiv-const
Add const for IOCTL ANTDIV
2022-09-25 23:37:54 +02:00
Dario Nieuwenhuis
11387c3b03
Merge pull request #23 from danbev/ioctl_set_u32-iface
Update ioctl_set_u32 to pass through iface param
2022-09-25 23:37:35 +02:00
Dario Nieuwenhuis
612000aa8f
Merge pull request #25 from danbev/cmd_word_constants
Add constants for cmd_word arguments
2022-09-25 23:36:13 +02: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
Daniel Bevenius
9aaefa6e71 Add constants for cmd_word arguments
This commit adds constants intended to be used with the `cmd_word`
function.

The motivation for this to (hopefully) improve the readability of the
code.
2022-09-23 15:06:26 +02: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
Daniel Bevenius
281cbcb1e8 Update ioctl_set_u32 to pass through iface param
This commit updates ioctl_set_u32 to pass through the `iface` parameter
to self.iotcl.
2022-09-23 09:39:29 +02:00
Daniel Bevenius
28bf4b7b6d Add const for IOCTL ANTDIV 2022-09-23 09:35:54 +02:00
Daniel Bevenius
3ba0b3ef3b Comment out extra Timer:after calls
This commit comments out two Timer::after calls which look like they
go together with previous instructions, but those instructions are
currently commented out, so it looks like these calls are not
currently needed.
2022-09-23 09:04:59 +02:00
Daniel Bevenius
8f21a5b116 Add comment about bus:txglom iovar
This commit adds a comment to the setting of the iovar `bus:txglom`.

The motivation for this is that I had not heard of 'glom/glomming'
before and having a comment might help others that are not familar with
the term.
2022-09-23 08:37:16 +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