Fix incorrect tick rate constant in UART read functions

This commit is contained in:
Hendrik Groove 2025-03-30 23:37:18 +02:00
parent 5120926a8a
commit 93f328545f

View File

@ -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++) {