60 lines
2.1 KiB
C
60 lines
2.1 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 PLC_DATA_API_H
|
|
#define PLC_DATA_API_H
|
|
|
|
#include "os_types.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
* plc_send_msdu() - For HLE to send data to MAC layer
|
|
*
|
|
* @msdu_buf: the buffer containing the msdu data to be sent.
|
|
* @msdu_len: length of the msdu data to be sent.
|
|
* @msdu_type: type of the msdu.
|
|
* @link_id: link_id on whihc data to be sent.
|
|
* @org_src_mac: original source mac address.
|
|
* @org_dest_mac: original destination mac address.
|
|
*
|
|
* return:
|
|
* 0 - successfully sending msdu.
|
|
* otherwise - failed cases.
|
|
*/
|
|
uint32_t plc_send_msdu(void* msdu_buf, uint16_t msdu_len, uint8_t msdu_type,
|
|
uint8_t link_id, uint8_t* org_src_mac, uint8_t *org_dest_mac);
|
|
|
|
/*
|
|
* callback method prototype for HLE to receive data from mac layer
|
|
*
|
|
* @msdu_buf: the buffer containing the msdu data to be sent.
|
|
* @msdu_len: length of the msdu data received.
|
|
* @org_src_mac: original source mac address.
|
|
* @org_dest_mac: original destination mac address.
|
|
*
|
|
*/
|
|
typedef void (*plc_recv_msdu_func_t)(void* msdu_buf, uint32_t msdu_len,
|
|
uint8_t* org_src_mac, uint8_t* org_dest_mac);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* PLC_DATA_API_H */
|