Dario Nieuwenhuis
bd3deb785a
Update deps
2021-03-04 22:41:54 +01:00
Dario Nieuwenhuis
18f6b8ad68
thumbv6m support with emulated atomics
2021-03-04 21:56:31 +01:00
Dario Nieuwenhuis
88946840d1
Make Delay public
2021-03-02 21:16:43 +01:00
Dario Nieuwenhuis
d4f2c6cf00
Remove cargo namespaced-features
2021-03-02 21:15:12 +01:00
xoviat
7ef81c75e7
traits: add delay trait
...
delay allows downstream libraries
to use async delay without depending
on a specific delay implementation
2021-03-02 08:45:22 -06:00
xoviat
9626aee7db
Move traits to separate crate.
2021-03-02 00:32:23 +01:00
Dario Nieuwenhuis
084b64053a
Merge pull request #61 from xoviat/us-delay
...
add us delays
2021-03-01 19:06:57 +01:00
xoviat
a7549108a8
rename methods
2021-03-01 11:59:40 -06:00
xoviat
d029f651fa
add us delays
2021-03-01 11:47:55 -06:00
Dario Nieuwenhuis
45355f184a
move most interrupt methods to InterruptExt extension trait. Fixes #35
2021-03-01 00:44:38 +01:00
Dario Nieuwenhuis
7433dc1039
Port qspi to PeripheralMutex
2021-02-28 22:05:37 +01:00
Dario Nieuwenhuis
da91779117
interrupt: Split set_handler context.
...
Since introducing the ctx pointer, the handler is now two words, so setting it can
race with the interrupt firing. On race it's possible for the new handler to be
alled with the old ctx pointer or viceversa.
Rather than documenting this, it's better to split the function in two to make it
obvious to the user that it's not atomic. The user can use a critical section, or
disable/enable the interrupt to avoid races if this is a concern.
2021-02-26 02:04:48 +01:00
Dario Nieuwenhuis
17cf301d4f
Remove rand(), fixes #50
2021-02-26 01:58:00 +01:00
Dario Nieuwenhuis
11be9170ec
Cleanup interrupt package naming. Fixes #40
...
The `interrupt` package previously tried to be drop-in compatible with the
`interrupt` package from PACs. THis meant that there was both a PAC-style enum
value `UARTE0` and an embassy-style owned `UARTE0Interrupt` type. This made
things VERY confusing.
This drops compatibility with the PAC, improving the names for embassy interrupts.
2021-02-26 01:55:27 +01:00
Dario Nieuwenhuis
90476ef900
Fix some warnings.
2021-02-26 01:06:58 +01:00
fnafnio
f779ec4928
update defmt and defmt-rtt to 0.2.0
2021-02-24 08:44:23 +01:00
Dario Nieuwenhuis
7321ddb0b3
Update to cortex-m 0.7
2021-02-14 23:26:50 +01:00
Thales Fragoso
b69f72e055
Get rid of some warnings
2021-02-13 21:41:36 -03:00
Dario Nieuwenhuis
1879703153
CriticalSectionMutex should require Send.
2021-02-03 16:29:35 +01:00
Dario Nieuwenhuis
d71c4b4551
Make spawners Copy+Clone
2021-02-03 04:41:46 +01:00
Dario Nieuwenhuis
4192e52629
Update embassy-std to new executor api
2021-02-03 04:30:11 +01:00
Dario Nieuwenhuis
aeaa34d7a1
Executor API V2.
...
- It's no longer possible to call run() reentrantly from within a task (soundness issue)
- it's now possible to spawn Send tasks across threads (SendSpawner, #37 )
2021-02-02 05:20:41 +01:00
xoviat
e0183f4495
optimize interruptfuture
...
remove critical secitons, impl. Unpin
2021-01-21 10:59:14 -06:00
xoviat
6503f9dbf5
implement interruptfuture
...
converts an interrupt to a future
2021-01-21 10:22:30 -06:00
Dario Nieuwenhuis
5b897b6605
executor: Add 'raw' api to wake tasks through raw pointers.
2021-01-21 01:00:12 +01:00
Dario Nieuwenhuis
4e789c663c
Merge pull request #15 from akiles/gpio-wait
...
RFC: GPIO WaitForFoo traits
2021-01-15 23:06:07 +01:00
Dario Nieuwenhuis
c91882a72c
Add CriticalSectionMutex, ThreadModeMutex.
2021-01-11 10:38:43 +01:00
Dario Nieuwenhuis
877fc0321a
WakerRegistration: Wake previous task if any
2021-01-11 10:38:25 +01:00
Dario Nieuwenhuis
60df9e0d38
Add non_exhaustive attrs.
2021-01-09 00:51:07 +01:00
Dario Nieuwenhuis
f6be0b8d12
Add gpio WaitForFoo traits
2021-01-06 01:10:48 +01:00
Dario Nieuwenhuis
9bb4c97dc2
Merge pull request #14 from timokroeger/uarte-power-optimization
...
UARTE power optimization and improvements
2021-01-05 22:10:52 +01:00
Timo Kröger
0631623b51
uarte: Low power wait for RX drop
2021-01-04 22:55:40 +01:00
Dario Nieuwenhuis
9e88718fbd
Add "context" pointer to owned interrupt handlers.
2021-01-04 22:25:39 +01:00
Dario Nieuwenhuis
0ab88ea279
Add Uart trait, implement it for nrf.
2021-01-02 19:59:37 +01:00
Dario Nieuwenhuis
1d53985abe
Remove now-stable slice_fill feature
2021-01-02 19:56:05 +01:00
Dario Nieuwenhuis
4783222f67
Rename WakerStore -> WakerRegistration.
2021-01-01 22:30:11 +01:00
Timo Kröger
c97d5262f5
Blocking wait method for signals
2020-12-30 19:24:12 +01:00
Dario Nieuwenhuis
6bc1a712ff
Fix Forever
2020-12-30 04:17:45 +01:00
Dario Nieuwenhuis
a02d0a378e
Fix race in enqueuing expired tasks.
2020-12-30 04:12:48 +01:00
Dario Nieuwenhuis
bb6f25d010
Remove use of deprecated compare_and_swap.
2020-12-30 01:07:22 +01:00
Dario Nieuwenhuis
015b6bbce4
Ensure timers always yield at least once.
...
This prevents a task that's constantly running late from monopolizing the CPU.
Add executor_fairness_test example showcasing it.
2020-12-30 00:57:35 +01:00
Dario Nieuwenhuis
0750234fbe
WIP owned irqs
2020-12-29 00:05:52 +01:00
Dario Nieuwenhuis
b01a88a839
Do not run timer queue if no alarm is set.
2020-12-29 00:04:58 +01:00
Dario Nieuwenhuis
4a7344cb6f
Add embassy-std crate with glue to run embassy on std.
2020-12-28 03:41:40 +01:00
Dario Nieuwenhuis
32c67381df
Add missing ?Sized bound in read_line
2020-12-27 23:34:05 +01:00
Dario Nieuwenhuis
692d8bb813
More efficient timer queue, integrated into Executor directly.
2020-12-26 23:44:53 +01:00
Dario Nieuwenhuis
8b7a42a4f9
Split waker to separate file.
2020-12-26 17:22:36 +01:00
Dario Nieuwenhuis
3df66c44e3
Split executor into multiple files, remove old timers implementation.
2020-12-26 16:42:44 +01:00
Dario Nieuwenhuis
db8b4ca565
Better SpawnToken error messages
2020-12-26 15:15:50 +01:00
Dario Nieuwenhuis
80c504cd95
Add std impl for rand
2020-12-14 00:36:29 +01:00