From 93f328545f58447f1590ca1958393a49423ace6d Mon Sep 17 00:00:00 2001 From: Hendrik Groove Date: Sun, 30 Mar 2025 23:37:18 +0200 Subject: [PATCH] Fix incorrect tick rate constant in UART read functions --- components/uart/uart_component_esp_idf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/uart/uart_component_esp_idf.cpp b/components/uart/uart_component_esp_idf.cpp index d1316e0..a835b2a 100644 --- a/components/uart/uart_component_esp_idf.cpp +++ b/components/uart/uart_component_esp_idf.cpp @@ -149,7 +149,7 @@ bool IDFUARTComponent::peek_byte(uint8_t *data) { if (this->has_peek_) { *data = this->peek_byte_; } else { - int len = uart_read_bytes(this->uart_num_, data, 1, 20 / portTICK_RATE_MS); + int len = uart_read_bytes(this->uart_num_, data, 1, 20 / portTICK_PERIOD_MS); if (len == 0) { *data = 0; } else { @@ -173,7 +173,7 @@ bool IDFUARTComponent::read_array(uint8_t *data, size_t len) { this->has_peek_ = false; } if (length_to_read > 0) - uart_read_bytes(this->uart_num_, data, length_to_read, 20 / portTICK_RATE_MS); + uart_read_bytes(this->uart_num_, data, length_to_read, 20 / portTICK_PERIOD_MS); xSemaphoreGive(this->lock_); #ifdef USE_UART_DEBUGGER for (size_t i = 0; i < len; i++) {