forked from gatsby/df_datalink
feat: 增加时隙表个数, 用于支持上位机配置切换
This commit is contained in:
@@ -890,8 +890,8 @@ int32_t Linklayer_EventHandler(L2_INST *instPtr, const L2_EVENT *l2Event)
|
||||
else if (instPtr->nextState == L2_NORMAL_STATE)
|
||||
{
|
||||
UpdateMainSate(instPtr, L2_NORMAL_STATE);
|
||||
instPtr->rtneConfig.rtneTable = normalTable;
|
||||
instPtr->rtneConfig.rtnePrd = ARRAY_SIZE(normalTable);
|
||||
instPtr->rtneConfig.rtneTable = normalTable[L2_DEFAULT_NORMAL_TABLE];
|
||||
instPtr->rtneConfig.rtnePrd = ARRAY_SIZE(normalTable[L2_DEFAULT_NORMAL_TABLE]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -129,7 +129,7 @@ typedef struct
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
extern L2_RTNE_TABLE_ENTRY *initTable[L2_INIT_RTNE_PERIOD];
|
||||
extern L2_RTNE_TABLE_ENTRY *normalTable[L2_NORMAL_RTNE_PERIOD];
|
||||
extern L2_RTNE_TABLE_ENTRY *normalTable[L2_NORMAL_RTNE_PERIOD][L2_NORMAL_RTNE_NUM];
|
||||
/************************** Function Prototypes ******************************/
|
||||
/**
|
||||
* @defgroup LinkLayer_Main
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
// Routine configure
|
||||
#define L2_INIT_RTNE_PERIOD 1
|
||||
#define L2_NORMAL_RTNE_PERIOD 1
|
||||
#define L2_NORMAL_RTNE_NUM 3
|
||||
#define L2_DEFAULT_NORMAL_TABLE 0
|
||||
|
||||
// Common slot number definition
|
||||
#define L2_SLOTNO_NONE 0
|
||||
|
||||
@@ -305,9 +305,9 @@ L2_RTNE_TABLE_ENTRY *initTable[L2_INIT_RTNE_PERIOD] =
|
||||
innerScanSubT
|
||||
};
|
||||
|
||||
L2_RTNE_TABLE_ENTRY *normalTable[L2_NORMAL_RTNE_PERIOD] =
|
||||
L2_RTNE_TABLE_ENTRY *normalTable[L2_NORMAL_RTNE_NUM][L2_NORMAL_RTNE_PERIOD] =
|
||||
{
|
||||
innerScanSubT
|
||||
innerScanSubT, innerScanSubT, innerScanSubT
|
||||
};
|
||||
|
||||
/** @} RoutineTable*/
|
||||
|
||||
Reference in New Issue
Block a user