Skip to content

How to check if hardware buffers are flushed?Β #20

@dimpolo

Description

@dimpolo

The docs of SerialPort::flush metion that:

Note that even if this method returns Ok, data may still be in hardware buffers on either side.

I don't fully understand how USB works.
Would it be enough to check if write_state == WriteState::Idle?
Also do I understand correctly that usb_device.poll(&mut [&mut serial_port]) needs to be called to make progress in flushing the hardware buffers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions