106 lines
3.6 KiB
C
106 lines
3.6 KiB
C
/****************************************************************************
|
|
|
|
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
|
|
|
|
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
|
|
be copied by any method or incorporated into another program without
|
|
the express written consent of Aerospace C.Power. This Information or any portion
|
|
thereof remains the property of Aerospace C.Power. The Information contained herein
|
|
is believed to be accurate and Aerospace C.Power assumes no responsibility or
|
|
liability for its use in any way and conveys no license or title under
|
|
any patent or copyright and makes no representation or warranty that this
|
|
Information is free from patent or copyright infringement.
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef PROTO_SPG_CCO_VENDOR_H
|
|
#define PROTO_SPG_CCO_VENDOR_H
|
|
|
|
#include "os_types_api.h"
|
|
#include "iot_utils_api.h"
|
|
|
|
#include "proto_spg_cco.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* define module version length */
|
|
#define PROTO_SPG_EXT_MOD_VER_LEN (2)
|
|
/* define software version length */
|
|
#define PROTO_SPG_EXT_SW_VER_LEN (4)
|
|
/* define chip version length */
|
|
#define PROTO_SPG_EXT_CHIP_VER_LEN (4)
|
|
|
|
#pragma pack(push) /* save the pack status */
|
|
#pragma pack(1) /* 1 byte align */
|
|
|
|
typedef struct _spg_afnf0_fne0_hw_info {
|
|
/* vendor id. ASCII format. */
|
|
uint16_t vendor_id;
|
|
/* chip code. ASCII format. */
|
|
uint16_t chip_code;
|
|
/* module version, use BCD code to represent */
|
|
uint8_t module_ver[PROTO_SPG_EXT_MOD_VER_LEN];
|
|
/* module version date, use BCD code to represent */
|
|
uint8_t module_ver_day;
|
|
uint8_t module_ver_month;
|
|
uint8_t module_ver_year;
|
|
/* external software version, use ASCII code to represent */
|
|
uint8_t sw_ver[PROTO_SPG_EXT_SW_VER_LEN];
|
|
/* software version date, use BCD code to represent */
|
|
uint8_t sw_day;
|
|
uint8_t sw_month;
|
|
uint8_t sw_year;
|
|
/* chip version, use ASCII code to represent */
|
|
uint8_t chip_ver[PROTO_SPG_EXT_CHIP_VER_LEN];
|
|
/* chip version date, use BCD code to represent */
|
|
uint8_t chip_ver_day;
|
|
uint8_t chip_ver_month;
|
|
uint8_t chip_ver_year;
|
|
/* module mac address, big endian */
|
|
uint8_t dev_mac_addr[IOT_MAC_ADDR_LEN];
|
|
/* internal software version */
|
|
uint32_t build_sw_ver;
|
|
} spg_afnf0_fne0_hw_info_t;
|
|
|
|
/* query hardware version */
|
|
typedef struct _spg_afnf0_fne1_hw_version_ul {
|
|
/* hardware version */
|
|
uint32_t hw_ver;
|
|
} spg_afnf0_fne1_hw_version_ul_t;
|
|
|
|
/* command to query nodes' mac and version information */
|
|
typedef struct _spg_afnf0_fne2_query_node_info_dl {
|
|
/* query start index - 0 is cco, others station */
|
|
uint16_t start_index;
|
|
/* query node count */
|
|
uint8_t count;
|
|
} spg_afnf0_fne2_query_node_info_dl_t;
|
|
|
|
/* node information */
|
|
typedef struct _spg_afnf0_fne2_node_info {
|
|
spg_node_info_ver_info_t info;
|
|
/* internal software version */
|
|
uint32_t build_sw_ver;
|
|
} spg_afnf0_fne2_node_info_t;
|
|
|
|
/* data to response for requesting nodes' information. */
|
|
typedef struct _spg_afnf0_fne2_query_node_info_ul {
|
|
/* total node count */
|
|
uint16_t total_count;
|
|
/* rsp node count */
|
|
uint8_t rsp_cnt;
|
|
/* node information */
|
|
spg_afnf0_fne2_node_info_t node_info[0];
|
|
} spg_afnf0_fne2_query_node_info_ul_t;
|
|
|
|
#pragma pack(pop) /* restore the pack status */
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* PROTO_SPG_CCO_VENDOR_H */
|