aboutsummaryrefslogtreecommitdiff
path: root/embassy-extras/src
Commit message (Collapse)AuthorAgeFilesLines
* Rename embassy-extras to embassy-hal-commonDario Nieuwenhuis2021-07-2910-2219/+0
|
* Don't bother supporting creating a `PeripheralMutex` in an exception handlerLiam Murphy2021-07-291-31/+5
|
* Replace `PeripheralStateUnchecked` with `register_interrupt_unchecked`Liam Murphy2021-07-293-53/+74
|
* Don't allow disabling interrupts wrapped by `PeripheralMutex`Liam Murphy2021-07-282-36/+1
|
* fix: interrupts with equal priority can't preempt each otherLiam Murphy2021-07-281-24/+4
|
* Remove critical sections from `PeripheralMutex` interrupt handler by ↵Liam Murphy2021-07-273-35/+172
| | | | | | | | checking the interrupt's priority on startup. Since `PeripheralMutex` is the only way to safely maintain state across interrupts, and it no longer allows setting the interrupt's priority, the priority changing isn't a concern. This also prevents other causes of UB due to the interrupt being exposed during `with`, and allowing enabling the interrupt and setting its context to a bogus pointer.
* Add `Send/Sync` bounds to `PeripheralState`Liam Murphy2021-07-243-22/+37
|
* Fix stm32 ethernetLiam Murphy2021-07-052-4/+4
|
* Elide lifetimes on `Peripheral::state`Liam Murphy2021-07-051-1/+1
|
* extras: Fix UB in `Peripheral`Liam Murphy2021-07-053-26/+82
| | | | | | | | | | | | | | | | | | `Peripheral` assumed that interrupts can't be preempted, when they can be preempted by higher priority interrupts. So I put the interrupt handler inside a critical section, and also added checks for whether the state had been dropped before the critical section was entered. I also added a `'static` bound to `PeripheralState`, since `Pin` only guarantees that the memory it directly references will not be invalidated. It doesn't guarantee that memory its pointee references also won't be invalidated. There were already some implementations of `PeripheralState` that weren't `'static`, though, so I added an unsafe `PeripheralStateUnchecked` trait and forwarded the `unsafe` to the constructors of the implementors.
* fmt: Add dunmy use to avoid "unused variable" errors when no log is enabled.Dario Nieuwenhuis2021-06-071-16/+26
|
* fmt: use absolute pathsDario Nieuwenhuis2021-06-071-29/+29
|
* fmt: make all macros `macro_rules` so scoping is consistent.Dario Nieuwenhuis2021-06-072-47/+146
|
* Mark Unborrow as unsafe to implementDario Nieuwenhuis2021-05-191-3/+3
|
* impl Unborrow for &'a mut TDario Nieuwenhuis2021-05-191-16/+0
| | | | This plays nicer with user code that's generic over peripheral traits like `Instance` or `Pin`.
* Fix warningsRukai2021-05-171-1/+1
|
* Add `init` fn. Initializes hw and returns Peripherals.Dario Nieuwenhuis2021-05-171-7/+6
|
* Add PriorityX enums to embassy-extras::interruptDario Nieuwenhuis2021-05-112-0/+572
|
* Use `critical_section` crateDario Nieuwenhuis2021-05-111-1/+1
|
* Rename PeripheralBorrow to UnborrowDario Nieuwenhuis2021-04-141-4/+4
|
* extras: fix build with defmtDario Nieuwenhuis2021-04-101-1/+1
|
* Mark peripherals as takenIan McIntyre2021-04-011-0/+1
|
* Fix unused import warningsDario Nieuwenhuis2021-03-291-1/+1
|
* take clocks on peripheral takexoviat2021-03-291-1/+1
|
* cleanup and consolidate peripherals macroxoviat2021-03-291-0/+39
|
* extras: fix missing absolute path in impl_borrowDario Nieuwenhuis2021-03-291-2/+2
|
* extras: add impl_unborrow macroDario Nieuwenhuis2021-03-291-0/+21
|
* nrf/rtc: update to new apiDario Nieuwenhuis2021-03-291-11/+12
|
* Code size optimizations.Dario Nieuwenhuis2021-03-292-13/+0
|
* extras: add Peripheral with shared state (like PeripheralMutex but without ↵Dario Nieuwenhuis2021-03-292-0/+69
| | | | mutex)
* extras: add missing cfg to peripherals macroDario Nieuwenhuis2021-03-291-0/+1
|
* nrf/uart: make rts/cts optional.Dario Nieuwenhuis2021-03-291-1/+1
|
* nrf: add unborrow! macroDario Nieuwenhuis2021-03-291-0/+9
|
* nrf: nicer Peripherals api, add take()Dario Nieuwenhuis2021-03-291-21/+51
|
* extras: move peripherals from nrf to extrasDario Nieuwenhuis2021-03-292-0/+46
|
* Move USB to embassy-extrasThales Fragoso2021-03-194-0/+903
|
* USB: Use updated PeripheralMutexThales Fragoso2021-03-191-0/+6
|
* peripheralmutex: separate interrupt registration to own method.Dario Nieuwenhuis2021-03-181-12/+13
|
* Remove free() from PeripheralMutex and all nrf drivers.Dario Nieuwenhuis2021-03-181-57/+20
|
* Allow unused stuff in fmt.rsDario Nieuwenhuis2021-03-181-0/+1
|
* Do not export fmt macros.Dario Nieuwenhuis2021-03-171-6/+0
| | | | This was introduced by accident by me struggling with the weird intra-crate macro importing system...
* Move nRF's util into a separate crateThales Fragoso2021-03-074-0/+335