92 lines
3.3 KiB
C
Executable File
92 lines
3.3 KiB
C
Executable File
/****************************************************************************
|
|
|
|
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_CHECK_SPUR_CCO_H__
|
|
#define __MAC_CHECK_SPUR_CCO_H__
|
|
|
|
/* os shim includes */
|
|
#include "os_types.h"
|
|
#include "os_timer_api.h"
|
|
#include "mac_sched_hw.h"
|
|
#include "mac_check_spur.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* mac check spur period.
|
|
* mac beacon period min 2s to max 10s.
|
|
* so maybe several period or one period to check spur operation.
|
|
* here every 4min to check spur once.
|
|
* 10s = 10*1000ms = 10000ms
|
|
*/
|
|
#define MAC_CHECK_SPUR_PD_MS 10000
|
|
|
|
/**
|
|
*@brief mac_cco_check_spur_timer_handle mac check spur cco timer handle .
|
|
*@param timer_id timerid.
|
|
*@param arg point.
|
|
*@exception [none.]
|
|
*@return [void]
|
|
*/
|
|
void mac_cco_check_spur_timer_handle(timer_id_t timer_id, void * arg);
|
|
|
|
/**
|
|
*@brief mac_cco_check_spur_start_timer mac check spur timer start.
|
|
*@param spur_ctxt point to mac_check_cpur_ctxt.
|
|
*@param status status for check spur.
|
|
*@param time_ms time ms for timer trigger time.
|
|
*@exception [none.]
|
|
*@return [0]
|
|
*/
|
|
uint32_t mac_cco_check_spur_start_timer(mac_check_spur_ctxt_t *spur_ctxt, \
|
|
uint32_t status, uint32_t time_ms);
|
|
|
|
/**
|
|
*@brief mac_cco_check_spur_get_intvl mac get pb interval
|
|
*@param spur_ctxt point to mac_check_cpur_ctxt.
|
|
*@param new_start_ntb new start ntb
|
|
*@exception [none.]
|
|
*@return [new_start_ntb]
|
|
*/
|
|
uint64_t mac_cco_check_spur_get_intvl(mac_check_spur_ctxt_t *spur_ctxt, \
|
|
uint64_t new_start_ntb);
|
|
|
|
|
|
/**
|
|
*@brief mac_cco_check_spur_start mac cco start check spur.
|
|
*@param spur_ctxt point to mac_check_cpur_ctxt.
|
|
*@exception [none.]
|
|
*@return [interval ntb]
|
|
*/
|
|
uint32_t mac_cco_check_spur_start(mac_check_spur_ctxt_t *spur_ctxt);
|
|
|
|
/**
|
|
*@brief mac_cco_check_spur_start_alert
|
|
* mac cco start check spur timer fire on bcn alert,
|
|
* it would do spur check immediately after at the bcn period end.
|
|
*@param spur_ctxt point to mac_check_cpur_ctxt.
|
|
*@exception [none.]
|
|
*@return [0]
|
|
*/
|
|
uint32_t mac_cco_check_spur_start_alert(mac_check_spur_ctxt_t *spur_ctxt);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|