uart: esp32: fix baudrate return value
HAL call function used to retrieve the configured baudrate returns the real calculated value, which might not be exactly as the configured. For baudrate of 115200, HAL api returns 115201, which then causes uart_basic_api test to fail. Instead of returning the calculated baudrate value, returns the configured one. Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit is contained in:
parent
ae0297e8de
commit
ef3ecbe596
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ static int uart_esp32_config_get(const struct device *dev,
|
||||||
uart_word_length_t data_bit;
|
uart_word_length_t data_bit;
|
||||||
uart_hw_flowcontrol_t hw_flow;
|
uart_hw_flowcontrol_t hw_flow;
|
||||||
|
|
||||||
uart_hal_get_baudrate(&data->hal, &cfg->baudrate);
|
cfg->baudrate = data->uart_config.baudrate;
|
||||||
|
|
||||||
uart_hal_get_parity(&data->hal, &parity);
|
uart_hal_get_parity(&data->hal, &parity);
|
||||||
switch (parity) {
|
switch (parity) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue