mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
fix(esp_rom): Patch the esp_rom_delay_us API to use U-mode cycle CSR
This commit is contained in:
@@ -114,3 +114,7 @@ config ESP_ROM_HAS_OUTPUT_PUTC_FUNC
|
||||
config ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY
|
||||
bool
|
||||
default y
|
||||
|
||||
config ESP_ROM_DELAY_US_PATCH
|
||||
bool
|
||||
default y
|
||||
|
||||
@@ -34,3 +34,4 @@
|
||||
#define ESP_ROM_USB_OTG_NUM (-1) // No USB_OTG CDC in the ROM, set -1 for Kconfig usage.
|
||||
#define ESP_ROM_HAS_OUTPUT_PUTC_FUNC (1) // ROM has esp_rom_output_putc (or ets_write_char_uart)
|
||||
#define ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY (1) // ROM mem/str functions are not optimized well for misaligned memory access.
|
||||
#define ESP_ROM_DELAY_US_PATCH (1) // ROM ets_delay_us needs patch for U-mode operation
|
||||
|
||||
@@ -64,9 +64,9 @@ struct ETSEventTag {
|
||||
typedef void (*ETSTask)(ETSEvent *e); /**< Type of the Task processor*/
|
||||
typedef void (* ets_idle_cb_t)(void *arg); /**< Type of the system idle callback*/
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct ets_ops {
|
||||
void (*ets_delay_us)(uint32_t us);
|
||||
} ets_ops;
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -23,7 +23,7 @@ ets_install_putc2 = 0x4000002c;
|
||||
ets_install_uart_printf = 0x40000030;
|
||||
ets_install_usb_printf = 0x40000034;
|
||||
ets_get_printf_channel = 0x40000038;
|
||||
ets_delay_us = 0x4000003c;
|
||||
PROVIDE ( ets_delay_us = 0x4000003c );
|
||||
ets_get_cpu_frequency = 0x40000040;
|
||||
ets_update_cpu_frequency = 0x40000044;
|
||||
ets_install_lock = 0x40000048;
|
||||
|
||||
Reference in New Issue
Block a user