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 #ifndef _LWR_MAC_FSM_H_
20 #define _LWR_MAC_FSM_H_
23 #define FAPI_UINT_16 2
24 #define FAPI_UINT_32 4
25 #define INVALID_VALUE -1
27 #define CORESET_TYPE0 0
28 #define CORESET_TYPE1 1
29 #define CORESET_TYPE2 2
30 #define CORESET_TYPE3 3
33 #define WLS_MEM_FREE_PRD 10 /* Free memory after 10 slot ind */
36 #define FILL_FAPI_LIST_ELEM(_currElem, _nextElem, _msgType, _numMsgInBlock, _alignOffset)\
38 _currElem->msg_type = (uint8_t) _msgType;\
39 _currElem->num_message_in_block = _numMsgInBlock;\
40 _currElem->align_offset = (uint16_t) _alignOffset;\
41 _currElem->msg_len = _numMsgInBlock * _alignOffset;\
42 _currElem->p_next = _nextElem;\
43 _currElem->p_tx_data_elm_list = NULL;\
44 _currElem->time_stamp = 0;\
54 uint8_t lwr_mac_procInvalidEvt(void *msg);
55 uint8_t lwr_mac_procParamReqEvt(void *msg);
56 uint8_t lwr_mac_procParamRspEvt(void *msg);
57 uint8_t lwr_mac_procConfigReqEvt(void *msg);
58 uint8_t lwr_mac_procConfigRspEvt(void *msg);
59 uint8_t lwr_mac_procStartReqEvt(void *msg);
60 void sendToLowerMac(uint16_t, uint32_t, void *);
61 void procPhyMessages(uint16_t msgType, uint32_t msgSize, void *msg);
62 uint16_t fillDlTtiReq(SlotTimingInfo currTimingInfo);
63 typedef uint8_t (*lwrMacFsmHdlr)(void *);
64 void lwrMacLayerInit(Region region, Pool pool);
68 /**********************************************************************
70 **********************************************************************/