aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src
Commit message (Collapse)AuthorAgeFilesLines
...
* nrf: nrf52832 doesn't have SPI3Dario Nieuwenhuis2022-03-221-1/+0
|
* nrf/gpio: Make Input is_high/is_low public.Dario Nieuwenhuis2022-03-172-6/+6
|
* Update rust nightly, embedded-hal 1.0, embedded-hal-async.Dario Nieuwenhuis2022-03-114-324/+163
|
* Merge #640bors[bot]2022-03-095-50/+238
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 640: Skip EasyDMA slice location check for empty slices and copy data if necessary r=Dirbaio a=TilBlechschmidt As discussed, this PR makes the following changes: - Ignore pointer location of zero-length slices (fixes #631) - Change default functions so they copy the tx buffer if it does not reside in RAM - Introduce new variants for `write`, `transfer`, and their blocking versions which fails instead of copying - Add documentation about the motivation behind all these variants <img width="984" alt="image" src="https://user-images.githubusercontent.com/5037967/155415788-c2cd1055-9289-4004-959d-be3b1934a439.png"> Remaining TODOs: - [x] Change copying behaviour for other peripherals - [x] TWI - [x] UART - [x] Add module-level documentation regarding EasyDMA and `_from_ram` method variants `@Dirbaio` it probably makes sense for you to review it now before I "copy" over the changes to the other two peripherals. Co-authored-by: Til Blechschmidt <[email protected]>
| * Move EasyDMA documentation to module levelTil Blechschmidt2022-03-084-38/+53
| |
| * Fix inverted boolean conditionTil Blechschmidt2022-03-081-1/+1
| |
| * Refactor _from_ram methods to use more readable copy operationTil Blechschmidt2022-03-023-23/+18
| |
| * Change TWIM methods to copy slice if required and add non-copying variantsTil Blechschmidt2022-03-021-41/+86
| |
| * Change UARTE methods to copy slice if required and add non-copying variantsTil Blechschmidt2022-03-021-1/+35
| |
| * Fix EasyDMA slice copying not actually copying dataTil Blechschmidt2022-02-231-4/+7
| |
| * Change slice length check to use stable methodTil Blechschmidt2022-02-232-2/+3
| |
| * Add defmt log outputs for SPIM memcpyTil Blechschmidt2022-02-231-0/+2
| |
| * Change SPIM methods to copy slice if required and add non-copying variantsTil Blechschmidt2022-02-231-4/+97
| |
| * Skip EasyDMA slice location check if slice is emptyTil Blechschmidt2022-02-232-3/+3
| |
* | Simplifies the API by taking in the TIMER and PPI channelshuntc2022-03-071-39/+53
| |
* | Improve nRF Saadc samplinghuntc2022-03-071-7/+76
| | | | | | | | | | | | | | | | | | | | 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.
* | docs: prevent inline doc spam for reexports.Dario Nieuwenhuis2022-03-043-0/+7
|/
* time: better docs explaining overflow handling.Dario Nieuwenhuis2022-02-231-18/+45
|
* Merge #615bors[bot]2022-02-121-1/+0
|\ | | | | | | | | | | | | | | 615: rp: remove OptionalPin r=Dirbaio a=Dirbaio Mirror of https://github.com/embassy-rs/embassy/pull/605 for rp2040 Co-authored-by: Dario Nieuwenhuis <[email protected]>
| * nrf: remove stray mention of OptionalPinDario Nieuwenhuis2022-02-121-1/+0
| |
* | Merge #613bors[bot]2022-02-126-79/+92
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 613: Rust stable support r=Dirbaio a=Dirbaio This PR adds (limited) stable Rust support! The drawbacks are: - No `#[embassy::task]`, `#[embassy::main]`. (requires `type_alias_impl_trait`). You have to manually allocate the tasks somewhere they'll live forever. See [example](https://github.com/embassy-rs/embassy/blob/master/examples/nrf/src/bin/raw_spawn.rs) - No async trait impls (requires GATs). Note that the full API surface of HALs is still available through inherent methods: #552 #581 - Some stuff is not constructible in const (requires `const_fn_trait_bound`), although there's an (ugly) workaround for the generic `Mutex`. So it's not that bad in the end, it's fully usable for shipping production-ready firmwares. We'll still recommend nightly as the default, until GATs and `type_alias_impl_trait` are stable. Co-authored-by: Dario Nieuwenhuis <[email protected]>
| * embassy, embassy-nrf: add `nightly` Cargo feature to gate nightly-only features.Dario Nieuwenhuis2022-02-125-78/+90
| |
| * blocking_mutex: refactor to work on stable. No GATs, and can be constructed ↵Dario Nieuwenhuis2022-02-121-1/+2
| | | | | | | | in const.
* | nrf: remove OptionalPinDario Nieuwenhuis2022-02-125-144/+317
|/
* Upgrade to embedded-storage 0.3.0Ulf Lilleengen2022-02-071-2/+15
|
* Further API simplification for the single seq scenariohuntc2022-02-051-2/+2
|
* Forgot to expose the stop methodhuntc2022-02-041-0/+8
|
* Introduced the SingleSequencer and a more complex Sequencerhuntc2022-02-041-41/+72
|
* Expose PWMhuntc2022-02-041-2/+2
|
* Doco correctionhuntc2022-02-041-3/+3
|
* Introduces a Sequences structhuntc2022-02-041-131/+143
|
* Clarify why we need the mut bufferhuntc2022-02-041-0/+2
|
* Some more docohuntc2022-01-301-0/+3
|
* Revert "Own the sequence buffer"huntc2022-01-301-76/+32
| | | | This reverts commit 482389a6911d8d3505872e6ad03d5b0af565eaf9.
* Own the sequence bufferhuntc2022-01-291-32/+76
| | | | This approach owns the sequence buffers which, while introducing an extra move, it eliminates the need to guard the lifetime of the sequence buffer. Given ownership, the buffer will be retained until the PWM sequence task is stopped.
* Now permits sequences to be mutated subsequentlyhuntc2022-01-281-7/+17
|
* Doc tidyinghuntc2022-01-281-3/+1
|
* Make the sequence a little nicer to pass aroundhuntc2022-01-281-17/+29
|
* PWM WS2812B example and per sequence confighuntc2022-01-281-27/+62
| | | | Demonstrates how to set the colour of a WS2812B to blue using PWM, and the use of multiple sequences along with their own config. This required an API change.
* Stop PWM before assigning the new sequencehuntc2022-01-251-2/+2
| | | | | | I had introduced a small bug in my last PR where I assigned the sequence before stopping the PWM. I now stop the PWM before doing that now. Also, corrected a math comment.
* Strengthen the borrowhuntc2022-01-241-1/+1
| | | | The start method is now safe. Because it has the potential of borrowing the sequence and mutating itself, the sequence must outlive the Pwm struct.
* Permit many sequences to be passedhuntc2022-01-231-30/+32
| | | | Sequences are now passed in via the start method to avoid having to stop the PWM and restart it. Sequences continue to be constrained with the same lifetime of the Pwm object itself. The pwm_sequence example has been extended to illustrate multiple sequences being passed around.
* nrf: return ptr in slice_ptr_partsDario Nieuwenhuis2022-01-191-3/+3
|
* nrf: impl embedded-hal 1.0 and embedded-hal-async traits.Dario Nieuwenhuis2022-01-136-251/+903
|
* nrf/rng: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-131-64/+51
|
* nrf/qspi: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-131-120/+88
|
* nrf/uarte: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-131-184/+257
|
* nrf/gpiote: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-132-52/+31
|
* nrf/gpio: Rename FlexPin to Flex.Dario Nieuwenhuis2022-01-132-16/+16
| | | | FlexPin sounds like it's an owned pin singleton, like AnyPin or NoPin.
* nrf/twim: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-131-265/+155
|