refactor(uart)!: deprcated esp_rom_uart.h

This commit is contained in:
morris
2025-05-26 19:24:43 +08:00
parent 20f1700053
commit c4d7b1cfce
93 changed files with 265 additions and 132 deletions

View File

@@ -226,7 +226,7 @@ FORCE_INLINE_ATTR void uart_ll_get_sclk(uart_dev_t *hw, soc_module_clk_t *source
*
* @return True if baud-rate set successfully; False if baud-rate requested cannot be achieved
*/
FORCE_INLINE_ATTR bool uart_ll_set_baudrate(uart_dev_t *hw, uint32_t baud, uint32_t sclk_freq)
FORCE_INLINE_ATTR bool _uart_ll_set_baudrate(uart_dev_t *hw, uint32_t baud, uint32_t sclk_freq)
{
#define DIV_UP(a, b) (((a) + (b) - 1) / (b))
if (baud == 0) {
@@ -248,6 +248,8 @@ FORCE_INLINE_ATTR bool uart_ll_set_baudrate(uart_dev_t *hw, uint32_t baud, uint3
return true;
}
#define uart_ll_set_baudrate(...) _uart_ll_set_baudrate(__VA_ARGS__)
/**
* @brief Get the current baud-rate.
*