summaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)Author
2022-10-12Merge #984 #1006bors[bot]
984: rp pico async i2c implementation r=Dirbaio a=jsgf This implements an interrupt-driven async i2c master. It is based on https://github.com/embassy-rs/embassy/pull/914, a bit of https://github.com/embassy-rs/embassy/pull/978 and `@ithinuel's` https://github.com/ithinuel/rp2040-async-i2c.git This is still work-in-progress, and is currently untested. 1006: Removes some of the code duplication for UarteWithIdle r=Dirbaio a=huntc This PR removes some of the code duplications for `UarteWithIdle` at the slight expense of requiring a split when using idle processing. As the nRF example illustrates though given the LoC removed, this expense seems worth the benefit in terms of maintenance, and the avoidance of copying over methods. My main motivation for this PR was actually due to the `event_endtx` method not having been copied across to the idle-related code. Tested the uart_idle example on my nRF52840-dk, and from within my app. Both appear to work fine. Co-authored-by: Jeremy Fitzhardinge <jeremy@goop.org> Co-authored-by: huntc <huntchr@gmail.com>
2022-10-10Change rak4631 feature to sx126x, removing use in board-specific processing; ↵ceekdee
simplify the P2P examples; correct RSSI computation.
2022-10-10Merge branch 'embassy-rs:master' into masterChuck Davis
2022-10-10Merge #1004bors[bot]
1004: Fix internal channels for adc v2 r=lulf a=chemicstry Internal channel reading was broken on adc_v2, because `Adc::read()` requires gpio pin trait, which was not implemented by `VrefInt`, `Temperature`, `Vbat`. The required configuration bits `tsvrefe`, `vbate` were not enabled either. This PR makes it a bit closer to how adc_v4 works. While at it, I also changed adc_v2 to use `RccPeripheral` instead of permanently enabling all ADCs. Co-authored-by: chemicstry <chemicstry@gmail.com>
2022-10-09Removes some of the code duplication for UarteWithIdlehuntc
This commit removes some of the code duplication for UarteWithIdle at the expense of requiring a split. As the example illustrates though, this expense seems worth the benefit in terms of maintenance, and the avoidance of copying over methods. My main motivation for this commit was actually due to the `event_endtx` method not having been copied across.
2022-10-08Merge branch 'embassy-rs:master' into masterChuck Davis
2022-10-08Improve generics and consolidate antenna handlingceekdee
2022-10-07Fix adc_v4 compilationchemicstry
2022-10-07Fix internal channel reading on adc_v2chemicstry
2022-10-07all Cargo.toml: Add license to all crate Cargo.toml fileschrysn
Closes: https://github.com/embassy-rs/embassy/issues/1002
2022-10-01embassy-rp i2c: async (non-blocking) exampleJeremy Fitzhardinge
Simple example exercising an mcp23017 GPIO expander, configured on RP2040 GPIOs 14+15 (i2c1) with 8 inputs and 8 outputs. Input bit 0 controls whether to display a mcp23017 register dump.
2022-10-01embassy-rp: async i2c implementationJeremy Fitzhardinge
This is an interrupt-driven async i2c master implementation. It makes as best use of the RP2040's i2c block's fifos as possible to minimize interrupts. It implements embedded_hal_async::i2c for easy interop. WIP async impl
2022-10-01update embedded-hal apiJeremy Fitzhardinge
Also pin to alpha.9 since its a breaking change
2022-10-01rename to i2c_blockingJeremy Fitzhardinge
2022-10-01rp i2c: blocking exampleJeremy Fitzhardinge
i2c example talking to mcp23017 i2c gpio expander.
2022-09-30Remove flash lock/unlock public API from stm32 flash, and perform the ↵Mathias
unlocking and locking automatically on erase and write operations
2022-09-29Update embedded-hal versions and explicitly pinUlf Lilleengen
2022-09-28Update some outstanding questionsceekdee
2022-09-27Initial add for sx126xceekdee
2022-09-26Use firmware writer in stm32{f7, h7} example appUlf Lilleengen
The new FirmwareWriter is useful in particular for these architectures due to the large erase sector size.
2022-09-26usb: move classes into the `embassy-usb` crate.Dario Nieuwenhuis
2022-09-25Remove default, reorder generic paramsivmarkov
2022-09-24Parameterize Signal with RawMutexivmarkov
2022-09-22Replace futures::future::join -> embassy_futures::join::join.Dario Nieuwenhuis
2022-09-22Replace futures::future::poll_fn -> core::future::poll_fn.Dario Nieuwenhuis
2022-09-22Update Rust nightly.Dario Nieuwenhuis
Removes feature(generic_associated_types)
2022-09-20Remove BootFlash borrowUlf Lilleengen
Compiler will infer a different lifetime for BootFlash than for the borrowed flash, which makes it require more type annotations than if it was just owning the type. Since it doesn't really matter if it owns or borrows in practical use, change it to own so that it simplifies usage.
2022-09-16Feature-gate time-driver in embassy-rpMathias
2022-09-04Merge #939bors[bot]
939: time: add more tick rates, use 1mhz as default. r=Dirbaio a=Dirbaio Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-09-04usbd-hid: 0.5.2 -> 0.6.0Alex Martens
2022-09-04Merge #839bors[bot]
839: Misc LoRaWAN improvements r=lulf a=timokroeger Trying too get `embassy-lora` running on a [LoRa-E5 Dev Board](https://wiki.seeedstudio.com/LoRa_E5_Dev_Board/). I can see the join message arriving in the The Things Network console but the device does not receive the accept message yet. Opening this PR anyway because I think there are some nice things to decouple the lora crate from the nucleo board. `@lulf` Could you test if this PR breaks your LoRa setup? Marking as draft for the time being. Co-authored-by: Timo Kröger <timokroeger93@gmail.com> Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-09-02Merge #935bors[bot]
935: Remove generic const expressions from embassy-boot r=lulf a=lulf * Remove the need for generic const expressions and use buffers provided in the flash config. * Extend embedded-storage traits to simplify generics. * Document all public APIs * Add toplevel README * Expose AlignedBuffer type for convenience. * Update examples Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-09-02Remove generic const expressions from embassy-bootUlf Lilleengen
* Remove the need for generic const expressions and use buffers provided in the flash config. * Extend embedded-storage traits to simplify generics. * Document all public APIs * Add toplevel README * Expose AlignedBuffer type for convenience. * Update examples
2022-09-02time: add more tick rates, use 1mhz as default.Dario Nieuwenhuis
2022-09-01Cleanup examplesHenrik Alsér
2022-09-01Reorder argsHenrik Alsér
2022-09-01transfer_in_placeHenrik Alsér
2022-09-01Fix exampleHenrik Alsér
2022-09-01impl embedded-hal-asyncHenrik Alsér
2022-09-01exampleHenrik Alsér
2022-08-30net: feature-gate nightly-only async traits to allow building on stable.Dario Nieuwenhuis
2022-08-30Merge pull request #927 from embassy-rs/rp-usbDario Nieuwenhuis
rp: add usb device support.
2022-08-29futures: move select* and join* to separate modules.Dario Nieuwenhuis
2022-08-26lora: Fix for stm32l0 exampe to buildTimo Kröger
2022-08-26Use released rust-lorawan with radio fixesUlf Lilleengen
2022-08-26Use LP as defaultUlf Lilleengen
2022-08-26lora: Make some options configurableTimo Kröger
Call `config()` only once at construction not with every RX and TX operation. The Lora-E5 only supports HP mode, use that instead. The nucleo board supports both HP and LP and should continue to work.
2022-08-26lora: Use a trait for RF frontend switchingTimo Kröger
The Seeed Studio Lora-E5 module only has two control pins. With the `RadioSwitch` trait the user can implement any method required by the module/board to control the TX/RX direction of the radio frontend.
2022-08-26lora: Improve IRQ handlingTimo Kröger
* Interrupt handler only triggers a waker: Do the actual interrupt processing which involves SUBGHZ SPI coms in the task. * Do not require a static state for the constructor. * Remove unsafe from construcor.
2022-08-26stm32wl: Do not require external SPI pins for SUBGHZTimo Kröger
For the Seeed Studio Lora-E5 those pins conflict with the radio frontend control GPIOS (PA4 and PA5).