summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-19Merge #1017masterbors[bot]
1017: Add missing examples to rust-analyzer linked projects r=lulf a=GrantM11235 Co-authored-by: Grant Miller <GrantM11235@gmail.com>
2022-10-19Add missing examples to rust-analyzer linked projectsGrant Miller
2022-10-19Merge #1014bors[bot]
1014: Add memory barriers to H7 flash driver to mitigate PGSERR errors r=lulf a=matoushybl The stm32h7xx-hal uses only the ordering barrier, while the CubeMX uses the DSB and ISB instructions, to be on the safe side, both are used here. Without the barrier, the PG bit is not set, when the writes are being done, resulting in an error. Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-10-18Merge #1015bors[bot]
1015: Enable defmt in embassy-hal-common when defmt is enabled in stm32 HAL r=Dirbaio a=matoushybl Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-10-18Enable defmt in embassy-hal-commonMatous Hybl
2022-10-18Add memory barriers to H7 flash driver to mitigate PGSERR errorsMatous Hybl
The stm32h7xx-hal uses only the ordering barrier, while the CubeMX uses the DSB and ISB instructions, to be on the safe side, both are used here.
2022-10-18Merge #1012bors[bot]
1012: rp i2c: have separate wakers for each i2c unit r=Dirbaio a=jsgf If they both share one waker, there's the possibility that some wakeups could get lost. Co-authored-by: Jeremy Fitzhardinge <jeremy@goop.org>
2022-10-17Associate state with the instance rather than having a separate arrayJeremy Fitzhardinge
2022-10-16rp i2c: have separate wakers for each i2c unitJeremy Fitzhardinge
If they both share one waker, there's the possibility that some wakeups could get lost.
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-12Merge #1010bors[bot]
1010: (embassy-rp): correctly enable RTC_IRQ when scheduling an RTC alarm r=Dirbaio a=MathiasKoch Co-authored-by: Mathias <mk@blackbird.online>
2022-10-12Correctly enable RTC_IRQ when scheduling an RTC alarmMathias
2022-10-11Merge #985bors[bot]
985: Create Sx126X LORA driver r=lulf a=ceekdee Implementation features: - update embassy-lora to support Semtech SX126X chips, specifically the RAK4631 chip (nrf52480 and sx1262). - support additional SX126X packages by adding a feature (reference feature rak4631) and updating the board specific Rust file. To enable feature rak4631, settings.json must currently enable "rust-analyzer.linkedProjects" for "examples/nrf/Cargo.toml". - provide tx/rx examples in examples/nrf to show compatibility with the interface provided by the SX127X LORA implementation. Only LORA P2P communication has been tested. Implementation lines marked with ??? indicate areas for further investigation. Furthermore, I question whether the DIO1 handler is adequate for catching all interrupt sequences. This implementation is patterned after the C/C++ implementation provided by Semtech, available through the RAK-nRF52-RUI developers platform. Co-authored-by: ceekdee <taigatensor@gmail.com> Co-authored-by: Chuck Davis <91165799+ceekdee@users.noreply.github.com>
2022-10-11Merge #1008bors[bot]
1008: Add note on partition sizes to bootloader docs r=lulf a=lulf See #1007 Co-authored-by: Ulf Lilleengen <ulf.lilleengen@gmail.com>
2022-10-11Add note on partition sizes to bootloader docsUlf Lilleengen
See #1007
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 #1005bors[bot]
1005: Expose Pin::pin() and Pin::bank() as public r=lulf a=mkj Co-authored-by: Matt Johnston <matt@ucc.asn.au>
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-08Expose Pin::pin() and Pin::bank() as publicMatt Johnston
2022-10-07Fix adc_v4 compilationchemicstry
2022-10-07Fix internal channel reading on adc_v2chemicstry
2022-10-07Merge #1003bors[bot]
1003: all Cargo.toml: Add license to all crate Cargo.toml files r=lulf a=chrysn This sets the license to "MIT OR Apache-2.0" in a machine readable form on all crates, as it was already in human readable form in the README.md file, and reaffirmed in #1002. (The statements on all the individual examples might not be strictly essential for the `cargo deny` use case as they are leaf crates, but other tools might use that information). Co-authored-by: chrysn <chrysn@fsfe.org>
2022-10-07all Cargo.toml: Add license to all crate Cargo.toml fileschrysn
Closes: https://github.com/embassy-rs/embassy/issues/1002
2022-10-07Use RccPeripheral for adc_v2chemicstry
2022-10-05ci/doc: build embassy-time too.Dario Nieuwenhuis
2022-10-05Merge #1000bors[bot]
1000: Forgot to add space function to immediate publisher r=lulf a=diondokter Title says it all really. This function was added to the normal publisher, so now also to the immediate publisher Co-authored-by: Dion Dokter <dion@tweedegolf.com>
2022-10-05Forgot to add space function to immediate publisherDion Dokter
2022-10-04Merge #996bors[bot]
996: Add required info to embassy-sync package r=Dirbaio a=lulf Updates the README.md based on embassy-futures structure. Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-10-04Add required info to embassy-sync packageUlf Lilleengen
Updates the README.md based on embassy-futures structure.
2022-10-03rp async i2c: raise the tx_empty thresholdJeremy Fitzhardinge
Assert "tx_empty" interrupt a little early so there's time to wake up and start refilling the fifo before it drains. This avoids stalling the i2c bus if the tx fifo completely drains.
2022-10-03rp i2c: clean up tx_abrt handlingJeremy Fitzhardinge
Make sure we always wait for the stop bit if there's a reason to - either because we sent one, or because there was a hardware tx abort.
2022-10-03Use 1 thread in ci doc building.Dario Nieuwenhuis
2022-10-02rp i2c: allow blocking ops on async contextsJeremy Fitzhardinge
2022-10-02Merge pull request #994 from embassy-rs/ci-docsDario Nieuwenhuis
Build docs in CI
2022-10-02Build docs in CIDario Nieuwenhuis
2022-10-02Merge #993bors[bot]
993: rp i2c: blocking example r=Dirbaio a=jsgf i2c example talking to mcp23017 i2c gpio expander. Co-authored-by: Jeremy Fitzhardinge <jeremy@goop.org>
2022-10-01make I2c::write_async take an iteratorJeremy Fitzhardinge
There's no other iterator async API right now.
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-01rp i2c: make blocking only for Mode=BlockingJeremy Fitzhardinge
2022-10-01rp i2c: remove vestiges of DMAJeremy Fitzhardinge
2022-10-01embassy-rp: inline I2c::regsJeremy Fitzhardinge
It just returns a literal constant, so there's no reason not to always inline it.
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-30Merge #992bors[bot]
992: (embassy-stm32): remove flash lock/unlock public API from stm32 flash r=lulf a=MathiasKoch Instead, perform the unlocking and locking automatically on erase and write operations. This makes the `embedded-storage` abstraction actually useable in libraries, while still keeping the flash peripheral locked the majority of the time. Co-authored-by: Mathias <mk@blackbird.online>