mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
Merge branch 'refactor/add_alias_name_for_ets_common_api' into 'master'
esp_rom: extract common ets apis into esp_rom_sys.h See merge request espressif/esp-idf!9701
This commit is contained in:
@@ -66,7 +66,7 @@ The first way is to use the ``RTC_DATA_ATTR`` and ``RTC_RODATA_ATTR`` to specify
|
||||
void RTC_IRAM_ATTR esp_wake_deep_sleep(void) {
|
||||
esp_default_wake_deep_sleep();
|
||||
static RTC_RODATA_ATTR const char fmt_str[] = "Wake count %d\n";
|
||||
ets_printf(fmt_str, wake_count++);
|
||||
esp_rom_printf(fmt_str, wake_count++);
|
||||
}
|
||||
|
||||
.. only:: esp32
|
||||
@@ -85,7 +85,7 @@ For example, the equivalent example in ``rtc_wake_stub_counter.c``::
|
||||
|
||||
void RTC_IRAM_ATTR esp_wake_deep_sleep(void) {
|
||||
esp_default_wake_deep_sleep();
|
||||
ets_printf("Wake count %d\n", wake_count++);
|
||||
esp_rom_printf("Wake count %d\n", wake_count++);
|
||||
}
|
||||
|
||||
The second way is a better option if you need to use strings, or write other more complex code.
|
||||
|
@@ -93,7 +93,7 @@ There are several limitations to the USB console feature. These may or may not b
|
||||
|
||||
4. USB CDC driver reserves some amount of RAM and increases application code size. Keep this in mind if trying to optimize application memory usage.
|
||||
|
||||
5. By default, the low-level ``ets_printf`` feature and ``ESP_EARLY_LOG`` are disabled when USB CDC is used. These can be enabled using :ref:`CONFIG_ESP_CONSOLE_USB_CDC_SUPPORT_ETS_PRINTF` option. With this option enabled, ``ets_printf`` can be used, at the expense of increased IRAM usage. Keep in mind that the cost of ``ets_printf`` and ``ESP_EARLY_LOG`` over USB CDC is significantly higher than over UART. This makes these logging mechanisms much less suitable for "printf debugging", especially in the interrupt handlers.
|
||||
5. By default, the low-level ``esp_rom_printf`` feature and ``ESP_EARLY_LOG`` are disabled when USB CDC is used. These can be enabled using :ref:`CONFIG_ESP_CONSOLE_USB_CDC_SUPPORT_ETS_PRINTF` option. With this option enabled, ``esp_rom_printf`` can be used, at the expense of increased IRAM usage. Keep in mind that the cost of ``esp_rom_printf`` and ``ESP_EARLY_LOG`` over USB CDC is significantly higher than over UART. This makes these logging mechanisms much less suitable for "printf debugging", especially in the interrupt handlers.
|
||||
|
||||
6. If you are developing an application which uses the USB peripheral with the TinyUSB stack, this USB Console feature can not be used. This is mainly due to the following reasons:
|
||||
|
||||
|
Reference in New Issue
Block a user