This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
forked from esp-rs/esp-idf-sys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bindings.h
393 lines (338 loc) · 9.28 KB
/
bindings.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
#include "esp_system.h"
#if ((ESP_IDF_VERSION_MAJOR < 4) || ((ESP_IDF_VERSION_MAJOR == 4) && (ESP_IDF_VERSION_MINOR < 3)) || ((ESP_IDF_VERSION_MAJOR == 4) && (ESP_IDF_VERSION_MINOR == 3) && (ESP_IDF_VERSION_PATCH < 2)))
#error Only ESP-IDF versions >= V4.3.2 are currently supported; if you are using the PIO build (the default one), wipe out your `.embuild` folder and try again with a clean rebuild
#endif
#include "esp_rom_crc.h"
#include "esp_log.h"
#include "esp_debug_helpers.h"
#include "esp_sleep.h"
#include "esp_task.h"
#include "esp_task_wdt.h"
#include "esp_interface.h"
#include "esp_ipc.h"
#include "esp_mac.h"
#include "esp_freertos_hooks.h"
#include "freertos/task_snapshot.h"
#if CONFIG_IDF_TARGET_ESP32
#if ESP_IDF_VERSION_MAJOR == 4
#include "esp32/himem.h"
#elif ESP_IDF_VERSION_MAJOR == 5
#ifdef ESP_IDF_COMP_ESP_PSRAM_ENABLED
#include "esp32/himem.h"
#endif // ESP_IDF_COMP_ESP_PSRAM_ENABLED
#endif // ESP_IDF_VERSION_MAJOR == 5
#endif // CONFIG_IDF_TARGET_ESP32
#if ESP_IDF_VERSION_MAJOR == 4
#include "esp_spiram.h"
#elif ESP_IDF_VERSION_MAJOR == 5
#ifdef ESP_IDF_COMP_ESP_PSRAM_ENABLED
#include "esp_psram.h"
#endif // ESP_IDF_COMP_ESP_PSRAM_ENABLED
#endif // ESP_IDF_VERSION_MAJOR == 5
#if ESP_IDF_VERSION_MAJOR == 4
#include "esp_int_wdt.h"
#elif ESP_IDF_VERSION_MAJOR == 5
#include "esp_private/esp_int_wdt.h"
#endif
#ifdef ESP_IDF_COMP_CONSOLE_ENABLED
#include "esp_console.h"
#include "linenoise/linenoise.h"
#include "argtable3/argtable3.h"
#endif
#ifdef ESP_IDF_COMP_EFUSE_ENABLED
#include "esp_efuse.h"
#endif
#ifdef ESP_IDF_COMP_ESP_PM_ENABLED
#include "esp_pm.h"
#endif
#ifdef ESP_IDF_COMP_ESP_TIMER_ENABLED
#include "esp_timer.h"
#endif
#ifdef ESP_IDF_COMP_SPI_FLASH_ENABLED
#include "esp_spi_flash.h"
#include "esp_partition.h"
#endif
#if defined(ESP_IDF_COMP_ESP_ADC_CAL_ENABLED) || defined(ESP_IDF_COMP_ESP_ADC_ENABLED)
#include "esp_adc_cal.h"
#endif
#ifdef ESP_IDF_COMP_ESP_EVENT_ENABLED
#include "esp_event.h"
#endif
#ifdef ESP_IDF_COMP_ESP_NETIF_ENABLED
#include "esp_netif.h"
#endif
#ifdef ESP_IDF_COMP_ESP_WIFI_ENABLED
#include "esp_wifi.h"
#ifdef ESP_IDF_COMP_ESP_NETIF_ENABLED
#include "esp_wifi_netif.h"
#endif
#include "esp_now.h"
#include "esp_mesh.h"
#include "esp_wpa2.h"
#endif
#ifdef ESP_IDF_COMP_WPA_SUPPLICANT_ENABLED
#if defined(CONFIG_ESP_WIFI_DPP_SUPPORT) || defined(CONFIG_WPA_DPP_SUPPORT)
#include "esp_dpp.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESP_ETH_ENABLED
#include "esp_eth.h"
#ifdef ESP_IDF_COMP_ESP_NETIF_ENABLED
#include "esp_eth_netif_glue.h"
#endif
#endif
#ifdef ESP_IDF_COMP_VFS_ENABLED
#include "esp_vfs.h"
#include "esp_vfs_cdcacm.h"
#include "esp_vfs_dev.h"
#include "esp_vfs_semihost.h"
#include "esp_vfs_usb_serial_jtag.h"
#if ((ESP_IDF_VERSION_MAJOR > 4) || ((ESP_IDF_VERSION_MAJOR == 4) && (ESP_IDF_VERSION_MINOR >= 4)))
#include "esp_vfs_console.h"
#endif
#if ((ESP_IDF_VERSION_MAJOR > 4) || ((ESP_IDF_VERSION_MAJOR == 4) && (ESP_IDF_VERSION_MINOR >= 4)))
#include "esp_vfs_eventfd.h"
#endif
#ifdef ESP_IDF_COMP_SPIFFS_ENABLED
#include "esp_spiffs.h"
#endif
#ifdef ESP_IDF_COMP_FATFS_ENABLED
#include "esp_vfs_fat.h"
#include "diskio_impl.h"
#include "diskio_rawflash.h"
#include "diskio_sdmmc.h"
#include "diskio_wl.h"
#endif
#endif
#ifdef ESP_IDF_COMP_LWIP_ENABLED
#include "lwip/lwip_napt.h"
#include "lwip/netdb.h"
#include "lwip/sockets.h"
#include "esp_sntp.h"
#include "ping/ping_sock.h"
#endif
#ifdef ESP_IDF_COMP_MBEDTLS_ENABLED
#ifdef CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
#include "esp_crt_bundle.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESP_TLS_ENABLED
#include "esp_tls.h"
#endif
#ifdef ESP_IDF_COMP_BOOTLOADER_SUPPORT_ENABLED
#include "bootloader_common.h"
#include "bootloader_random.h"
#endif
#ifdef ESP_IDF_COMP_APP_UPDATE_ENABLED
#include "esp_ota_ops.h"
#endif
#ifdef ESP_IDF_COMP_ESP_HTTP_CLIENT_ENABLED
#include "esp_http_client.h"
#endif
#ifdef ESP_IDF_COMP_TCP_TRANSPORT_ENABLED
#include "esp_transport.h"
#include "esp_transport_ssl.h"
#include "esp_transport_tcp.h"
#ifdef CONFIG_WS_TRANSPORT
#include "esp_transport_ws.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESP_HTTP_SERVER_ENABLED
#include "esp_http_server.h"
#endif
#ifdef CONFIG_ESP_HTTPS_SERVER_ENABLE
#include "esp_https_server.h"
#endif
#ifdef ESP_IDF_COMP_ESP_WEBSOCKET_CLIENT_ENABLED
#include "esp_websocket_client.h"
#endif
#ifdef ESP_IDF_COMP_MDNS_ENABLED
#include "mdns.h"
#endif
#ifdef ESP_IDF_COMP_MQTT_ENABLED
#include "mqtt_client.h"
#endif
#ifdef ESP_IDF_COMP_NVS_FLASH_ENABLED
#include "nvs.h"
#include "nvs_flash.h"
#endif
#ifdef ESP_IDF_COMP_WIFI_PROVISIONING_ENABLED
#include "wifi_provisioning/manager.h"
#include "wifi_provisioning/scheme_ble.h"
#include "wifi_provisioning/scheme_softap.h"
#endif
#ifdef ESP_IDF_COMP_SOC_ENABLED
// TODO: Include all XXX_periph.h headers here
#include "soc/gpio_periph.h"
#include "soc/rtc_periph.h"
#endif
#ifdef ESP_IDF_COMP_DRIVER_ENABLED
#include "driver/adc.h"
#if ESP_IDF_VERSION_MAJOR > 4
#include "esp_adc/adc_continuous.h"
#endif
#include "driver/twai.h"
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2)
#include "driver/dac.h"
#endif
#include "driver/gpio.h"
#include "driver/i2c.h"
#include "driver/i2s.h"
#include "driver/ledc.h"
#if ESP_IDF_VERSION_MAJOR > 4
#include "driver/i2s_common.h"
#include "driver/i2s_pdm.h"
#include "driver/i2s_std.h"
#include "driver/i2s_tdm.h"
#include "driver/i2s_types.h"
#include "driver/mcpwm_prelude.h"
#else
#include "driver/i2s.h"
#include "driver/mcpwm.h"
#endif
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32H2) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32P4)
#include "driver/pcnt.h"
#if ESP_IDF_VERSION_MAJOR >= 5
#include "driver/pulse_cnt.h"
#endif
#endif
#include "driver/periph_ctrl.h"
#include "driver/rmt.h"
#include "driver/rtc_cntl.h"
#include "driver/rtc_io.h"
#ifdef CONFIG_IDF_TARGET_ESP32
#include "driver/sdio_slave.h"
#endif
#include "driver/sdmmc_defs.h"
#include "driver/sdmmc_host.h"
#include "driver/sdmmc_types.h"
#include "driver/sdspi_host.h"
#include "driver/sigmadelta.h"
#include "driver/spi_common.h"
#include "driver/spi_master.h"
#include "driver/spi_slave.h"
#include "driver/timer.h"
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)
#include "driver/touch_pad.h"
#endif
#include "driver/uart.h"
#include "driver/uart_select.h"
#endif
#ifdef ESP_IDF_COMP_ESPCOREDUMP_ENABLED
#include "esp_core_dump.h"
#endif
#ifdef ESP_IDF_COMP_ESP_SERIAL_SLAVE_LINK_ENABLED
#include "esp_serial_slave_link/essl.h"
#include "esp_serial_slave_link/essl_sdio.h"
#endif
#ifdef ESP_IDF_COMP_PTHREAD_ENABLED
#include "pthread.h"
#include "esp_pthread.h"
#endif
#ifdef ESP_IDF_COMP_USB_ENABLED
#ifdef CONFIG_USB_OTG_SUPPORTED
#include "usb/usb_host.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ULP_ENABLED
#if (ESP_IDF_VERSION_MAJOR > 4)
// ESP-IDF V5+
#ifdef CONFIG_ULP_COPROC_ENABLED
#if CONFIG_ULP_COPROC_TYPE_FSM
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/ulp.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/ulp.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/ulp.h"
#endif
#else
#include "ulp_riscv.h"
#endif
#endif
#else
// ESP-IDF V4.X
#ifdef CONFIG_ESP32_ULP_COPROC_ENABLED
#include "esp32/ulp.h"
#endif
#ifdef CONFIG_ESP32S2_ULP_COPROC_ENABLED
#ifdef CONFIG_ESP32S2_ULP_COPROC_RISCV
#include "esp32s2/ulp_riscv.h"
#else
#include "esp32s2/ulp.h"
#endif
#endif
#ifdef CONFIG_ESP32S3_ULP_COPROC_ENABLED
#ifdef CONFIG_ESP32S3_ULP_COPROC_RISCV
#include "esp32s3/ulp_riscv.h"
#else
#include "esp32s2/ulp.h"
#endif
#endif
#endif
#endif
#ifndef CONFIG_IDF_TARGET_ESP32S2 // No BT in ESP32-S2
// If a custom sdkconfig file has been used to enable Bluetooth support,
// since by default neither of the BT stacks is enabled.
#ifdef CONFIG_BT_ENABLED
#include "esp_bt.h"
// Bluedroid APIs (Classic BT & BLE)
#ifdef CONFIG_BT_BLUEDROID_ENABLED
// Generic
#include "esp_bt_defs.h"
#include "esp_bt_device.h"
#include "esp_bt_main.h"
// Classic BT
#ifdef CONFIG_IDF_TARGET_ESP32 // Only the original ESP32 MCU supports Classic BT
#ifdef CONFIG_BT_CLASSIC_ENABLED
#ifdef CONFIG_BT_A2DP_ENABLE
#include "esp_a2dp_api.h"
#include "esp_avrc_api.h"
#endif
#include "esp_gap_bt_api.h"
#ifdef CONFIG_BT_HFP_ENABLE
#include "esp_hf_ag_api.h"
#include "esp_hf_client_api.h"
#endif
#ifdef CONFIG_BT_HID_ENABLED
#include "esp_hidd_api.h"
#endif
#include "esp_hidh_api.h"
#if ESP_IDF_VERSION_MAJOR > 4
#include "esp_sdp_api.h"
#endif
#ifdef CONFIG_BT_SPP_ENABLED
#include "esp_spp_api.h"
#endif
#endif // CONFIG_BT_CLASSIC_ENABLED
#endif // CONFIG_IDF_TARGET_ESP32
// BLE
#ifdef CONFIG_BT_BLE_ENABLED
#include "esp_gap_ble_api.h"
#include "esp_gatt_defs.h"
#include "esp_gatt_common_api.h"
#ifdef CONFIG_BT_GATTC_ENABLE
#include "esp_gattc_api.h"
#endif
#ifdef CONFIG_BT_GATTS_ENABLE
#include "esp_gatts_api.h"
#endif
#if ESP_IDF_VERSION_MAJOR > 4
#ifdef CONFIG_BT_L2CAP_ENABLED
#include "esp_l2cap_bt_api.h"
#endif
#endif
#endif // CONFIG_BT_BLE_ENABLED
#endif // CONFIG_BT_BLUEDROID_ENABLED
// Nimble APIs (BLE only)
#ifdef CONFIG_BT_NIMBLE_ENABLED
#include "esp_nimble_hci.h"
#include "nimble/nimble_port.h"
#include "nimble/nimble_port_freertos.h"
#include "host/ble_hs.h"
#include "host/util/util.h"
#include "services/gap/ble_svc_gap.h"
#include "services/gatt/ble_svc_gatt.h"
#endif // CONFIG_BT_NIMBLE_ENABLED
#endif // CONFIG_BT_ENABLED
#endif // CONFIG_IDF_TARGET_ESP32S2