Implements continuous sampling for the nRF SAADC and also renames `OneShot` to `Saadc`. The one-shot behaviour is retained with the `sample` method and a new `run_sampler` method is provided for efficiently (i.e. zero copying) sampler processing. A double buffer is used for continuously sampling, which wlll be swapped once sampling has taken place.
A sample frequency is provided and will set the internal timer of the SAADC when there is just the one channel being sampled. Otherwise, PPI will be used to hook up the TIMER peripheral to drive the sampling task.
434: Clippy fixes r=Dirbaio a=Dirbaio
Fixes most clippy lints.
Added `#![allow(clippy::new_without_default)]` because I really, really don't agree with `new()` being the same as `default()`...
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
429: nrf/uarte: do not use WFE on drop. r=Dirbaio a=Dirbaio
- It disturbs other stuff that uses WFE/SEV in the system. I ran into issues with this.
- It needs the irq handler to check for RXTO/TXSTOPPED errors, which makes it slower.
431: interrupt: transmute instead of steal. r=Dirbaio a=Dirbaio
That steal method has a TAKEN=true write [here](6b013138b7/src/peripheral/mod.rs (L180)).
This is not zero cost, we don't want it. Transmute instead, which is zero cost.
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
That steal method has a TAKEN=true write [here](6b013138b7/src/peripheral/mod.rs (L180)).
This is not zero cost, we don't want it. Transmute instead, which is zero cost.
- It disturbs other stuff that uses WFE/SEV in the system. I ran into
issues with this.
- It needs the irq handler to check for RXTO/TXSTOPPED errors, which makes
it slower.
423: nRF9160 support r=Dirbaio a=diondokter
- Created a chip file with all the peripherals, interrupts and peripheral implementations.
- All peripherals now use an alias for the NS (non-secure) version of the nRF9160 version.
- Implementations of peripherals that don't exist are ignored.
- Most PPI functionality has been stubbed out because the nRF91 has the newer DPPI which is not compatible with the current API. (The channels are also set to not configurable, so they are kinda useless now, but in principle the stubs should never be called)
Co-authored-by: Dion Dokter <dion@tweedegolf.com>