Commit Graph

3015 Commits

Author SHA1 Message Date
Dario Nieuwenhuis
e7584ccbfa cortex-m: reexport all items from embassy::executor. 2022-06-25 23:55:40 +02:00
Dario Nieuwenhuis
0beea82f40 nrf/uart: add support for tx-only and rx-only uart.
Allow creating UarteRx/UarteTx directly. This allows using uart unidirectionally
(rx-only or tx-only), without having to 'waste' a pin for the unused direction.
2022-06-25 23:54:00 +02:00
bors[bot]
a51df0dec6
Merge #824
824: embassy/time: round up by default in duration conversions. Fixes #823 r=Dirbaio a=Dirbaio



Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-06-24 21:29:29 +00:00
Dario Nieuwenhuis
571e4f2b01 embassy/time: round up by default in Duration::from_*. Fixes #823 2022-06-24 23:27:46 +02:00
Ulf Lilleengen
776be79f7b Move bootloader main to examples
This should remove some confusion around embassy-boot-* being a library
vs. a binary. The binary is now an example bootloader instead.
2022-06-24 19:56:15 +02:00
bors[bot]
0ec32d53ed
Merge #828
828: More API docs r=lulf a=lulf

embassy-cortex-m is covered now, making some progress on embassy-nrf, but not complete.

Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-06-24 17:23:25 +00:00
Ulf Lilleengen
ca59c1ff35 Add more API docs for embassy-cortex-m and embassy-nrf 2022-06-23 13:17:56 +02:00
Ulf Lilleengen
6d3a652026 Fix new warnings for embassy docs 2022-06-23 13:01:10 +02:00
bors[bot]
84628d36cf
Merge #826
826: Bump bxcan version r=chemicstry a=chemicstry



Co-authored-by: chemicstry <chemicstry@gmail.com>
2022-06-22 23:48:45 +00:00
bors[bot]
cf69f78162
Merge #827
827: Fix PWM for advanced timers r=Dirbaio a=chemicstry

Advanced timers have additional BDTR register, which has a global output enable bit and it is disabled by default.

Also added an example for F4, but it will only work once https://github.com/embassy-rs/stm32-data/pull/149 is merged. We can also move it to some other chip, but I don't have anything else to test on atm.

Co-authored-by: chemicstry <chemicstry@gmail.com>
2022-06-22 23:33:29 +00:00
chemicstry
88c3737722 Simplify example 2022-06-23 02:30:55 +03:00
chemicstry
3cdd8c1aeb Fix PWM for advanced timers 2022-06-23 02:27:39 +03:00
chemicstry
31177d994f Fix example 2022-06-23 02:01:23 +03:00
chemicstry
2d2f9e39b9 Bump bxcan version 2022-06-23 01:42:21 +03:00
bors[bot]
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
bors[bot]
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
Dion Dokter
12dfc4dca3 Fixed a pubsub mutability inconsistency 2022-06-22 14:13:01 +02:00
Scott Mabin
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
bors[bot]
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
Dion Dokter
78c546f356 Added example and some defmt 2022-06-21 15:47:20 +02:00
bors[bot]
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
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