62 lines
2.0 KiB
C
62 lines
2.0 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_HW_TSFM_H
|
|
#define PROTO_HW_TSFM_H
|
|
|
|
#include "os_types_api.h"
|
|
#include "iot_utils_api.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* hardware transformer data id */
|
|
#define PROTO_HW_TSFM_ID_TSFM_ADDR 1
|
|
#define PROTO_HW_TSFM_ID_TOPO_SN 2
|
|
#define PROTO_HW_TSFM_ID_TOPO_TEST 3
|
|
#define PROTO_HW_TSFM_ID_TSFM_ADDR_A 4
|
|
#define PROTO_HW_TSFM_ID_TSFM_ADDR_B 5
|
|
#define PROTO_HW_TSFM_ID_TSFM_ADDR_C 6
|
|
#define PROTO_HW_TSFM_ID_TOPO_RAW 7
|
|
|
|
#pragma pack(push) /* save the pack status */
|
|
#pragma pack(1) /* 1 byte align */
|
|
|
|
typedef struct _proto_hw_tsfm_hdr {
|
|
/* data id, see PROTO_HW_TSFM_ID_XXX */
|
|
uint8_t data_id:4,
|
|
/* data length */
|
|
data_len:4;
|
|
/* data */
|
|
uint8_t data[0];
|
|
} proto_hw_tsfm_hdr_t;
|
|
|
|
typedef struct _proto_hw_tsfm_addr {
|
|
uint8_t mac_addr[IOT_MAC_ADDR_LEN];
|
|
} proto_hw_tsfm_addr_t;
|
|
|
|
typedef struct _proto_hw_tsfm_topo_sn {
|
|
uint16_t sn;
|
|
} proto_hw_tsfm_topo_sn_t;
|
|
|
|
#pragma pack(pop) /* restore the pack status */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* PROTO_HW_TSFM_H */
|