/* * ne_sweeper.h -- provide iot-system device layer of yanxuan sweeper operation interface. * * * ORIGINAL AUTHOR: * * Copyright (c) 2018 Netease Corporation */ #ifndef NE_SWEEPER_H #define NE_SWEEPER_H #include "c_types.h" #pragma pack (1) typedef struct{ uint8 frame_header; uint8 msg_len; uint8 device_type; uint8 frame_crc; uint8 reserved1; uint8 reserved2; uint8 msg_sn; uint8 platform_version; uint8 protocal_version; uint8 msg_id; }yanxuan_sweeper_protocol_header_t; typedef struct{ uint8 frame_header[2]; uint8 msg_len[2]; uint8 device_type; uint8 data_type; uint8 frame_total; uint8 frame_current; uint8 reserved1; uint8 reserved2; uint8 reserved3; }yanxuan_sweeper_expand_protocol_header_t; #pragma pack () int32 yanxuan_sweeper_init(void *arg); int32 yanxuan_sweeper_deinit(void * arg); int32 yanxuan_sweeper_write(void *arg, uint8 *input, uint32 len); int32 yanxuan_sweeper_read(void *arg, uint8 **output, uint32 *len); int32 yanxuan_sweeper_split(void *arg, uint32 *offset, uint8 *input, uint32 len, uint8 *output, uint32 *out_len); int32 yanxuan_sweeper_process(void *arg, uint8 msgdir, uint8 *input, uint32 ilen, uint8 *output, uint32 max_len); #endif