aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf/src/bin/saadc_continuous.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rename examples/nrf to examples/nrf52840Dominik Boehi2023-01-091-68/+0
|
* Split embassy-time from embassy-executor.Dario Nieuwenhuis2022-08-181-3/+3
|
* Remove HAL initialization from #[embassy::main] macro.Dario Nieuwenhuis2022-08-171-2/+3
|
* Split embassy crate into embassy-executor, embassy-util.Dario Nieuwenhuis2022-07-291-4/+4
|
* Run rustfmt.Dario Nieuwenhuis2022-06-121-3/+1
|
* Use embassy/defmt-timestamp-uptime in all examples.Dario Nieuwenhuis2022-04-021-3/+4
|
* Simplifies the API by taking in the TIMER and PPI channelshuntc2022-03-071-20/+6
|
* Improve nRF Saadc samplinghuntc2022-03-071-17/+40
| | | | | | | | | | Starting the sampling task prior to starting the SAADC peripheral can lead to unexpected buffer behaviour with multiple channels. We now provide an init callback at the point where the SAADC has started for the first time. This callback can be used to kick off sampling via PPI. We also need to trigger the SAADC to start sampling the next buffer when the previous one is ended so that we do not drop samples - the major benefit of double buffering. As a bonus we provide a calibrate method as it is recommended to use before starting up the sampling. The example has been updated to illustrate these new features.
* Fix interrupt_take macro by specifying path to panic macro.Matous Hybl2021-11-231-1/+0
|
* Fixed examplesDion Dokter2021-10-261-3/+1
|
* Use types to strengthen the buffer dimensioninghuntc2021-10-181-6/+4
|
* Removed the Mode enum and factored out into two functions so that we can ↵huntc2021-10-181-2/+2
| | | | assert channel limits
* We have to reduce the buffer size to cater for the number of channels to scanhuntc2021-10-181-2/+2
|
* We must allow the run handler to mutate statehuntc2021-10-181-2/+17
| | | | The handler may well need to close over and mutate state
* Implements continuous sampling for the nRF SAADChuntc2021-10-181-0/+49
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.