aboutsummaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Merge #608bors[bot]2022-02-131-0/+26
|\ | | | | | | | | | | | | | | | | 608: stm32f4: add adc + example r=Dirbaio a=ain101 Example tested on stm32f407vg Discovery Board. minimal adc: no vref, dma, complex sequence Co-authored-by: Frederik <[email protected]>
| * stm32f4: add adc + exampleFrederik2022-02-101-0/+26
| | | | | | | | | | Example tested on stm32f407vg Discovery Board. minimal adc: no vref, dma, complex sequence
* | stm32: add rust stable supportDario Nieuwenhuis2022-02-1215-16/+74
| |
* | Merge #615bors[bot]2022-02-122-4/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | 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]>
| * | rp: remove OptionalPinDario Nieuwenhuis2022-02-122-4/+2
| | |
* | | Merge #613bors[bot]2022-02-126-12/+18
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-123-2/+5
| | |
| * | blocking_mutex: refactor to work on stable. No GATs, and can be constructed ↵Dario Nieuwenhuis2022-02-123-10/+13
| | | | | | | | | | | | in const.
* | | nrf: remove OptionalPinDario Nieuwenhuis2022-02-129-25/+10
|/ /
* | Merge #607bors[bot]2022-02-113-14/+21
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 607: stm32: Add standard crate-wide macros for pin/dma traits r=Dirbaio a=Dirbaio All drivers will declare the traits using these macros. This has a few implications: - ALL drivers will have an Instance trait, even for drivers that usually have only one instance (for example crc, eth) - It's no longer possible to have a fn configure() in pin traits, drivers will have to do that some other way In the future, build.rs will generate all the impls instead of macrotables. Pin/Dma traits are no longer explicitly sealed, since gpio::Pin and dma::Channel are already sealed, which has the same effect. This means the `af_num()` and `request()` funcs are now public, but IMO that's okay, they're unlikely to change. Co-authored-by: Dario Nieuwenhuis <[email protected]>
| * | stm32: Add standard crate-wide macros for pin/dma traits, switch all drivers ↵Dario Nieuwenhuis2022-02-103-14/+21
| | | | | | | | | | | | to use them.
* | | Add button_events example for stm32f3Cristian Eigel2022-02-111-0/+163
| |/ |/|
* | Port multiprio example to stm32f3 and stm32f4 platformsCristian Eigel2022-02-102-0/+288
|/
* stm32: Remove OptionalPinDario Nieuwenhuis2022-02-106-37/+11
| | | | | | | | | The idea behind OptionalPin has a few problems: - you need to impl the signal traits for NoPin which is a bit weird https://github.com/embassy-rs/embassy/blob/master/embassy-stm32/src/dcmi.rs#L413-L416 - you can pass any combination of set/unset pins, which needs checking at runtime https://github.com/embassy-rs/embassy/blob/master/embassy-stm32/src/dcmi.rs#L130 The replacement is to do multiple `new` constructors for each combination of pins you want to take.
* Add embassy-bootUlf Lilleengen2022-02-097-0/+180
| | | | | | | | | | Embassy-boot is a simple bootloader that works together with an application to provide firmware update capabilities with a minimal risk. The bootloader consists of a platform-independent part, which implements the swap algorithm, and a platform-dependent part (currently only for nRF) that provides addition functionality such as watchdog timers softdevice support.
* Merge #602bors[bot]2022-02-093-1/+217
|\ | | | | | | | | | | | | | | | | | | 602: Add stm32 USB OTG peripherals r=Dirbaio a=chemicstry Fixes #557. This is similar to #580, but for synopsys IP. I could add examples to other chips, but I have no way of testing them. The F4 example is tested and working. Co-authored-by: chemicstry <[email protected]>
| * Fix function namechemicstry2022-02-091-1/+1
| |
| * Merge USB FS and HS peripherals. Add ULPI.chemicstry2022-02-093-3/+117
| |
| * Add stm32 USB OTG peripheralschemicstry2022-02-082-1/+103
| |
* | stm32: Add support for FMCMatous Hybl2022-02-083-1/+207
|/
* Upgrade to embedded-storage 0.3.0Ulf Lilleengen2022-02-071-1/+1
|
* Merge #591bors[bot]2022-02-054-17/+145
|\ | | | | | | | | | | | | | | | | | | | | | | 591: PWM WS2812B example and flexible sequence config r=Dirbaio a=huntc I've permitted the PWM sequences to be mutated on stopping the PWM by associating them with a new `SingleSequencer` structure. This is so that we can perform effects on the LEDs (and other use-cases, I'm sure!). The example has been updated to illustrate the use of this by flashing a WS2812B LED. There's also a `Sequencer` structure for more sophisticated PWM interactions, along with a `pwm_double_sequence` example to illustrate. These changes should make it possible to attain all of the nRF PWM functionality available. Co-authored-by: huntc <[email protected]>
| * 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.
* | traits: migrate Delay to embedded-hal 1.0+async, remove Rng and Flash.Dario Nieuwenhuis2022-01-2718-41/+13
|/
* Support unstable-trait feature for stm32Ulf Lilleengen2022-01-2610-20/+19
|
* 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.
* Merge #585bors[bot]2022-01-242-19/+13
|\ | | | | | | | | | | | | | | 585: Permit many sequences to be passed r=huntc a=huntc 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 struct itself. The pwm_sequence example has been extended to illustrate multiple sequences being passed around. Co-authored-by: huntc <[email protected]>
| * 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.
* | stm32: add `time-driver-any` cargo feature that automatically picks one ↵Dario Nieuwenhuis2022-01-2413-13/+13
|/ | | | available timer.
* stm32/spi: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-196-12/+6
|
* stm32/i2c: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-192-3/+1
|
* stm32/usart: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-199-18/+9
|
* examples/stm32l0: cleanupDario Nieuwenhuis2022-01-194-37/+2
|
* stm32/exti: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-1911-11/+0
|
* stm32/gpio: expose all functionality as inherent methods.Dario Nieuwenhuis2022-01-1930-109/+79
|
* examples/stm32l1: remove memory.x, use the crate-provided oneGreg V2022-01-142-35/+0
|