Commit Graph

2744 Commits

Author SHA1 Message Date
Scott Mabin
31e8006738 arch:riscv32
- Add basic riscv32 executor
- Add 16MHZ timer support
2022-06-19 22:30:26 +01:00
Dario Nieuwenhuis
6852e05c59
Merge pull request #822 from embassy-rs/remove-authors
Remove the authors field from Cargo.tomls
2022-06-18 17:33:29 +02:00
Dario Nieuwenhuis
3fd4ee34ec
Merge pull request #821 from embassy-rs/defmt-trace
Add env DEFMT_LOG=trace to all examples.
2022-06-18 02:24:25 +02:00
Dario Nieuwenhuis
1f746e0939 Remove the authors field from Cargo.tomls
It currently contains whoever was first to write some code for the crate,
even if many more people have contributed to it later.

The field is "sort of" deprecated, it was made optional recently:
https://rust-lang.github.io/rfcs/3052-optional-authors-field.html

Due the the reasons listed there I believe removing it is better than
setting it to generic fluff like "The Embassy contributors".
2022-06-18 02:16:40 +02:00
Dario Nieuwenhuis
88e36a70bd
Update to 2021 edition. (#820) 2022-06-18 02:15:48 +02:00
Dario Nieuwenhuis
dd99356062 Add env DEFMT_LOG=trace to all examples. 2022-06-18 01:59:12 +02:00
Dario Nieuwenhuis
b585d54712
Update rust nightly. (#819) 2022-06-18 01:44:02 +02:00
Dion Dokter
1eec7e69f1 Added some more docs 2022-06-17 15:29:42 +02:00
Dion Dokter
9887f18a51 fmt 2022-06-17 15:08:31 +02:00
Dion Dokter
949b548d45 Refactor pub/sub impls into their own files 2022-06-17 15:06:41 +02:00
Dion Dokter
4a5127aead Move the module into a folder 2022-06-17 14:45:07 +02:00
Dion Dokter
5eae020074 Created the possibility to choose between dyn channel and generic channel 2022-06-17 14:44:19 +02:00
Dion Dokter
eb304c2448 Added a function to WakerRegistration to check if it's occupied.
Created a MultiWakerRegistration that can hold multiple wakers.
Got rid of some options and the pub/sub_index
2022-06-17 13:54:34 +02:00
Dion Dokter
2a4cdd05fa Removed all unsafe 2022-06-16 22:13:26 +02:00
Dion Dokter
a614a55c7d Put most behaviour one level lower (under the mutex instead of above).
Changed the PubSubBehavior to only have high level functions.
2022-06-16 22:11:29 +02:00
Dion Dokter
dfde157337 Removed most unsafe code 2022-06-16 20:57:11 +02:00
Dion Dokter
cdacc44c5f Added unpin impls to the futures 2022-06-16 16:37:23 +02:00
Dion Dokter
f92f46f489 Added convenience methods that ignore lag 2022-06-16 14:19:16 +02:00
Dion Dokter
790426e2f6 Stream now ignores lag 2022-06-16 14:11:41 +02:00
Dion Dokter
c7cdecfc93 Renamed subscriber messages 2022-06-16 14:07:04 +02:00
Dion Dokter
98d0bb726c fmt 2022-06-16 13:51:35 +02:00
Dion Dokter
36b363a5b7 Changed names of subscriber methods and implemented the Stream trait for it 2022-06-16 13:48:26 +02:00
Dion Dokter
03996583a1 fmt 2022-06-16 12:36:39 +02:00
Dion Dokter
12a6ddfbcd Added a pubsub channel implementation 2022-06-16 12:28:12 +02:00
bors[bot]
fcc1db078e
Merge #816
816: Fix doc comments for BpskPacketParams r=lulf a=danbev



Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2022-06-16 10:19:28 +00:00
bors[bot]
23177ba7eb
Merge #813
813: Document remaining public APIs in embassy crate r=lulf a=lulf

This also includes the README.md in the toplevel crate documentation, fixing a few formatting issues with it as well. 

Please review the mutex in detail in case I've misunderstood/missed a few things there.

Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-06-16 07:18:43 +00:00
Daniel Bevenius
9031b8f80a Fix doc comments for BpskPacketParams 2022-06-16 07:34:59 +02:00
bors[bot]
a8920bced5
Merge #815
815: Fix typo in LoRaPacketParams::new doc r=Dirbaio a=danbev



Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2022-06-16 04:25:46 +00:00
Daniel Bevenius
d0edd171f8 Fix typo in LoRaPacketParams::new doc 2022-06-16 06:22:03 +02:00
bors[bot]
f9b90212d4
Merge #814
814: Extract setting of lora modulation params r=lulf a=danbev

This commit suggests extracting the lora modulation parameters into a
separate function which can then be called from both the do_tx, and
the do_rx functions.

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2022-06-15 14:23:16 +00:00
Daniel Bevenius
06a76cd7ce Extract setting of lora modulation params
This commit suggests extracting the lora modulation parameters into a
separate function which can then be called from both the do_tx, and
the do_rx functions.
2022-06-15 16:21:52 +02:00
bors[bot]
03c20604c3
Merge #811
811: Sync subghz peripheral support with stm32wlxx-hal r=lulf a=lulf

* A few more registers exposed 
* Fix for "sleeping"
* Updating comments

Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-06-15 13:29:55 +00:00
Ulf Lilleengen
25ddb26be8 Improve mutex wording 2022-06-15 13:06:35 +02:00
Ulf Lilleengen
eb23733767 Ignore compiling rust code 2022-06-15 10:44:15 +02:00
Ulf Lilleengen
72eb16b46d Add missing documentation for all public modules and types 2022-06-15 10:24:36 +02:00
Ulf Lilleengen
aaebea00eb Ensure links get formatted correctly in cargo doc 2022-06-15 10:24:18 +02:00
Ulf Lilleengen
f8f56c926d Include README.md in crate documentation 2022-06-15 09:06:18 +02:00
Ulf Lilleengen
746bc75a8e FIx broken link warnings 2022-06-15 09:05:48 +02:00
Ulf Lilleengen
faa59efbf6 Cargo fmt 2022-06-15 09:01:22 +02:00
Ulf Lilleengen
3696226fe8 Sync subghz peripheral support with stm32wlxx-hal 2022-06-14 16:27:42 +02:00
bors[bot]
624e46ccfb
Merge #809
809: Allow compiling usb-serial without defmt r=lulf a=lulf



Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-06-13 12:46:39 +00:00
Ulf Lilleengen
0c423cc901 Allow compiling usb-serial without defmt 2022-06-13 14:45:53 +02:00
bors[bot]
db685c0404
Merge #808
808: Add rustfmt.toml with some nice settings. r=lulf a=Dirbaio



Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-06-13 07:22:04 +00:00
Dario Nieuwenhuis
a8703b7598 Run rustfmt. 2022-06-12 22:22:31 +02:00
Dario Nieuwenhuis
6199bdea71 Add rustfmt.toml with some nice settings. 2022-06-12 22:15:28 +02:00
bors[bot]
fff0a03fe0
Merge #806
806: Add embassy-cortex-m crate. r=Dirbaio a=Dirbaio

- Move Interrupt and InterruptExecutor from `embassy` to `embassy-cortex-m`.
- Move Unborrow from `embassy` to `embassy-hal-common` (nothing in `embassy` requires it anymore)
- Move PeripheralMutex from `embassy-hal-common` to `embassy-cortex-m`.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-06-12 19:49:15 +00:00
Dario Nieuwenhuis
5085100df2 Add embassy-cortex-m crate.
- Move Interrupt and InterruptExecutor from `embassy` to `embassy-cortex-m`.
- Move Unborrow from `embassy` to `embassy-hal-common` (nothing in `embassy` requires it anymore)
- Move PeripheralMutex from `embassy-hal-common` to `embassy-cortex-m`.
2022-06-12 21:45:38 +02:00
bors[bot]
6b3499a5c8
Merge #807
807: Rename channel to mpmc r=huntc a=huntc

I've renamed the channel module for the MPMC as `mpmc`. There was a previous debate about this, but I feel that the strategy here avoids importing `channel::channel`. The change leaves `signal::Signal`, but I think that's ok. It is all a bit subjective of course. The bottom line for me is that I really like the term `mpmc` - it means something to me and aligns with broader naming e.g. in Tokio.

Co-authored-by: huntc <huntchr@gmail.com>
2022-06-12 06:27:11 +00:00
huntc
99d19c7dcf Rename channel to mpmc
I've renamed the channel module for the MPMC as mpmc. There was a previous debate about this, but I feel that the strategy here avoids importing `channel::channel`. The change leaves `signal::Signal`, but I think that's ok. It is all a bit subjective of course. The bottom line for me is that I really like the term mpmc - it means something to me and aligns with broader naming e.g. in Tokio.
2022-06-12 15:16:56 +10:00
Dario Nieuwenhuis
db344c2bda
common/PeripheralMutex: remove unsafe API. (#802)
Following the project's decision that "leak unsafe" APIs are not marked as "unsafe",
update PeripheralMutex to accept non-'static state without unsafe.

Fixes #801
2022-06-09 21:28:13 +02:00