forked from espressif/esp-idf
fix(console): fixed CONSOLE_NONE not working on C2/C3
This commit is contained in:
@@ -541,7 +541,9 @@ FORCE_INLINE_ATTR bool light_sleep_uart_prepare(uint32_t pd_flags, int64_t sleep
|
|||||||
} else {
|
} else {
|
||||||
/* Only flush the uart_num configured to console, the transmission integrity of
|
/* Only flush the uart_num configured to console, the transmission integrity of
|
||||||
other uarts is guaranteed by the UART driver */
|
other uarts is guaranteed by the UART driver */
|
||||||
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
if (CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM != -1) {
|
||||||
|
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
suspend_uarts();
|
suspend_uarts();
|
||||||
|
@@ -116,7 +116,9 @@ __attribute__((weak)) void esp_clk_init(void)
|
|||||||
|
|
||||||
// Wait for UART TX to finish, otherwise some UART output will be lost
|
// Wait for UART TX to finish, otherwise some UART output will be lost
|
||||||
// when switching APB frequency
|
// when switching APB frequency
|
||||||
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
if (CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM != -1) {
|
||||||
|
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
rtc_clk_cpu_freq_set_config(&new_config);
|
rtc_clk_cpu_freq_set_config(&new_config);
|
||||||
|
@@ -122,7 +122,9 @@ __attribute__((weak)) void esp_clk_init(void)
|
|||||||
|
|
||||||
// Wait for UART TX to finish, otherwise some UART output will be lost
|
// Wait for UART TX to finish, otherwise some UART output will be lost
|
||||||
// when switching APB frequency
|
// when switching APB frequency
|
||||||
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
if (CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM != -1) {
|
||||||
|
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
rtc_clk_cpu_freq_set_config(&new_config);
|
rtc_clk_cpu_freq_set_config(&new_config);
|
||||||
|
@@ -122,7 +122,9 @@ __attribute__((weak)) void esp_clk_init(void)
|
|||||||
|
|
||||||
// Wait for UART TX to finish, otherwise some UART output will be lost
|
// Wait for UART TX to finish, otherwise some UART output will be lost
|
||||||
// when switching APB frequency
|
// when switching APB frequency
|
||||||
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
if (CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM != -1) {
|
||||||
|
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
rtc_clk_cpu_freq_set_config(&new_config);
|
rtc_clk_cpu_freq_set_config(&new_config);
|
||||||
|
@@ -118,7 +118,9 @@ __attribute__((weak)) void esp_clk_init(void)
|
|||||||
|
|
||||||
// Wait for UART TX to finish, otherwise some UART output will be lost
|
// Wait for UART TX to finish, otherwise some UART output will be lost
|
||||||
// when switching APB frequency
|
// when switching APB frequency
|
||||||
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
if (CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM != -1) {
|
||||||
|
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
rtc_clk_cpu_freq_set_config(&new_config);
|
rtc_clk_cpu_freq_set_config(&new_config);
|
||||||
|
@@ -117,7 +117,9 @@ __attribute__((weak)) void esp_clk_init(void)
|
|||||||
|
|
||||||
// Wait for UART TX to finish, otherwise some UART output will be lost
|
// Wait for UART TX to finish, otherwise some UART output will be lost
|
||||||
// when switching APB frequency
|
// when switching APB frequency
|
||||||
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
if (CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM != -1) {
|
||||||
|
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
rtc_clk_cpu_freq_set_config(&new_config);
|
rtc_clk_cpu_freq_set_config(&new_config);
|
||||||
|
@@ -93,7 +93,9 @@ __attribute__((weak)) void esp_clk_init(void)
|
|||||||
|
|
||||||
// Wait for UART TX to finish, otherwise some UART output will be lost
|
// Wait for UART TX to finish, otherwise some UART output will be lost
|
||||||
// when switching APB frequency
|
// when switching APB frequency
|
||||||
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
if (CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM != -1) {
|
||||||
|
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
rtc_clk_cpu_freq_set_config(&new_config);
|
rtc_clk_cpu_freq_set_config(&new_config);
|
||||||
|
@@ -26,7 +26,9 @@ void unity_putc(int c)
|
|||||||
|
|
||||||
void unity_flush(void)
|
void unity_flush(void)
|
||||||
{
|
{
|
||||||
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
if(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM != -1) {
|
||||||
|
esp_rom_output_tx_wait_idle(CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define iscontrol(c) ((c) <= '\x1f' || (c) == '\x7f')
|
#define iscontrol(c) ((c) <= '\x1f' || (c) == '\x7f')
|
||||||
|
Reference in New Issue
Block a user