Skip to content

stm32/i2cv2: remove blocking loops in async i2c. #2299

Open
@Dirbaio

Description

@Dirbaio

Async and blocking currently share some "setup" code. This setup code needs to wait for some things, for example here:

while T::regs().cr2().read().start() {

This waiting is done blockingly, it should be done asynchronously in async code. This means we can share less code, but that's fine.

Once this is done, async timeouts should be simplified to using with_timeout at the top level, instead of passing a check_timeout closure through everywhere. This will ensure user timeouts also behave nicely when they use with_timeout themselves instead of using the builtin timeouts, or select.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions