1 2 #ifndef __GENIE_BIN_CMDS_H__ 3 #define __GENIE_BIN_CMDS_H__ 4 5 #define GENIE_BIN_OPCODE_DATA (0xFF00) 6 #define GENIE_BIN_OPCODE_CMD (0xFE00) 7 #define GENIE_BIN_OPCODE_ERR (0x5555) 8 9 #define GENIE_BIN_MIN_DATA_LEN (5) 10 #define GENIE_BLE_MAC_LEN (6) 11 12 #define GENIE_BINARY_CMD_TOTAL_LEN_ERR (0x01) 13 #define GENIE_BINARY_CMD_DATA_LEN_ERR (0x02) 14 #define GENIE_BINARY_CMD_CRC_ERR (0x03) 15 #define GENIE_BINARY_CMD_GET_RSSI_INPUT_ERR (0x04) 16 #define GENIE_BINARY_CMD_GET_RSSI_BLE_ERR (0x05) 17 #define GENIE_BINARY_CMD_GET_RSSI_MAC_NOT_MATCH_ERR (0x06) 18 #define GENIE_BINARY_CMD_UPDATE_GROUP_ADDR_LEN_ERR (0x07) 19 #define GENIE_BINARY_CMD_UPDATE_GROUP_ADDR_INVALID_ERR (0x08) 20 #define GENIE_BINARY_CMD_UPDATE_GROUP_ADDR_FLASH_ERR (0x09) 21 #define GENIE_BINARY_CMD_START_FACTORY_ERR (0x0A) 22 23 #define GENIE_BINARY_CMD_TRANSPARENT_ERR (0x80) 24 25 #define GENIE_BINARY_CMD_UNKNOW_ERR (0xFF) 26 27 typedef enum _genie_control_cmd 28 { 29 GENIE_CTL_MESH_ADV = 0x01, 30 GENIE_CTL_CLEAR_PROV_INFO = 0x02, 31 GENIE_CTL_DEVIE_INFO_AND_EVENT = 0x03, //This is device update info 32 GENIE_CTL_TEST_MODE = 0x04, 33 GENIE_CTL_DEVICE_INFO = 0x05, //This is MCU command 34 GENIE_CTL_REBOOT_DEVICE = 0x06, 35 GENIE_CTL_UPDATE_GROUP_ADDR = 0x07, 36 GENIE_CTL_UPDATE_GROUP_ADDR_RESPONSE = 0x08, 37 GENIE_CTL_GET_GROUP_ADDR = 0x09, 38 GENIE_CTL_GET_GOURP_ADDR_RESPONSE = 0x0A, 39 GENIE_CTL_FACTORY_TEST = 0x0B, 40 GENIE_CTL_SWITCH_DEBUG = 0x0C 41 } genie_control_cmd; 42 43 extern int genie_bin_cmd_handle_event(genie_event_e event, void *p_arg); 44 extern void genie_bin_cmds_send_data_to_mcu(uint8_t *p_data, uint8_t len); 45 #endif 46