aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | nrf/saadc: nrf52820 doesn't have it.Dario Nieuwenhuis2021-10-111-3/+0
| |
* | Conflates the negative and positive types as they are the same, and renames ↵huntc2021-10-111-66/+26
| | | | | | | | pin to input as they can be more than pins
* | Removed the NotConnected as it isn't used.huntc2021-10-111-14/+0
| |
* | No use case understood for NotConnected, so hiding it for nowhuntc2021-10-111-2/+1
| |
* | No need for unwraphuntc2021-10-111-2/+1
| |
* | Need to borrow the pins for the lifetime of the config, and subsequently the ↵huntc2021-10-111-5/+9
| | | | | | | | one shot.
* | Extend SAADC one shot supporthuntc2021-10-091-39/+136
|/ | | | | | | | One-shot mode now permits the sampling of differential pins, and the sampling of multiple pins simultaneously. A new ChannelConfig structure has been introduced so that multiple channels can be configured individually. Further, the `sample` method now accepts a buffer into which samples are written. Along the way, I've reset some default configuration to align with Nordic's settings in their nrfx saadc driver. Specifically, the channel gain defaults to 6 (from 4) and the time defaults to 10us (from 20us).
* nrf/saadc: remove Sample trait.Dario Nieuwenhuis2021-10-071-20/+2
|
* embassy: Refactor module structure to remove kitchen-sink `util`.Dario Nieuwenhuis2021-09-1110-14/+25
|
* Remove trait_alias, allow(incomplete_features).Dario Nieuwenhuis2021-09-031-1/+0
| | | | trait_alias seems unused. no idea why it's there.
* Merge pull request #382 from fnafnio/typestate_nrf_timerDario Nieuwenhuis2021-09-023-49/+74
|\ | | | | Typestate nrf timer
| * removed type aliasesf_punk2021-09-023-16/+15
| | | | | | | | | | NotAwaitable as default generic param added awaitable_timer example
| * moved CC::wait to awaitable typestatef_punk2021-09-011-34/+34
| |
| * added typestate to nrf-Timerf_punk2021-09-013-15/+41
| | | | | | | | | | useful for hooking up the PPI to an Event without needing interrupt tested with buffered_uart example on nRF52840-DK
* | nrf/saadc: don't use wake_on_interrupt.Dario Nieuwenhuis2021-09-011-13/+23
|/
* time: allow storing state inside the driver struct.Dario Nieuwenhuis2021-08-251-37/+18
|
* Expose EASY_DMA_SIZE.Richard Dodd2021-08-228-0/+9
|
* nrf: make gpiote and time-driver optional via cargo features.Dario Nieuwenhuis2021-08-201-0/+8
|
* nrf/wdt: add handle stealDario Nieuwenhuis2021-08-201-0/+8
|
* nrf/time: allow configuring the rtc irq prioDario Nieuwenhuis2021-08-182-5/+9
|
* nrf: add WDT driverDario Nieuwenhuis2021-08-079-0/+175
|
* time_driver: use regular fn ptr -> raw ptr castsDario Nieuwenhuis2021-08-051-4/+1
|
* time: replace dyn clock/alarm with a global Driver traitDario Nieuwenhuis2021-08-052-121/+126
|
* Update nightly, remove removed features.Dario Nieuwenhuis2021-08-041-2/+0
|
* common: Initialize PeripheralMutex state with closure to ensure it's done ↵Dario Nieuwenhuis2021-08-021-16/+14
| | | | in-place.
* hal-common: remove Pin in PeripheralMutexDario Nieuwenhuis2021-08-021-52/+46
|
* Rename embassy-extras to embassy-hal-commonDario Nieuwenhuis2021-07-2920-22/+22
|
* Merge pull request #277 from Liamolucko/fix-peripheral-ubDario Nieuwenhuis2021-07-293-15/+17
|\ | | | | extras: Fix UB in `Peripheral`
| * Replace `PeripheralStateUnchecked` with `register_interrupt_unchecked`Liam Murphy2021-07-291-7/+6
| |
| * Remove critical sections from `PeripheralMutex` interrupt handler by ↵Liam Murphy2021-07-271-9/+11
| | | | | | | | | | | | | | | | 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-242-2/+2
| |
| * extras: Fix UB in `Peripheral`Liam Murphy2021-07-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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.
* | Formatting.Bob McWhirter2021-07-231-1/+1
| |
* | Split up the nRF impls for SPI traits.Bob McWhirter2021-07-231-7/+16
| |
* | all hals: reexport PAC if `unstable-pac` feature is set.Dario Nieuwenhuis2021-07-141-0/+4
|/
* nrf/gpio: fix unused warning on chips without portsDario Nieuwenhuis2021-07-051-5/+5
|
* Merge pull request #262 from Liamolucko/nrf-rngDario Nieuwenhuis2021-07-019-0/+266
|\ | | | | Add an nRF RNG driver
| * fix: check if `new_ptr == end`, not the old pointerLiam Murphy2021-06-301-2/+2
| |
| * Use atomics to share state instead of a `RefCell`Liam Murphy2021-06-301-57/+83
| |
| * Don't wake the future for every byte in `fill_bytes`Liam Murphy2021-06-301-14/+78
| |
| * Move initialisation inside of futureLiam Murphy2021-06-301-3/+3
| |
| * Add an nRF RNG driverLiam Murphy2021-06-299-0/+176
| | | | | | | | | | | | Resolves #187 Like the stm32 driver, this has both a non-blocking and blocking API, and implements `rand_core::RngCore` for the blocking API.
* | Correctly unset bitsLiam Murphy2021-06-291-2/+2
| |
* | Write bits directly to intenset/clr + shortsLiam Murphy2021-06-291-147/+18
| |
* | Handle differences between PACsLiam Murphy2021-06-291-15/+7
| |
* | Don't include extended timer support on chips without itLiam Murphy2021-06-291-0/+84
| |
* | Fix `Cc::event_compare`Liam Murphy2021-06-291-1/+1
| |
* | Get rid of the TODO about variant names, stop the timer before setting ↵Liam Murphy2021-06-291-8/+12
| | | | | | | | BITMODE and set a default frequency.
* | Fix `Cc::wait` never resolving and refactor some APIsLiam Murphy2021-06-293-67/+49
| | | | | | | | I think the interrupt was getting immediately re-triggered as soon as the handler exited, so I disabled the interrupt in the handler.
* | Add an nRF Timer driverLiam Murphy2021-06-263-48/+405
|/ | | | Resolves #189