TuyaOS
tuya_iot_config.h
1/*
2tuya_iot_config.h
3Copyright(C),2018-2020, 涂鸦科技 www.tuya.comm
4*/
5
6/* AUTO-GENERATED FILE. DO NOT MODIFY !!!
7*
8* This config file is automatically generated by tuya cross-build system.
9* It should not be modified by hand.
10*/
11
12#ifndef TUYA_IOT_CONFIG_H
13#define TUYA_IOT_CONFIG_H
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/* default definitons */
20
21#define SYSTEM_SMALL_MEMORY_BEGIN 0 /*small memory systems begin */
22#define SYSTEM_REALTEK8710_1M 1
23#define SYSTEM_REALTEK8710_2M 2
24#define SYSTEM_NON_OS 3 /*no operating system*/
25#define SYSTEM_FREERTOS 98
26#define SYSTEM_SMALL_MEMORY_END 99 /*small memory systems end */
27#define SYSTEM_LINUX 100
28#define SYSTEM_LITEOS 120
29
30#define TLS_DISABLE 0 /* disable tls function */
31#define TLS_TUYA_PSK_ONLY 2 /* only enable ciper 0xAE */
32#define TLS_TUYA_ECC_PSK 3 /* enable ciper 0xAE && 0xC027 */
33#define TLS_TUYA_ECC_ONLY 4 /* only enable ciper 0xC027 */
34#define TLS_TUYA_ECC_ONLY_NOSTRIP 5 /* only enable ciper 0xC027, but enable most of mbed-tls configs */
35#define TLS_TUYA_ECC_CLIENT_AUTH 6 /* TLS Client Authentication and Server Authentication mode */
36
37#define TUYA_SL_0 0 /* security level 0,Applies to: Resource-constrained devices;Feature: Can only access Tuya Cloud */
38#define TUYA_SL_1 1 /* security level 1,Applies to: Resource-constrained devices;Feature: One-way authentication */
39#define TUYA_SL_2 2 /* security level 2,Applies to: Resource-rich equipment;Feature: Two-way authentication */
40#define TUYA_SL_3 3 /* security level 3,Applies to: Resource-rich equipment;Feature: Two-way authentication,Devices use security chips to protect sensitive information */
41#define TUYA_MODIFY_MBEDTLS 1
42
43#define TUYA_OPERATOR_DISABLE 0x0
44#define TUYA_OPERATOR_CUCC 0x01
45#define TUYA_OPERATOR_CTCC 0x02
46#define TUYA_OPERATOR_CMCC 0x04
47#define TUYA_OPERATOR_CMCC_ANDLINK 0x08
48#define TUYA_OPERATOR_ALL (TUYA_OPERATOR_CUCC | TUYA_OPERATOR_CTCC | TUYA_OPERATOR_CMCC)
49
50
51#define TUYA_LAN_V31 0x1
52#define TUYA_LAN_V32 0x2
53#define TUYA_LAN_V33 0x4
54#define TUYA_LAN_V35 0x8
55#define TUYA_LAN_ALL (TUYA_LAN_V31 | TUYA_LAN_V32 | TUYA_LAN_V33 | TUYA_LAN_V35)
56
57#define TUYA_MQ_V21 0x1
58#define TUYA_MQ_V22 0x2
59#define TUYA_MQ_V23 0x4
60#define TUYA_MQ_ALL (TUYA_MQ_V21 | TUYA_MQ_V22 | TUYA_MQ_V23)
61
62/* custom settings */
63#define BUILD_DATE "2024_01_03"
64#define BUILD_TIME "14_06_39"
65#define GIT_USER "ci_manage"
66#define IOT_SDK_VER "3.9.0"
67#define SDK_BETA_VER ""
68#define TARGET_PLATFORM "bk7231n"
69#define PROJECT_NAME "tuyaos-iot"
70#define SDK_ID "tuyaos-iot_3.9.0_bk7231n_wifi-ble-com_1.3.5"
71// Generated by Tuya (https://www.tuya.com)
72// 基于项目 tuyaos-iot (3.9.0-beta.1)
73// 基于工具链 bk7231n (0.0.18-beta.32)
74
75
76#define ENABLE_LOG 1
77
78#define STACK_SIZE_TIMERQ 4096
79
80// CONFIG_ENABLE_PRINTF_CHECK is not set
81
82#define ENABLE_SET_SOCK_OPT 1
83
84#define ENABLE_NETWORK_OPTIONS 1
85
86#define TUYA_FD_MAX_COUNT 64
87
88// CONFIG_DISABLE_BIND_INTERFACE is not set
89
90// CONFIG_ENABLE_VENDOR_PRIVATE_NETSTACK is not set
91
92
93#define STACK_SIZE_HEALTH_MONITOR 2048
94
95#define HEALTH_FREE_MEM_THRESHOLD 8192
96
97#define ENABLE_OSS_COMPILE_WARNINGS 1
98
99#define ENABLE_LOG_UPLOAD 1
100
101#define PACKET_SIZE_PER_HTTP_SEND 307200
102
103#define HTTP_SEND_INTERVAL 100
104
105#define PACKET_SIZE_PER_LAN_SEND 8192
106
107#define LAN_SEND_INTERVAL 100
108
109#define MAX_UPD_FILE_SIZE 5242880
110
111
112#define KV_PROTECTED_ENABLE 1
113
114// CONFIG_KV_64BIT_MODE is not set
115
116// CONFIG_ENABLE_KV_FILE is not set
117
118#define ENABLE_KV_PROTECTED 1
119
120#define ENABLE_KV_KEY_SEED 1
121
122#define KV_KEY_SEED "8710_2M"
123
124
125// CONFIG_ENABLE_UF_HUGE_FILE is not set
126
127#define MAX_LENGTH_OF_FILE_FULL_PATH 128
128
129
130#define EVENT_NAME_MAX_LEN 16
131
132#define ENABLE_TUYA_LAN 1
133
134#define TUYA_LAN_VERSION 0x8
135
136#define ENABLE_LAN_ENCRYPTION 1
137
138// CONFIG_ENABLE_RTSP_SERVER is not set
139
140#define STACK_SIZE_LAN 4096
141
142
143#define OTA_DOWMLOAD_BUF_SIZE 1024
144
145#define STACK_SIZE_UPGRADE 4096
146
147// CONFIG_ENABLE_TUYA_DIFF_OTA is not set
148
149// CONFIG_ENABLE_FIRMWARE_SIGN_TUYA is not set
150
151// CONFIG_ENABLE_FIRMWARE_SIGN_USER is not set
152
153
154// CONFIG_ENABLE_PRODUCT_AUTOTEST is not set
155
156#define STACK_SIZE_MF_TEST 5120
157
158#define ENABLE_LWIP 1
159
160#define LWIP_TCP_HEAD_ALLOC_REUSE_POLL 0
161
162#define LWIP_TUYA_APP_TCPIP_THREAD_SWITCH 1
163
164#define IPEF_TEST_OPTIMIZE 0
165
166#define MEM_SIZE 13312
167
168#define MEMP_NUM_UDP_PCB 6
169
170#define MEMP_NUM_TCP_PCB 10
171
172#define MEMP_NUM_TCP_PCB_LISTEN 5
173
174#define MEMP_NUM_NETCONN 21
175
176#define MEMP_NUM_PBUF 100
177
178#define MEMP_NUM_TCP_SEG 20
179
180#define IP_REASS_MAX_PBUFS 10
181
182#define PBUF_POOL_SIZE 20
183
184#define PBUF_LINK_ENCAPSULATION_HLEN 0
185
186#define TCP_SND_BUF 7300
187
188#define TCP_SND_QUEUELEN 20
189
190#define MEMP_NUM_NETBUF 8
191
192#define TCPIP_MBOX_SIZE 6
193
194#define DEFAULT_UDP_RECVMBOX_SIZE 6
195
196#define DEFAULT_TCP_RECVMBOX_SIZE 6
197
198#define DEFAULT_RAW_RECVMBOX_SIZE 6
199
200#define DEFAULT_ACCEPTMBOX_SIZE 6
201
202#define MEMP_NUM_SYS_TIMEOUT 10
203
204#define LWIP_SO_SNDTIMEO 1
205
206#define LWIP_SO_RCVTIMEO 1
207
208#define LWIP_SO_LINGER 1
209
210#define LWIP_TUYA_SO_LINGER_RST 1
211
212#define LWIP_PROVIDE_ERRNO 1
213
214#define LWIP_IPV6 0
215
216#define LWIP_NETIF_HOSTNAME 1
217
218#define LWIP_TCPIP_CORE_LOCKING 1
219
220#define LWIP_EAPOL_SUPPORT 0
221
222#define TCPIP_THREAD_STACKSIZE 2048
223
224#define TCPIP_THREAD_PRIO 9
225
226#define DHCPC_THREAD_STACKSIZE 2048
227
228#define DHCPC_THREAD_PRIO 5
229
230#define LWIP_TX_PBUF_ZERO_COPY 0
231
232#define CONFIG_TUYA_SOCK_SHIM 0
233
234#define SOCK_API_SYNC 0
235
236#define LWIP_DHCPC_STATIC_IPADDR_ENABLE 0
237
238#define LWIP_NETCONN_SEM_PER_THREAD 1
239
240#define ETHARP_SUPPORT_STATIC_ENTRIES 1
241
242#define LWIP_NETIF_STATUS_CALLBACK 1
243
244#define LWIP_COMPAT_MUTEX_ALLOWED 1
245
246#define LWIP_TIMEVAL_PRIVATE 1
247
248// CONFIG_IN_ADDR_T_DEFINED is not set
249
250#define LWIP_NETCONN_FULLDUPLEX 1
251
252#define MEM_LIBC_MALLOC 0
253
254#define ENABLE_BT_SERVICE 1
255
256#define ENABLE_BT_NETCFG 1
257
258#define ENABLE_BT_ACTIVE 1
259
260#define ENABLE_BT_CTRL 1
261
262#define BT_ADV_INTERVAL_MIN 30
263
264#define BT_ADV_INTERVAL_MAX 60
265
266#define ENABLE_BT_REMOTE_CTRL 1
267
268#define BT_REMOTE_CTRL_SCAN_INTERVAL 30
269
270#define BT_REMOTE_CTRL_SCAN_WINDOWS 10
271
272#define ENABLE_BT_TIMER 1
273
274#define ENABLE_BT_MF 1
275
276// CONFIG_ENABLE_MF_BY_BT is not set
277
278// CONFIG_ENABLE_BT_MESH_NODE is not set
279
280// CONFIG_ENABLE_BT_VIRTUAL is not set
281
282#define TUYA_BLE_VER 4
283
284#define ENABLE_TAL_BLUETOOTH 1
285
286#define TAL_BLUETOOTH 1
287
288#define TAL_BLE_SERVICE_VERSION 2
289
290#define ENABLE_TUYA_BLE_STACK 1
291
292#define TARGET_BT_PLATFORM 3
293
294#define TUYA_HS_BLE_HOST_TASK_PRIORITY 5
295
296#define TUYA_HS_BLE_HOST_STACK_SIZE 3072
297
298#define TY_BT_MOD 1
299
300#define BT_NETCFG 1
301
302#define BT_ACTIVE 1
303
304#define BT_CTRL 1
305
306#define BT_REMOTE_CTRL 1
307
308#define BT_TIMER 1
309
310#define MF_BT 1
311
312// CONFIG_BT_MESH_NODE is not set
313
314// CONFIG_BT_VIRTUAL is not set
315
316// CONFIG_ENABLE_TUYA_RPC is not set
317
318#define WIFI_GW 1
319
320// CONFIG_TUYA_HOSTAPD_SUPPORT is not set
321
322#define ENABLE_WIFI_SERVICE 1
323
324// CONFIG_ENABLE_WIFI_EZ is not set
325
326#define ENABLE_WIFI_AP 1
327
328// CONFIG_ENABLE_WIFI_FFS is not set
329
330// CONFIG_ENABLE_WIFI_PEGASUS is not set
331
332#define ENABLE_WIFI_QRCODE 1
333
334#define ENABLE_WIFI_PROTECT 1
335
336#define ENABLE_WIFI_FFC 1
337
338
339// CONFIG_TUYA_WIFI_FFC_MASTER is not set
340
341#define TUYA_WIFI_FFC_SLAVER 1
342
343// CONFIG_ENABLE_HOSTAPD is not set
344
345#define ENABLE_STATION_AP_MODE 0
346
347#define WIFI_AP_BUF_SIZE 10240
348
349// CONFIG_QRCODE_ACTIVE_MODE is not set
350
351#define ENABLE_TUYA_CLOUD 1
352
353#define ENABLE_ASTRO_TIMER 1
354
355#define ENABLE_CALENDAR_TIMER 1
356
357// CONFIG_ENABLE_QRCODE_ACTIVE is not set
358
359#define ENABLE_DEVICE_DATA_COLLECT 1
360
361#define ENABLE_LOCAL_KEY_UPDATE 1
362
363#define ENABLE_COMMUNICATE_PRIORITY 1
364
365
366// CONFIG_ENABLE_BLACK_WHITE_LIST is not set
367
368#define MAX_SECURITY_LEVEL 0
369
370#define TUYA_SECURITY_LEVEL 0
371
372// CONFIG_ENABLE_MBEDTLS_DEBUG is not set
373
374// CONFIG_ENABLE_CUSTOM_CONFIG is not set
375
376
377#define HTTP_MAX_REQ_RESP_HDR_SIZE 1024
378
379#define MAX_HTTP_SESSION_NUM 16
380
381// CONFIG_ENABLE_HTTP_SESSION is not set
382
383
384#define TUYA_MQ_VERSION 0x4
385
386#define STACK_SIZE_MQTT_CLIENT 4096
387
388#define QOS1_PUBACK_TIMEOUT 3
389
390#define QOS1_PUBLISH_SLOT_CNT 8
391
392#define QOS1_PUBACK_TIMEOUT_LIMIT 3
393
394#define MAX_RANDOM_DELAY_BEFORE_RECONNECT 300
395
396#define MQTT_HEATBEAT_INTERVAL 60
397
398#define MQTT_RECV_BUF_SIZE 512
399
400#define MQTT_MAX_MESSGAE_SIZE 4096
401
402#define MQTT_RECV_SELECT_TIMEOUT 3000
403
404// CONFIG_ENABLE_MQTT_QOS1_RESEND is not set
405
406// CONFIG_ENABLE_MATOP is not set
407
408#define MATOP_REQ_TIMEOUT 6
409
410#define TUYA_IOT_DEBUG 1
411
412
413#define STACK_SIZE_WORK_QUEUE 5120
414
415#define MAX_NODE_NUM_WORK_QUEUE 100
416
417#define STACK_SIZE_MSG_QUEUE 4096
418
419#define MAX_NODE_NUM_MSG_QUEUE 100
420
421#define ENABLE_IOT_DEBUG 1
422
423#define MAX_SIZE_OF_DEBUG_BUF 1024
424
425#define ENABLE_LOG_OUTPUT_FORMAT 1
426
427#define TUYA_REDUCE_BIN 2
428
429// CONFIG_ENABLE_WEBSOCKET is not set
430// Generated by Tuya (https://www.tuya.com)
431// 基于工具链 bk7231n (0.0.100-beta.3)
432
433
434#define OPERATING_SYSTEM 98
435
436#define LITTLE_END 1
437
438// CONFIG_ENABLE_FILE_SYSTEM is not set
439
440#define ENABLE_RTC 1
441
442#define ENABLE_ADC 1
443
444#define ENABLE_UART 1
445
446// CONFIG_ENABLE_UART_INTERRUPT is not set
447
448#define ENABLE_WATCHDOG 1
449
450#define ENABLE_FLASH 1
451
452#define TUYA_FLASH_TYPE_MAX_PARTITION_NUM 10
453
454#define ENABLE_PWM 1
455
456#define ENABLE_GPIO 1
457
458// CONFIG_ENABLE_I2C is not set
459
460#define ENABLE_SPI 1
461
462// CONFIG_ENABLE_ZIGBEE is not set
463
464#define ENABLE_WIFI 1
465
466// CONFIG_ENABLE_WIRED is not set
467
468#define ENABLE_TIMER 1
469
470// CONFIG_ENABLE_BLUETOOTH is not set
471
472#define ENABLE_HCI 1
473
474// CONFIG_ENABLE_DISPLAY is not set
475
476// CONFIG_ENABLE_MEDIA is not set
477
478// CONFIG_ENABLE_PM is not set
479
480// CONFIG_GPRS_GW is not set
481
482// CONFIG_TUYA_CAT1 is not set
483
484// CONFIG_ENABLE_CELLULAR is not set
485
486// CONFIG_ENABLE_STORAGE is not set
487
488// CONFIG_ENABLE_NB is not set
489
490// CONFIG_ENABLE_REGISTER is not set
491
492// CONFIG_ENABLE_DAC is not set
493
494// CONFIG_ENABLE_I2S is not set
495
496#define ENABLE_PINMUX 1
497
498// CONFIG_ENABLE_PLATFORM_AES is not set
499
500// CONFIG_ENABLE_PLATFORM_SHA256 is not set
501
502// CONFIG_ENABLE_PLATFORM_MD5 is not set
503
504// CONFIG_ENABLE_PLATFORM_SHA1 is not set
505
506// CONFIG_ENABLE_PLATFORM_RSA is not set
507
508// CONFIG_ENABLE_PLATFORM_ECC is not set
509
510// CONFIG_ENABLE_WAKEUP is not set
511#define KERNEL_VER "1.0.0"
512#ifndef TUYA_LAN_VERSION
513#define TUYA_LAN_VERSION TUYA_LAN_V35
514#endif
515
516#ifndef TUYA_MQ_VERSION
517#define TUYA_MQ_VERSION TUYA_MQ_V23
518#endif
519
520#ifndef ENABLE_DEVICE_DATA_COLLECT
521#define ENABLE_DEVICE_DATA_COLLECT 0
522#endif
523
524#ifndef TUYA_WEAK_ATTRIBUTE
525#define TUYA_WEAK_ATTRIBUTE __attribute__ ((weak))
526#endif
527
528#ifndef KERNEL_VER
529#define KERNEL_VER "9.9.9"
530#endif
531
532/* custom settings */
533
534#ifdef __cplusplus
535}
536#endif
537
538
539#endif