aboutsummaryrefslogtreecommitdiff
path: root/embassy-sync/Cargo.toml
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-10-26 19:34:43 +0000
committerGitHub <[email protected]>2022-10-26 19:34:43 +0000
commit01e23bf9dd2f7d55a01d5a0ac18bc6f26ca05e30 (patch)
tree549f0565d84360ccb1fd076d31e7a4dfd930bf15 /embassy-sync/Cargo.toml
parente5097a8866c071c8b986757543a723b20b67fa03 (diff)
parent52c03cf0a4ae5a7a6374e6acac123670b83860fe (diff)
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 <[email protected]>
Diffstat (limited to 'embassy-sync/Cargo.toml')
0 files changed, 0 insertions, 0 deletions