1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 #include "common_def.h"
22 #include "mac_sch_interface.h"
26 * @brief Timer Expiry handler.
30 * Function : schTmrExpiry
32 * This is a callback function used as an input parameter to cmPrcTmr()
33 * to check expiry of any timer. In this function, we are only concerned
34 * about tmrEvnt=Bind timer.
36 * @param[in] PTR cb, Entry for which Timer expired
37 * @param[in] S16 tmrEvnt, the Timer Event
41 uint8_t schTmrExpiry(PTR cb, uint8_t tmrEvnt)
43 /* TODO : Handling of any timer event expiry */
48 * @brief Scheduler instance timer call back function registered with system services.
52 * Function : schActvTmr
54 * This function is invoked for every timer activation
55 * period expiry. Note that SS_MT_TMR flag needs to be enabled for this
56 * as isntId is needed.As part of SRegTmr call for scheduler instance
57 * SS_MT_TMR flag needs to be enabled and schActvTmr needs to be given as
63 short int schActvTmr(Ent ent,Inst inst)
65 Inst schInst = (inst - SCH_INST_START);
67 /* Check if any timer in the scheduler instance has expired */
68 cmPrcTmr(&schCb[schInst].tmrTqCp,
69 schCb[schInst].tmrTq, (PFV) schTmrExpiry);
73 } /* end of schActvTmr */
75 /**********************************************************************
78 **********************************************************************/