T-Box Basic dev
Loading...
Searching...
No Matches
icc.h
Go to the documentation of this file.
1
10
11#ifndef ICC_API_H
12#define ICC_API_H
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18typedef enum
19{
20 ICC_CMD_TYPE_SYS = 0x10,
21 ICC_CMD_TYPE_DIAG = 0x11,
22 ICC_CMD_TYPE_CAN = 0x12,
23 ICC_CMD_TYPE_LOG = 0x13,
24 ICC_CMD_TYPE_OTA = 0x14,
25 ICC_CMD_TYPE_ECALL = 0x15,
26 ICC_CMD_TYPE_FTM = 0xF0,
27} icc_cmd_type_t;
28
29typedef enum
30{
31 ICC_CMD_SYS_INFO_BOOT = 0x1001,
32 ICC_CMD_SYS_INFO_PERIODIC = 0x1002,
33 ICC_CMD_SYS_POWER_STATUS = 0x1003,
34 ICC_CMD_SYS_WORK_STATUS = 0x1005,
35 ICC_CMD_SYS_RTC = 0x1006,
36 ICC_CMD_SYS_RTC_WAKEUP = 0x1007,
37 ICC_CMD_SYS_RESET = 0x1008,
38 ICC_CMD_SYS_DID_SYNC = 0x1009,
39 ICC_CMD_SYS_CAN_CONFIG = 0x100B,
40 ICC_CMD_SYS_GPIO = 0x100d,
41 ICC_CMD_CAN_DIAG = 0x1101,
42 ICC_CMD_CAN_PASSTHROUGH = 0x1201,
43 ICC_CMD_LOG_MCU = 0x1301,
44 ICC_CMD_LOG_SECURITY_EVENT = 0x1302,
45 ICC_CMD_OTA_CONTROL = 0x1401,
46 ICC_CMD_OTA_DATA = 0x1402,
47 ICC_CMD_ECALL_CONTROL = 0x1501,
48 ICC_CMD_ECALL_STATUS_SYNC = 0x1502,
49 ICC_CMD_FTM_CONTROL = 0xF001,
50} icc_cmd_t;
51
52typedef void (*icc_msg_handler_t)(uint16_t cmd, const uint8_t *buf, uint32_t len);
53
62int icc_send_message(uint16_t cmd, const uint8_t *data, uint16_t len);
63
70
77int icc_set_transfer_switch(bool switch_on);
78
85
93int icc_register_callback(icc_cmd_type_t cmd_type, icc_msg_handler_t handler_cb);
94
95#ifdef __cplusplus
96}
97#endif
98
99#endif
int icc_register_callback(icc_cmd_type_t cmd_type, icc_msg_handler_t handler_cb)
注册 ICC 消息回调函数。
int icc_set_transfer_switch(bool switch_on)
设置 ICC 传输开关。
bool icc_get_handshake_status(void)
获取 ICC 握手状态。
bool icc_get_transfer_switch(void)
获取 ICC 传输开关状态。
int icc_send_message(uint16_t cmd, const uint8_t *data, uint16_t len)
发送一条 ICC 消息。