72 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
		
		
			
		
	
	
			72 lines
		
	
	
		
			2.3 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 RF_BEACON_FRAME_H
							 | 
						||
| 
								 | 
							
								#define RF_BEACON_FRAME_H
							 | 
						||
| 
								 | 
							
								#include "plc_fr.h"
							 | 
						||
| 
								 | 
							
								#include "os_types.h"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include "plc_beacon.h"
							 | 
						||
| 
								 | 
							
								#include "iot_pkt_api.h"
							 | 
						||
| 
								 | 
							
								#include "plc_utils.h"
							 | 
						||
| 
								 | 
							
								#include "iot_utils_api.h"
							 | 
						||
| 
								 | 
							
								#include "mac_vdev.h"
							 | 
						||
| 
								 | 
							
								#include "mac_bcm_api.h"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifdef __cplusplus
							 | 
						||
| 
								 | 
							
								extern "C" {
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#if HPLC_RF_DEV_SUPPORT
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * @brief mac_rf_assemble_and_send_bcn     - mac rf assemble and send beacon.
							 | 
						||
| 
								 | 
							
								 * @param proto:                           - protocal, sg/spg.
							 | 
						||
| 
								 | 
							
								 * @param vdev:                            - the point of vdev.
							 | 
						||
| 
								 | 
							
								 * @param is_std_tx:                       - is standard beacon tx.
							 | 
						||
| 
								 | 
							
								 * @param is_csma_tx:                      - is csma tx or tdma tx.
							 | 
						||
| 
								 | 
							
								 * @return ret:                            - success or not.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_rf_assemble_and_send_bcn(uint32_t proto, mac_vdev_t *vdev,
							 | 
						||
| 
								 | 
							
								    uint8_t is_std_tx, uint8_t is_csma_tx);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * @brief mac_rf_beacon_init               - mac rf beacon init.
							 | 
						||
| 
								 | 
							
								 * @param mac_beacon:                      - the pointer of mac beacon.
							 | 
						||
| 
								 | 
							
								 * @return ret:                            - success or not.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t mac_rf_beacon_init(mac_beacon_ctx_t *mac_beacon);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#else /* HPLC_RF_DEV_SUPPORT */
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#define mac_rf_assemble_and_send_bcn(proto, vdev, is_std_tx, is_csma_tx) \
							 | 
						||
| 
								 | 
							
								    ERR_NOSUPP; \
							 | 
						||
| 
								 | 
							
								    do { \
							 | 
						||
| 
								 | 
							
								        (void)proto;(void)vdev;(void)is_std_tx;(void)is_csma_tx; \
							 | 
						||
| 
								 | 
							
								    } while(0)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#define mac_rf_beacon_init(mac_beacon)    ERR_NOSUPP; \
							 | 
						||
| 
								 | 
							
								    do { \
							 | 
						||
| 
								 | 
							
								        (void)mac_beacon; \
							 | 
						||
| 
								 | 
							
								    } while(0)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#endif /* HPLC_RF_DEV_SUPPORT */
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifdef __cplusplus
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#endif
							 |