Commit Graph

46 Commits

Author SHA1 Message Date
Dario Nieuwenhuis
a0487380da Replace futures::future::poll_fn -> core::future::poll_fn. 2022-09-22 16:42:49 +02:00
Dario Nieuwenhuis
21072bee48 split embassy-util into embassy-futures, embassy-sync. 2022-08-22 22:18:13 +02:00
Til Blechschmidt
43b8c0c71e
Remove commented out logging code 2022-08-01 12:57:00 +02:00
Til Blechschmidt
fa2fbcbde0
Extend QSPI config with freq, delay, spi mode, and address mode 2022-08-01 12:54:49 +02:00
Dario Nieuwenhuis
a0f1b0ee01 Split embassy crate into embassy-executor, embassy-util. 2022-07-29 23:40:36 +02:00
Dario Nieuwenhuis
f02ba35482 Remove PeripheralRef::into_inner() 2022-07-23 14:27:45 +02:00
Dario Nieuwenhuis
4901c34d9c Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral 2022-07-23 14:00:19 +02:00
Grant Miller
65a82d02d1 WIP: Make unborrow safe to use 2022-07-23 01:33:22 +02:00
Dario Nieuwenhuis
a8703b7598 Run rustfmt. 2022-06-12 22:22:31 +02: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
Ulf Lilleengen
e966125d62 Add embedded-storage trait impls for QSPI
* Adds implementations of embedded-storage and embedded-storage-async
for QSPI
* Add blocking implementations of QSPI
* Use blocking implementation in new() and embedded-storage impls
* Use async implementation in embedded-storage-async impls
* Add FLASH_SIZE const generic parameter
* Own IRQ in Qspi to disable it on drop
2022-04-19 19:06:36 +02:00
Dario Nieuwenhuis
df00c83984 nrf/qspi: expose all functionality as inherent methods. 2022-01-13 23:56:39 +01:00
Dario Nieuwenhuis
d1740b10f0 Lower some verbose logs to trace. 2021-12-23 13:43:14 +01:00
Ulf Lilleengen
2bbd1ddb8a Remove unneeded rustfmt::skip 2021-12-16 11:37:53 +01:00
Dario Nieuwenhuis
ead987245d embassy: Refactor module structure to remove kitchen-sink util. 2021-09-11 02:35:35 +02:00
Dario Nieuwenhuis
7bfb763e09 Rename embassy-extras to embassy-hal-common 2021-07-29 13:44:51 +02:00
Dario Nieuwenhuis
e7dc5c0939 fmt: make all macros macro_rules so scoping is consistent. 2021-06-07 00:16:39 +02:00
Dario Nieuwenhuis
3bd36dce76 nrf/qspi: wait MORE for DPM enter. 2021-05-27 00:42:29 +02:00
Dario Nieuwenhuis
de703eb605 nrf/qspi: proper lowpower drop, supporting DPM. 2021-05-26 23:26:07 +02:00
Rukai
3e83acc1cb Fix unused field warnings 2021-05-17 20:23:04 +10:00
Rukai
149ddf2f29 Fix warnings 2021-05-17 19:48:58 +10:00
Dario Nieuwenhuis
a5ad79927e nrf: add Unborrow<Target = Self> bound to all instance traits 2021-05-17 01:01:31 +02:00
Dario Nieuwenhuis
bd9589d0ce nrf: add support for nrf52805, nrf52811, nrf52820 2021-05-17 00:57:20 +02:00
Dario Nieuwenhuis
97ca54fa66 Rename PeripheralBorrow to Unborrow 2021-04-14 19:59:52 +02:00
Dario Nieuwenhuis
5ee87cf25d Remove Pin from Flash trait 2021-04-14 17:04:40 +02:00
Dario Nieuwenhuis
5b74e326e5 nrf/qpsi: make config non_exhaustive 2021-03-29 00:58:58 +02:00
Dario Nieuwenhuis
b9e709403d nrf: better macro naming. 2021-03-29 00:58:58 +02:00
Dario Nieuwenhuis
7b6086d19e nrf: add unborrow! macro 2021-03-29 00:58:58 +02:00
Dario Nieuwenhuis
d5ff1a0ae3 nrf: rename inner peripheral to peri for consistence 2021-03-29 00:58:57 +02:00
Dario Nieuwenhuis
ec7309962a nrf/qspi: update to new api 2021-03-29 00:58:57 +02:00
Dario Nieuwenhuis
0cd19a58c3 Remove free() from PeripheralMutex and all nrf drivers. 2021-03-18 18:49:10 +01:00
Thales Fragoso
15c3e78408 Move nRF's util into a separate crate 2021-03-07 20:15:40 -03:00
Timo Kröger
28b2365ef3 Update nrf-hal to v0.12.1
Use the `psel_bits()` method to reduce #[cfg] clutter
2021-03-05 09:25:46 +01:00
xoviat
9626aee7db Move traits to separate crate. 2021-03-02 00:32:23 +01:00
Dario Nieuwenhuis
8a641d1312 Fix warnings. 2021-03-01 00:23:54 +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
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
Thales Fragoso
b69f72e055 Get rid of some warnings 2021-02-13 21:41:36 -03:00
Dario Nieuwenhuis
9e88718fbd Add "context" pointer to owned interrupt handlers. 2021-01-04 22:25:39 +01:00
Dario Nieuwenhuis
4b8d8ba87e Update RTC for owned irqs 2020-12-29 01:05:28 +01:00
Dario Nieuwenhuis
0750234fbe WIP owned irqs 2020-12-29 00:05:52 +01:00
Dario Nieuwenhuis
6f76c0ebcc Add support for log+defmt again, but better. 2020-12-01 17:46:56 +01:00
Dario Nieuwenhuis
78135a81d9 Remove anyfmt 2020-11-27 18:42:59 +01:00
Dario Nieuwenhuis
0643095695 Fix build with all nrf chip models 2020-10-31 23:03:09 +01:00
Dario Nieuwenhuis
9a57deef9b First commit 2020-09-22 18:03:43 +02:00