aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Move nRF's util into a separate crateThales Fragoso2021-03-078-222/+10
|
* Update `nrf-hal` to v0.12.1Timo Kröger2021-03-054-82/+19
| | | | Use the `psel_bits()` method to reduce #[cfg] clutter
* Remove cargo namespaced-featuresDario Nieuwenhuis2021-03-021-1/+1
|
* Move traits to separate crate.xoviat2021-03-023-5/+5
|
* Merge pull request #59 from akiles/interrupt_extDario Nieuwenhuis2021-03-015-1/+6
|\ | | | | move most interrupt methods to InterruptExt extension trait. Fixes #35
| * move most interrupt methods to InterruptExt extension trait. Fixes #35Dario Nieuwenhuis2021-03-015-1/+6
| |
* | nrf/spim: support all chipsDario Nieuwenhuis2021-03-011-7/+17
| |
* | nrf: add SPIMDario Nieuwenhuis2021-03-012-0/+302
|/
* Fix warnings.Dario Nieuwenhuis2021-03-012-4/+2
|
* Port qspi to PeripheralMutexDario Nieuwenhuis2021-02-281-106/+164
|
* Optimize PeripheralMutex code sizeDario Nieuwenhuis2021-02-281-15/+57
|
* interrupt: Split set_handler context.Dario Nieuwenhuis2021-02-265-20/+16
| | | | | | | | | | 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.
* Cleanup interrupt package naming. Fixes #40Dario Nieuwenhuis2021-02-268-24/+20
| | | | | | | | | 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.
* Fix some warnings.Dario Nieuwenhuis2021-02-261-0/+1
|
* Merge pull request #47 from akiles/simpler-rtcDario Nieuwenhuis2021-02-201-16/+38
|\ | | | | SImplify rtc overflow handling
| * Use Relaxed atomics with fence instead of SeqCstDario Nieuwenhuis2021-02-201-3/+4
| |
| * rtc: use SeqCst for periods.Dario Nieuwenhuis2021-02-151-2/+2
| |
| * SImplify rtc overflow handlingDario Nieuwenhuis2021-02-151-15/+36
| |
* | PeripheralMutex should be UnpinDario Nieuwenhuis2021-02-201-3/+6
|/
* Get rid of some warningsThales Fragoso2021-02-137-66/+63
|
* nrf/gpiote: new api: switch to owned structs, implement WaitForHigh/WaitForLow.Dario Nieuwenhuis2021-02-041-295/+285
|
* Executor API V2.Dario Nieuwenhuis2021-02-021-6/+6
| | | | | - 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)
* nrf/rtc: fix race when setting alarms too close to now.Dario Nieuwenhuis2021-01-131-11/+6
|
* nrf/rtc: use interrupt handler context for instance ptrDario Nieuwenhuis2021-01-131-29/+28
|
* nrf/buffered_uarte: fix stop not actually waiting for stopDario Nieuwenhuis2021-01-111-2/+2
|
* nrf/buffered_uarte: add set_baudrateDario Nieuwenhuis2021-01-111-0/+13
|
* nrf/buffered_uarte: stop on drop, add free()Dario Nieuwenhuis2021-01-112-8/+50
|
* Fix build on nrf52832Dario Nieuwenhuis2021-01-071-2/+2
|
* Add PPI+TIMER to buffered_uarte to prevent IRQ stormDario Nieuwenhuis2021-01-061-81/+100
|
* Simpliify PeripheralMutex a bit.Dario Nieuwenhuis2021-01-062-19/+22
|
* buffered_uarte naming cleanupDario Nieuwenhuis2021-01-061-18/+18
|
* Merge pull request #14 from timokroeger/uarte-power-optimizationDario Nieuwenhuis2021-01-052-39/+93
|\ | | | | UARTE power optimization and improvements
| * uarte: Low power wait for RX dropTimo Kröger2021-01-042-5/+18
| |
| * uarte: Wait for the peripheral to be disabledTimo Kröger2021-01-041-0/+2
| | | | | | | | | | | | | | | | Prevents a panic in the case of: 1. Abort a receive future 2. Free Uarte::free() 3. Uarte::new() -> panicked at 'assertion failed: uarte.enable.read().enable().is_disabled()'
| * uarte: Enable peripheral with first pollTimo Kröger2021-01-041-4/+6
| | | | | | | | This fixes a lockup when a future is dropped before it was polled.
| * uarte: Be on safe side with potentially racy codeTimo Kröger2021-01-041-23/+32
| | | | | | | | | | | | | | | | | | The PS does not specify how many cycles it takes for a STARTXX task to generate a XXSTARTED event. I think it is instantaneous but let’s be on the safe side for the following sequence: 1. poll() starttx 2. drop() txstarted not yet set, but future gets dropped 3. txstarted set by hardware, peripheral enabled after it was dropped
| * uarte: Only stop TX forcefully when a transmissions is runningTimo Kröger2021-01-041-19/+27
| | | | | | | | | | This comes with insignificant power consumption improvements but makes the code of the RX and TX case symmetric.
| * uarte: Only stop RX forcefully when a reception is runningTimo Kröger2021-01-041-17/+26
| | | | | | | | | | | | | | | | | | | | The STOPRX task always triggers a timeout of ~55bit times until the RXTO event is generated. Before we disabled the receiver only after the timeout. With this change the receiver is stopped right after reception has ended because the DMA buffer is full. For forced RX aborts like `stop()` or on drop still need to wait for the RXTO event before disabling the receiver.
| * uarte: Do not spin when stopping a receive futureTimo Kröger2021-01-041-4/+15
| | | | | | | | | | Spinning on drop() is still required when the future has not been stopped so that DMA finishes before the buffer is released.
* | Cleanup BufferedUarteDario Nieuwenhuis2021-01-051-91/+68
| |
* | Massicely simplify peripheral abstractionDario Nieuwenhuis2021-01-052-108/+52
| |
* | Add "context" pointer to owned interrupt handlers.Dario Nieuwenhuis2021-01-045-16/+21
|/
* Fix build on non-nrf52840Dario Nieuwenhuis2021-01-031-0/+1
|
* Introduce "peripheral" abstraction to share state between main and interrupt.Dario Nieuwenhuis2021-01-035-203/+290
|
* use hal::Pins for BufferedUarteDario Nieuwenhuis2021-01-021-25/+11
|
* Add Uart trait, implement it for nrf.Dario Nieuwenhuis2021-01-021-47/+54
|
* Don't use embedded_dma in nrf uarte.Dario Nieuwenhuis2021-01-021-32/+21
|
* Rename WakerStore -> WakerRegistration.Dario Nieuwenhuis2021-01-011-7/+7
|
* Low power UART driverTimo Kröger2020-12-302-0/+419
|
* Declare irqs for each nrf chipDario Nieuwenhuis2020-12-291-43/+201
|