aboutsummaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Merge #1024bors[bot]2022-10-263-7/+50
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1024: stm32/adc: Remove voltage and temperature conversions r=Dirbaio a=GrantM11235 The current conversion utilities are confusing and a bit of a footgun. (Two out of the three examples got it wrong! They didn't measure vref at all, so all the conversions are completely wrong if vcca isn't 3.3v) I think we should eventually have some sort of conversion utilities in the HAL, but for now I think it is best to just remove it and let the users do their own math. cc `@chemicstry` Co-authored-by: Grant Miller <[email protected]>
| | * | | Improve examplesGrant Miller2022-10-243-12/+16
| | | | |
| | * | | stm32/adc: Remove voltage and temperature conversionsGrant Miller2022-10-243-6/+45
| | | | |
| * | | | Merge #1025bors[bot]2022-10-262-0/+89
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1025: Implement I2C timeouts, second attempt r=Dirbaio a=chemicstry This is an alterrnative to #1022 as discussed there. Timeouts are implemented using suggested `check_timeout: impl Fn() -> Result<(), Error>` function, which does not depend on `embassy-time` by default and is a noop for regular I2C. This also adds `time` feature like in `embassy-nrf` to enable `embassy-time` dependencies. While at it, I also gated some other peripherals that depend on `embassy-time`, notably `usb` and (partially) `subghz`. `TimeoutI2c` is currently only implemented for i2cv1, because i2cv2 has additional complications: - Async methods still use a lot of busy waiting code in between DMA transfers, so simple `with_timeout()` will not work and it will have to use both types of timeouts. It could probably be rewritten to replace busy waits with IRQs, but that's outside the scope of this PR. - I2C definition `I2c<'d, T, TXDMA, RXDMA>` is different from i2cv1 `I2c<'d, T>` making it hard to share single `TimeoutI2c` wrapper. A couple of options here: - Duplicate `TimeoutI2c` code - Add dummy `TXDMA`, `RXDMA` types to i2cv1 considering that in the future it should also support DMA Co-authored-by: chemicstry <[email protected]>
| | * | | | Add more docschemicstry2022-10-242-0/+6
| | | | | |
| | * | | | Unify i2cv1 definition with i2cv2chemicstry2022-10-241-1/+13
| | | | | |
| | * | | | i2cv2 timeoutschemicstry2022-10-241-0/+41
| | | | | |
| | * | | | Implement i2cv1 timeoutchemicstry2022-10-241-0/+30
| | |/ / /
| * | | | stm32: Add support for read_until_idle on UARTGuillaume MICHEL2022-10-2612-19/+48
| | | | |
| * | | | Update Rust nightly.Dario Nieuwenhuis2022-10-269-11/+11
| |/ / /
* | | | Remove random delay from example, and move flash functions to allow using ↵Mathias2022-10-271-1/+7
| | | | | | | | | | | | | | | | without embedded-storage in scope
* | | | Buffer data to be written to flash in ram if it does not already reside in ramMathias2022-10-261-1/+0
| | | |
* | | | Add flash example & flash HIL testMathias2022-10-262-0/+85
|/ / /
* | | Merge #855bors[bot]2022-10-211-0/+33
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 855: PDM microphone support for nrf r=Dirbaio a=pbert519 PDM microphones have a long startup phase, therefore the driver samples continuously and only switches the target buffer if the user requests sampling. Co-authored-by: pbert <[email protected]>
| * | | add support for pdm microphones in nrf driverpbert2022-10-131-0/+33
| | | |
| | | |
| \ \ \
*-. \ \ \ Merge #984 #1006bors[bot]2022-10-123-3/+109
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Co-authored-by: huntc <[email protected]>
| | * | | | Removes some of the code duplication for UarteWithIdlehuntc2022-10-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | embassy-rp i2c: async (non-blocking) exampleJeremy Fitzhardinge2022-10-011-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | embassy-rp: async i2c implementationJeremy Fitzhardinge2022-10-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Change rak4631 feature to sx126x, removing use in board-specific processing; ↵ceekdee2022-10-103-98/+44
| | | | | | | | | | | | | | | | | | | | | | | | simplify the P2P examples; correct RSSI computation.
* | | | | | Merge branch 'embassy-rs:master' into masterChuck Davis2022-10-101-3/+22
|\ \ \ \ \ \
| * \ \ \ \ \ Merge #1004bors[bot]2022-10-101-3/+22
| |\ \ \ \ \ \ | | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
| | * | | | | Fix adc_v4 compilationchemicstry2022-10-071-1/+1
| | | | | | |
| | * | | | | Fix internal channel reading on adc_v2chemicstry2022-10-071-3/+22
| | | |/ / / | | |/| | |
* | | | | | Merge branch 'embassy-rs:master' into masterChuck Davis2022-10-0848-26/+127
|\| | | | |
| * | | | | all Cargo.toml: Add license to all crate Cargo.toml fileschrysn2022-10-0731-0/+31
| |/ / / / | | | | | | | | | | | | | | | Closes: https://github.com/embassy-rs/embassy/issues/1002
| * | | | update embedded-hal apiJeremy Fitzhardinge2022-10-012-2/+2
| | | | | | | | | | | | | | | | | | | | Also pin to alpha.9 since its a breaking change
| * | | | rename to i2c_blockingJeremy Fitzhardinge2022-10-011-0/+0
| | | | |
| * | | | rp i2c: blocking exampleJeremy Fitzhardinge2022-10-011-0/+70
| |/ / / | | | | | | | | | | | | i2c example talking to mcp23017 i2c gpio expander.
| * | | Remove flash lock/unlock public API from stm32 flash, and perform the ↵Mathias2022-09-3015-15/+15
| | | | | | | | | | | | | | | | unlocking and locking automatically on erase and write operations
| * | | Update embedded-hal versions and explicitly pinUlf Lilleengen2022-09-293-10/+10
| | | |
* | | | Improve generics and consolidate antenna handlingceekdee2022-10-082-8/+8
| | | |
* | | | Update some outstanding questionsceekdee2022-09-281-1/+1
| | | |
* | | | Initial add for sx126xceekdee2022-09-273-1/+263
|/ / /
* | | Use firmware writer in stm32{f7, h7} example appUlf Lilleengen2022-09-262-17/+17
| | | | | | | | | | | | | | | The new FirmwareWriter is useful in particular for these architectures due to the large erase sector size.
* | | usb: move classes into the `embassy-usb` crate.Dario Nieuwenhuis2022-09-2617-27/+16
| | |
* | | Remove default, reorder generic paramsivmarkov2022-09-253-3/+6
| | |
* | | Parameterize Signal with RawMutexivmarkov2022-09-241-1/+1
| | |
* | | Replace futures::future::join -> embassy_futures::join::join.Dario Nieuwenhuis2022-09-2212-8/+12
| | |
* | | Replace futures::future::poll_fn -> core::future::poll_fn.Dario Nieuwenhuis2022-09-222-2/+4
| | |
* | | Update Rust nightly.Dario Nieuwenhuis2022-09-2214-14/+0
| | | | | | | | | | | | Removes feature(generic_associated_types)
* | | Remove BootFlash borrowUlf Lilleengen2022-09-202-5/+4
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Feature-gate time-driver in embassy-rpMathias2022-09-161-1/+1
| | |
* | | Merge #939bors[bot]2022-09-0423-23/+23
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 939: time: add more tick rates, use 1mhz as default. r=Dirbaio a=Dirbaio Co-authored-by: Dario Nieuwenhuis <[email protected]>
| * | | time: add more tick rates, use 1mhz as default.Dario Nieuwenhuis2022-09-0223-23/+23
| | | |
* | | | usbd-hid: 0.5.2 -> 0.6.0Alex Martens2022-09-042-2/+2
| | | |
* | | | Merge #839bors[bot]2022-09-045-10/+37
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Co-authored-by: Ulf Lilleengen <[email protected]>
| * | | | lora: Fix for stm32l0 exampe to buildTimo Kröger2022-08-261-1/+1
| | | | |
| * | | | Use released rust-lorawan with radio fixesUlf Lilleengen2022-08-262-2/+2
| | | | |
| * | | | Use LP as defaultUlf Lilleengen2022-08-261-2/+2
| | | | |