Skip to main content

uart_get_baudrate

Function uart_get_baudrate 

Source
pub unsafe extern "C" fn uart_get_baudrate(
    uart_num: uart_port_t,
    baudrate: *mut u32,
) -> esp_err_t
Expand description

@brief Get the actual UART baud rate.

It returns the real UART rate set in the hardware. It could have a slight deviation from the user-configured baud rate.

@param uart_num UART port number, the max port number is (UART_NUM_MAX -1). @param baudrate Pointer to accept value of UART baud rate

@return - ESP_FAIL Parameter error - ESP_OK Success, result will be put in (*baudrate)