Fix incorrect tick rate constant in UART read functions
This commit is contained in:
parent
5120926a8a
commit
93f328545f
@ -149,7 +149,7 @@ bool IDFUARTComponent::peek_byte(uint8_t *data) {
|
|||||||
if (this->has_peek_) {
|
if (this->has_peek_) {
|
||||||
*data = this->peek_byte_;
|
*data = this->peek_byte_;
|
||||||
} else {
|
} 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) {
|
if (len == 0) {
|
||||||
*data = 0;
|
*data = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -173,7 +173,7 @@ bool IDFUARTComponent::read_array(uint8_t *data, size_t len) {
|
|||||||
this->has_peek_ = false;
|
this->has_peek_ = false;
|
||||||
}
|
}
|
||||||
if (length_to_read > 0)
|
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_);
|
xSemaphoreGive(this->lock_);
|
||||||
#ifdef USE_UART_DEBUGGER
|
#ifdef USE_UART_DEBUGGER
|
||||||
for (size_t i = 0; i < len; i++) {
|
for (size_t i = 0; i < len; i++) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user