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>
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.
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>
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>
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>
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.
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>
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.
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
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>
991: usb: remove all "Direction as u8" casts. r=Dirbaio a=Dirbaio
Alternative fix for #989 , see comment there for rationale.
bors r+
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
990: Small pubsub improvements r=Dirbaio a=diondokter
- Futures in pub & sub are now awaited instead of returned
- Added functions for reading how many messages are available
This helps people get better compiler diagnostics. For example, I forgot to call await on a future and the compiler didn't complain.
This also helps with making some decisions based on the state of the channels.
Co-authored-by: Dion Dokter <dion@tweedegolf.com>