57 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
		
		
			
		
	
	
			57 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 _MAC_HW_TSFM_API_H_
							 | 
						||
| 
								 | 
							
								#define _MAC_HW_TSFM_API_H_
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include "os_types.h"
							 | 
						||
| 
								 | 
							
								#include "plc_utils.h"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifdef __cplusplus
							 | 
						||
| 
								 | 
							
								extern "C" {
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/* hardware transmitter data max byte length */
							 | 
						||
| 
								 | 
							
								#define MAC_HW_TSFM_DATA_BYTE_MAX       4
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef struct _mac_hw_tsfm_tx_info {
							 | 
						||
| 
								 | 
							
								    /* data valid bit length */
							 | 
						||
| 
								 | 
							
								    uint32_t bit_len    : 8,
							 | 
						||
| 
								 | 
							
								    /* reserved */
							 | 
						||
| 
								 | 
							
								        rsvd            : 24;
							 | 
						||
| 
								 | 
							
								    /* encode frequency tone num, each tone is 75MHz/(1 << 14) */
							 | 
						||
| 
								 | 
							
								    uint32_t freq_tone_num;
							 | 
						||
| 
								 | 
							
								    /* encode source data */
							 | 
						||
| 
								 | 
							
								    uint8_t data[MAC_HW_TSFM_DATA_BYTE_MAX];
							 | 
						||
| 
								 | 
							
								} mac_hw_tsfm_tx_info_t;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/*
							 | 
						||
| 
								 | 
							
								 * @brief           mac hardware tsfm data
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * @param pdev_id:  the pdev on which data will be sent.
							 | 
						||
| 
								 | 
							
								 * @param vdev_id:  the vdev on which data will be sent.
							 | 
						||
| 
								 | 
							
								 * @param tx_info:  tx config information
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * @return          send duration time, unit: 1ms
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_hw_tsfm_send(pdevid_t pdev_id, vdevid_t vdev_id,
							 | 
						||
| 
								 | 
							
								    mac_hw_tsfm_tx_info_t *tx_info);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifdef __cplusplus
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#endif
							 |