Commit Graph

179 Commits

Author SHA1 Message Date
07d4b196f7 Update nightly, remove removed features. 2021-08-04 19:48:14 +02:00
250f1cd0a5 util: fix unused return warning 2021-08-04 19:38:05 +02:00
6043383008 Remove version pinning workaround. 2021-08-02 20:47:30 +02:00
f2c2ad06ca Use lifetime to ensure only a single future is created at a time 2021-08-02 12:42:06 +02:00
4d8d8e386f Make RecvFuture sync
RecvFuture always locks the underlying Channel when polled.
2021-08-02 11:18:59 +02:00
332bc44b8c Expose SendFuture and RecvFuture types
Having these types available makes it easier to store futures for later
use as the named types can be embedded in other types at compile time.
2021-08-02 10:45:50 +02:00
c8a48d726a Merge pull request #277 from Liamolucko/fix-peripheral-ub
extras: Fix UB in `Peripheral`
2021-07-29 13:08:30 +02:00
1b7ad7080e Add Send/Sync bounds to PeripheralState 2021-07-24 12:53:57 +10:00
72d6f79ec7 Feature no longer required given 1.55 2021-07-15 12:31:53 +10:00
3778f55d80 Provides a cleaner construction of the channel with the common "new" naming 2021-07-15 12:31:53 +10:00
6f78527aeb Partial borrow for receiver to enforce compile-time mpssc 2021-07-15 12:31:53 +10:00
076198a3b9 Small tidy up 2021-07-15 12:31:53 +10:00
d711e8a82c Eliminates unsoundness by using an UnsafeCell for sharing the channel 2021-07-15 12:31:53 +10:00
babee7f32a Tighten sender/receiver bounds 2021-07-15 12:31:53 +10:00
d86892ca56 Removed the closing state as it was not required 2021-07-15 12:31:53 +10:00
a247fa4f2c Explicitly drop non consumed items 2021-07-15 12:31:53 +10:00
7c723d2bfd Removed UB code around the send future 2021-07-15 12:31:52 +10:00
baab52d40c Avoid a race condition by reducing the locks to one 2021-07-15 12:31:52 +10:00
5a5795ef2b NoopMutex does not require an UnsafeCell 2021-07-15 12:31:52 +10:00
9b5f2e465b Tidying 2021-07-15 12:31:52 +10:00
108cffcba0 Migrated to the waker registration functionality for Embassy specific optimisations 2021-07-15 12:31:52 +10:00
dcd0c38109 Return a new future each time recv is called 2021-07-15 12:31:52 +10:00
f159beec1c Use of a NoopMutex 2021-07-15 12:31:52 +10:00
5f87c7808c Remove the cell and trait
At the expense of exposing the channel types again. We do this as we want to avoid using dyn traits given their overhead for embedded environments.
2021-07-15 12:31:52 +10:00
56b3e927fe ChannelState should be private 2021-07-15 12:31:52 +10:00
3fdf61c819 Constraint the use of ChannelCell to just channels 2021-07-15 12:31:52 +10:00
ae62948d6c Replace UnsafeCell
Using a new ChannelCell so that there's no leaking of the abstraction
2021-07-15 12:31:52 +10:00
1b49acc2f7 Fixed some clippy warnings 2021-07-15 12:31:52 +10:00
a156f72bfb Improves the representation of side effects 2021-07-15 12:31:52 +10:00
816b78c0d9 Reduces the types on sender and receiver
In exchange for an UnsafeCell being passed into split
2021-07-15 12:31:52 +10:00
1b9d5e5071 Multi Producer Single Consumer channel
An MPSC inspired by Tokio and Crossbeam. The MPSC is designed to support both single and multi core processors, with only single core implemented at this time. The allocation of the channel’s buffer is inspired by the const generic parameters that Heapless provides.
2021-07-15 12:31:52 +10:00
c210a6efd1 embassy/time: remove useless impl 2021-07-12 03:45:48 +02:00
16bb678368 Merge BlockingTimer and Delay 2021-07-12 03:45:48 +02:00
35a76c364a embassy/time: make optional via Cargo feature 2021-07-12 03:45:48 +02:00
94bd4eb7d5 embassy/time: refactor module structure 2021-07-12 03:45:48 +02:00
e13aa4c2a0 Add tests to our CI
Also found some doctests that were failing
2021-07-06 12:29:08 +10:00
56d0c5ffe1 Fix warnings in std and rp 2021-07-04 12:46:04 +10:00
51583afc1e Add docs for BlockingTimer and rename tick features 2021-06-28 18:52:27 -03:00
54197d1663 Add BlockingTimer and features to choose tick rate 2021-06-28 18:01:40 -03:00
3be49d3e79 fmt: Add dunmy use to avoid "unused variable" errors when no log is enabled. 2021-06-07 03:21:37 +02:00
ef1ebefec0 fmt: use absolute paths 2021-06-07 03:15:05 +02:00
e7dc5c0939 fmt: make all macros macro_rules so scoping is consistent. 2021-06-07 00:16:39 +02:00
628e58020f Add Unborrow trait bound for Interrupt
Allows the compiler to figure out bounds for wrapper code of owned
peripherals and interrupts.
Example: https://gist.github.com/timokroeger/f025ef590557f1cd6c2e9c7ab30442d2
2021-06-04 23:42:25 +02:00
ec9b51833c Allow non-mut register and wake 2021-06-01 15:18:53 +02:00
1c0ad53841 Unborrow docs 2021-05-19 23:39:45 +02:00
105c8504b6 Mark Unborrow as unsafe to implement 2021-05-19 23:29:33 +02:00
dc67d2f4a4 impl Unborrow for &'a mut T
This plays nicer with user code that's generic over peripheral traits like `Instance` or `Pin`.
2021-05-19 23:20:26 +02:00
a8902b0592 Fix build with executor-agnostic 2021-05-19 13:00:01 +02:00
cd0d3c4b0d Merge branch 'stm32-neo' 2021-05-17 02:16:17 +02:00
490152d028 Better interrupt handling 2021-05-14 23:42:09 -03:00