Commit Graph

4051 Commits

Author SHA1 Message Date
4a6f69e2d9 Merge #805
805: Preliminary Xtensa support r=Dirbaio a=MabezDev

Based on the work in #804.

I hope non-upstream target support is acceptable :).

Co-authored-by: Scott Mabin <scott@mabez.dev>
2022-06-22 15:02:09 +00:00
e3a13a05be Merge #825
825: Fixed a pubsub mutability inconsistency r=lulf a=diondokter

All other publish methods don't require mut

Co-authored-by: Dion Dokter <diondokter@gmail.com>
2022-06-22 13:09:47 +00:00
12dfc4dca3 Fixed a pubsub mutability inconsistency 2022-06-22 14:13:01 +02:00
5f87a34b6a arch: Xtensa
- Adds a executor for the Xtensa arch
- Light sleep implemented with assembly, so we don't pull in the
  xtensa_lx crates (yet)
- lock behind a nightly feature due to Xtensa asm support not upstream
2022-06-22 10:06:22 +01:00
9721b2bf5b Merge #817
817: Added a pubsub channel implementation r=lulf a=diondokter

This is similar to Tokio's Broadcast channel, except that it doesn't allocate.

The publishers and subscribers are dynamic. They use an &dyn channel reference because it's really annoying to have to specify the mutex and const generics every time.
Do we need fully generic types as well?

Co-authored-by: Dion Dokter <diondokter@gmail.com>
Co-authored-by: Dion Dokter <dion@tweedegolf.com>
2022-06-21 20:04:27 +00:00
78c546f356 Added example and some defmt 2022-06-21 15:47:20 +02:00
e4fbfaf568 Merge #804
804: Preliminary RISCV support r=Dirbaio a=MabezDev

- ~~Moves the default Interrupt implementation into a cortex_m specific module~~
- Adds a RISCV32 executor based on [osobiehl](https://github.com/osobiehl)'s work in [esp32c3 mess work](https://github.com/osobiehl/riscv-embassy-mess-work)

(FYI esp implementation of embassy traits etc, is being developed [here](https://github.com/esp-rs/esp-hal/tree/feature/embassy))

[bonus ascii cinema](https://asciinema.org/a/500857 )

Co-authored-by: Scott Mabin <scott@mabez.dev>
2022-06-19 21:34:08 +00:00
31e8006738 arch:riscv32
- Add basic riscv32 executor
- Add 16MHZ timer support
2022-06-19 22:30:26 +01:00
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
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
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
88e36a70bd Update to 2021 edition. (#820) 2022-06-18 02:15:48 +02:00
dd99356062 Add env DEFMT_LOG=trace to all examples. 2022-06-18 01:59:12 +02:00
b585d54712 Update rust nightly. (#819) 2022-06-18 01:44:02 +02:00
1eec7e69f1 Added some more docs 2022-06-17 15:29:42 +02:00
9887f18a51 fmt 2022-06-17 15:08:31 +02:00
949b548d45 Refactor pub/sub impls into their own files 2022-06-17 15:06:41 +02:00
4a5127aead Move the module into a folder 2022-06-17 14:45:07 +02:00
5eae020074 Created the possibility to choose between dyn channel and generic channel 2022-06-17 14:44:19 +02:00
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
2a4cdd05fa Removed all unsafe 2022-06-16 22:13:26 +02:00
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
dfde157337 Removed most unsafe code 2022-06-16 20:57:11 +02:00
cdacc44c5f Added unpin impls to the futures 2022-06-16 16:37:23 +02:00
f92f46f489 Added convenience methods that ignore lag 2022-06-16 14:19:16 +02:00
790426e2f6 Stream now ignores lag 2022-06-16 14:11:41 +02:00
c7cdecfc93 Renamed subscriber messages 2022-06-16 14:07:04 +02:00
98d0bb726c fmt 2022-06-16 13:51:35 +02:00
36b363a5b7 Changed names of subscriber methods and implemented the Stream trait for it 2022-06-16 13:48:26 +02:00
03996583a1 fmt 2022-06-16 12:36:39 +02:00
12a6ddfbcd Added a pubsub channel implementation 2022-06-16 12:28:12 +02:00
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
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
9031b8f80a Fix doc comments for BpskPacketParams 2022-06-16 07:34:59 +02:00
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
d0edd171f8 Fix typo in LoRaPacketParams::new doc 2022-06-16 06:22:03 +02:00
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
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
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
25ddb26be8 Improve mutex wording 2022-06-15 13:06:35 +02:00
eb23733767 Ignore compiling rust code 2022-06-15 10:44:15 +02:00
72eb16b46d Add missing documentation for all public modules and types 2022-06-15 10:24:36 +02:00
aaebea00eb Ensure links get formatted correctly in cargo doc 2022-06-15 10:24:18 +02:00
f8f56c926d Include README.md in crate documentation 2022-06-15 09:06:18 +02:00
746bc75a8e FIx broken link warnings 2022-06-15 09:05:48 +02:00
faa59efbf6 Cargo fmt 2022-06-15 09:01:22 +02:00
3696226fe8 Sync subghz peripheral support with stm32wlxx-hal 2022-06-14 16:27:42 +02:00
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
0c423cc901 Allow compiling usb-serial without defmt 2022-06-13 14:45:53 +02:00
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