Skip to content

C HAL function to check Serial FIFO status #4408

Closed
@bridadan

Description

@bridadan

Description


Enhancement

Reason to enhance or problem with existing solution
When using the Serial API, most implementations take the to-be-transmitted data and place it in the UART hardware's FIFO. At this point the function returns, however there is no way to actually check via the mbed API whether this data has actually been transmitted "on the wire".

Suggested enhancement
It has been suggested in past discussions (#1849, #3132, #2966) to add a C HAL function that would allow applications to check if the FIFO buffer is empty. This would allow applications to ensure all data has been transmitted before doing certain actions that affect the serial hardware (eg. sleep/deepsleep).

Pros

  • Allows applications to delay until all data has been transmitted before moving on to other tasks.

Cons

  • Time intensive task of ensure all targets implement this function
  • Not all targets may support this functionality

FYI @LMESTM @0xc0170

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions