aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * usb: simplify buffer handling for Control IN transfers.Dario Nieuwenhuis2022-04-061-9/+8
| |
| * usb: nicer names for control structs.Dario Nieuwenhuis2022-04-061-13/+7
| |
| * usb: move all control-related stuff to `mod control`.Dario Nieuwenhuis2022-04-061-3/+4
| |
| * usb: associate ControlHandlers with interfaces, automatically route requests.Dario Nieuwenhuis2022-04-061-35/+18
| |
| * usb: add `add_class` to builder, so that `FooBarClass::new(&mut builder)` ↵Dario Nieuwenhuis2022-04-062-127/+91
| | | | | | | | can set up everything.
| * Use trait objects instead of generics for UsbDevice::classesalexmoon2022-04-062-69/+52
| |
| * Add support for USB classes handling control requests.alexmoon2022-04-062-16/+114
| |
| * Add some comments on the example.Dario Nieuwenhuis2022-04-061-1/+13
| |
| * Working CDC-ACM device->hostDario Nieuwenhuis2022-04-061-4/+14
| |
| * Working CDC-ACM host->deviceDario Nieuwenhuis2022-04-062-9/+23
| |
| * wip: experimental async usb stackDario Nieuwenhuis2022-04-064-155/+409
| |
* | Merge #696bors[bot]2022-04-061-0/+44
|\ \ | |/ |/| | | | | | | | | | | | | | | 696: Add async Mutex. r=Dirbaio a=Dirbaio What it says on the tin :) It allows sharing data between tasks when you want to `.await` stuff while holding it locked. Co-authored-by: Dario Nieuwenhuis <[email protected]>
| * Add async Mutex.Dario Nieuwenhuis2022-04-061-0/+44
| |
* | Simpler Channel.Dario Nieuwenhuis2022-04-064-74/+106
|/ | | | | | | - Allow initializing in a static, without Forever. - Remove ability to close, since in embedded enviromnents channels usually live forever and don't get closed. - Remove MPSC restriction, it's MPMC now. Rename "mpsc" to "channel". - `Sender` and `Receiver` are still available if you want to enforce a piece of code only has send/receive access, but are optional: you can send/receive directly into the Channel if you want.
* Use embassy/defmt-timestamp-uptime in all examples.Dario Nieuwenhuis2022-04-0234-142/+123
|
* 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.
* Merge #613bors[bot]2022-02-122-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
| * blocking_mutex: refactor to work on stable. No GATs, and can be constructed ↵Dario Nieuwenhuis2022-02-122-6/+6
| | | | | | | | in const.
* | nrf: remove OptionalPinDario Nieuwenhuis2022-02-129-25/+10
|/
* Further API simplification for the single seq scenariohuntc2022-02-053-9/+6
|
* Removed unrequired clonehuntc2022-02-041-1/+1
|
* Introduced the SingleSequencer and a more complex Sequencerhuntc2022-02-044-27/+62
|
* Small correction to timeshuntc2022-02-041-1/+1
|
* Revert the use of foreverhuntc2022-02-041-7/+2
|
* Update another examplehuntc2022-02-041-13/+14
|
* Expose PWMhuntc2022-02-042-11/+17
|
* Introduces a Sequences structhuntc2022-02-041-21/+18
|
* Some more docohuntc2022-01-301-2/+2
|
* Revert "Own the sequence buffer"huntc2022-01-303-32/+36
| | | | This reverts commit 482389a6911d8d3505872e6ad03d5b0af565eaf9.
* Own the sequence bufferhuntc2022-01-293-36/+32
| | | | 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-283-14/+41
|
* Make the sequence a little nicer to pass aroundhuntc2022-01-283-27/+23
|
* PWM WS2812B example and per sequence confighuntc2022-01-283-9/+83
| | | | 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-252-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-242-2/+2
| | | | 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-232-17/+11
| | | | 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/rng: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-131-4/+2
|
* nrf/qspi: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-132-2/+0
|
* nrf/uarte: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-133-13/+7
|
* nrf/gpiote: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-132-2/+0
|
* nrf/twim: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-132-2/+2
|
* nrf/spim: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-131-5/+4
|
* Remove unsafe from new on RNDhuntc2022-01-061-1/+1
| | | | Unsafe is not required here given that all futures are required to live longer than their global peripheral instances. There are other occurrences of unsafe being used on new that should be removed. I started to do that but then went down a bit of a rabbit hole.
* Merge #539bors[bot]2022-01-042-0/+161
|\ | | | | | | | | | | | | | | | | | | 539: nrf: async usb r=Dirbaio a=jacobrosenthal Frankensteined together from this old pr https://github.com/embassy-rs/embassy/pull/115 and nrf-usdb ~Doesnt currently work..~ Co-authored-by: Jacob Rosenthal <[email protected]>
| * example cleanupJacob Rosenthal2021-12-162-5/+2
| |
| * usb_uart_io example equivilent to usb_uartJacob Rosenthal2021-12-161-0/+70
| |
| * simplify usb_uart exampleJacob Rosenthal2021-12-161-30/+30
| |
| * cleanup exampleJacob Rosenthal2021-12-151-23/+25
| |
| * enable USB peripheral for relevant chipsJacob Rosenthal2021-12-151-2/+2
| |