60 lines
1.8 KiB
C
60 lines
1.8 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 _APP_1901_H_
|
|
#define _APP_1901_H_
|
|
|
|
#include "app_types.h"
|
|
#include "app_main.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#if SUPPORT_IEEE_1901
|
|
|
|
#define HI_DMS_CHL_MAC_PORT_APP 0x11
|
|
#define HI_DMS_CHL_TX_CTRL_FORCE 0x08 /* Forcible sending, regardless*/
|
|
|
|
#pragma pack(push) // save the pack status
|
|
#pragma pack(1) // 1 byte align
|
|
|
|
typedef struct {
|
|
/* port_num */
|
|
uint8_t port_num;
|
|
/* Frame ID, determined by the user */
|
|
uint16_t id;
|
|
/* Control word. For details about the value, see HI_DMS_CHL_TX_CTRL_XXX. */
|
|
uint8_t ctrl;
|
|
/* CRC16-CCITT low 8bit*/
|
|
uint8_t crc_8_low;
|
|
/* CRC16-CCITT high 8bit*/
|
|
uint8_t crc_8_high;
|
|
/* datalen*/
|
|
uint16_t data_length;
|
|
uint8_t data[0];
|
|
} app_plc_frame_data_hi;
|
|
|
|
#pragma pack(pop)
|
|
|
|
void package_1901_frame(uint8_t *msdu_ptr,iot_pkt_t *pkt);
|
|
#endif
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _APP_1901_H_ */
|
|
|