Add hardware sync capability to SerialBase #14600
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
Following the discussion here #14420 trying to solve this #14227. Here is a proposal to add hardware sync capability to
SerialBase
.For this purpose
uart_writable
andserial_tx_active
were not suitable.uart_writable
implementation is different from platform to platform, sometimes it checks if tx buffer/fifo is empty and some other if it is not full.serial_tx_active
implementation is related to async API, so the decision to addserial_tx_empty
that checks hardware flags to determine if serial transmission is completed.Impact of changes
serial_tx_empty
is not implemented for the following platforms because i didn't found enough information:TARGET_ARM_FM/TARGET_FVP_MPS2
TARGET_ARM_SSG/TARGET_CM3DS_MPS2
TARGET_ARM_SSG/TARGET_MPS2
all the other platforms should be ok with one note about
Maxim
LPC
andTOSHIBA
targets whereserial_tx_empty
is checking only FIFO status and not uart shift register.Migration actions required
Documentation
Here there is the implementation status of
serial_writable
serial_tx_active
andserial_tx_empty
with some notes:Pull request type
Test results
Need some help with testing :D
Reviewers
@facchinm @0xc0170 @kjbracey-arm