embassy/examples/stm32h7/src/bin
bors[bot] 01e23bf9dd
Merge #1025
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 <chemicstry@gmail.com>
2022-10-26 19:34:43 +00:00
..
adc.rs Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
blinky.rs Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
button_exti.rs Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
camera.rs Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
dac.rs examples Remove the fn config() idiom. 2022-08-17 22:25:58 +02:00
eth_client.rs Remove Forever, switch to static_cell. 2022-08-22 16:11:40 +02:00
eth.rs Remove Forever, switch to static_cell. 2022-08-22 16:11:40 +02:00
flash.rs Remove flash lock/unlock public API from stm32 flash, and perform the unlocking and locking automatically on erase and write operations 2022-09-30 06:00:46 +02:00
fmc.rs Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
i2c.rs Add more docs 2022-10-24 22:48:40 +03:00
low_level_timer_api.rs Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
mco.rs Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
pwm.rs Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
rng.rs Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
sdmmc.rs Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
signal.rs Remove default, reorder generic params 2022-09-25 09:40:36 +03:00
spi_dma.rs Remove Forever, switch to static_cell. 2022-08-22 16:11:40 +02:00
spi.rs Remove Forever, switch to static_cell. 2022-08-22 16:11:40 +02:00
usart_dma.rs stm32: Add support for read_until_idle on UART 2022-10-26 19:06:18 +02:00
usart_split.rs stm32: Add support for read_until_idle on UART 2022-10-26 19:06:18 +02:00
usart.rs stm32: Add support for read_until_idle on UART 2022-10-26 19:06:18 +02:00