[uart] Return flush result, expose timeout via config (#14608)

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-03-08 05:23:13 +00:00
1 parent be6c3c52ac
commit 5e842a8b20
25 files changed
+77 -30

No files matched your search

@@ -274,12 +274,13 @@ size_t HostUartComponent::available() {
return result;
};
void HostUartComponent::flush() {
FlushResult HostUartComponent::flush() {
if (this->file_descriptor_ == -1) {
return;
return FlushResult::ASSUMED_SUCCESS;
}
tcflush(this->file_descriptor_, TCIOFLUSH);
ESP_LOGV(TAG, " Flushing");
return FlushResult::ASSUMED_SUCCESS;
}
void HostUartComponent::update_error_(const std::string &error) {