Select one of the symbols to view example projects that use it.
 
Outline
#include "sdkconfig.h"
#include <stdint.h>
#include <inttypes.h>
#include <stdarg.h>
#include "soc/reset_reasons.h"
esp_rom_software_reset_system();
esp_rom_software_reset_cpu(int);
esp_rom_printf(const char *, ...);
esp_rom_vprintf(const char *, va_list);
esp_rom_delay_us(uint32_t);
esp_rom_install_channel_putc(int, void (*)(char));
esp_rom_output_to_channels(char);
esp_rom_install_uart_printf();
esp_rom_get_reset_reason(int);
esp_rom_route_intr_matrix(int, uint32_t, uint32_t);
esp_rom_get_cpu_ticks_per_us();
esp_rom_set_cpu_ticks_per_us(uint32_t);
Files
loading...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/esp_rom/include/esp_rom_sys.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2010-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #pragma once #include "sdkconfig.h" #include <stdint.h> #include <inttypes.h> #include <stdarg.h> #include "soc/reset_reasons.h"5 includes #ifdef __cplusplus extern "C" { #endif /** * @brief Software Reset digital core include RTC. * * It is not recommended to use this function in esp-idf, use * esp_restart() instead. *//* ... */ void esp_rom_software_reset_system(void); /** * @brief Software Reset cpu core. * * It is not recommended to use this function in esp-idf, use * esp_restart() instead. * * @param cpu_no : The CPU to reset, 0 for PRO CPU, 1 for APP CPU. *//* ... */ void esp_rom_software_reset_cpu(int cpu_no); /** * @brief Print formatted string to console device * @note float and long long data are not supported! * * @param fmt Format string * @param ... Additional arguments, depending on the format string * @return int: Total number of characters written on success; A negative number on failure. *//* ... */ int esp_rom_printf(const char *fmt, ...); /** * @brief Print formatted string to console device * @note float and long long data are not supported! * * @param fmt Format string * @param ap List of arguments. * @return int: Total number of characters written on success; A negative number on failure. *//* ... */ int esp_rom_vprintf(const char *fmt, va_list ap); /** * @brief Pauses execution for us microseconds * * @param us Number of microseconds to pause *//* ... */ void esp_rom_delay_us(uint32_t us); /** * @brief esp_rom_printf can print message to different channels simultaneously. * This function can help install the low level putc function for esp_rom_printf. * * @param channel Channel number (starting from 1) * @param putc Function pointer to the putc implementation. Set NULL can disconnect esp_rom_printf with putc. *//* ... */ void esp_rom_install_channel_putc(int channel, void (*putc)(char c)); /** * @brief It outputs a character to different channels simultaneously. * This function is used by esp_rom_printf/esp_rom_vprintf. * * @param c Char to output. *//* ... */ void esp_rom_output_to_channels(char c); /** * @brief Install UART1 as the default console channel, equivalent to `esp_rom_install_channel_putc(1, esp_rom_output_putc)` *//* ... */ void esp_rom_install_uart_printf(void); /** * @brief Get reset reason of CPU * * @param cpu_no CPU number * @return Reset reason code (see in soc/reset_reasons.h) *//* ... */ soc_reset_reason_t esp_rom_get_reset_reason(int cpu_no); /** * @brief Route peripheral interrupt sources to CPU's interrupt port by matrix * * Usually there're 4 steps to use an interrupt: * 1. Route peripheral interrupt source to CPU. e.g. esp_rom_route_intr_matrix(0, ETS_WIFI_MAC_INTR_SOURCE, ETS_WMAC_INUM) * 2. Set interrupt handler for CPU * 3. Enable CPU interrupt * 4. Enable peripheral interrupt * * @param cpu_core The CPU number, which the peripheral interrupt will inform to * @param periph_intr_id The peripheral interrupt source number * @param cpu_intr_num The CPU (external) interrupt number. On targets that use CLIC as their interrupt controller, * this number represents the external interrupt number. For example, passing `cpu_intr_num = i` * to this function would in fact bind peripheral source to CPU interrupt `CLIC_EXT_INTR_NUM_OFFSET + i`. *//* ... */ void esp_rom_route_intr_matrix(int cpu_core, uint32_t periph_intr_id, uint32_t cpu_intr_num); /** * @brief Get the real CPU ticks per us * * @return CPU ticks per us *//* ... */ uint32_t esp_rom_get_cpu_ticks_per_us(void); /** * @brief Set the real CPU tick rate * * @note Call this function when CPU frequency is changed, otherwise the `esp_rom_delay_us` can be inaccurate. * * @param ticks_per_us CPU ticks per us *//* ... */ void esp_rom_set_cpu_ticks_per_us(uint32_t ticks_per_us); #ifdef __cplusplus }{...} #endif
Details