Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22417853dd | ||
|
|
633f6dff37 |
@@ -406,7 +406,7 @@ int32_t L2_Scan_PktHandler(L2_INST *instPtr, uint8_t *msg)
|
|||||||
L2_FrameGetChunk(msg, L2_MSG_ADV_SRC_POSZ, L2_MSG_ADV_SRC_POSZ_LEN, &nodePos);
|
L2_FrameGetChunk(msg, L2_MSG_ADV_SRC_POSZ, L2_MSG_ADV_SRC_POSZ_LEN, &nodePos);
|
||||||
node->nodeInfo.pos.z = (double) nodePos;
|
node->nodeInfo.pos.z = (double) nodePos;
|
||||||
node->nodeInfo.beamNo = Phy_LastScanBeamNo(instPtr->config.phyInstPtr);
|
node->nodeInfo.beamNo = Phy_LastScanBeamNo(instPtr->config.phyInstPtr);
|
||||||
|
|
||||||
// log last scan beam number
|
// log last scan beam number
|
||||||
instPtr->log.scanBeamNo = node->nodeInfo.beamNo;
|
instPtr->log.scanBeamNo = node->nodeInfo.beamNo;
|
||||||
|
|
||||||
@@ -608,12 +608,12 @@ int32_t L2_Scan_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntry)
|
|||||||
if (rtneEntry->dst == L2_GetNodeId(instPtr) || rtneEntry->dst == L2_BROADCAST_ID)
|
if (rtneEntry->dst == L2_GetNodeId(instPtr) || rtneEntry->dst == L2_BROADCAST_ID)
|
||||||
{
|
{
|
||||||
torState = L2_TOR_RX;
|
torState = L2_TOR_RX;
|
||||||
commNode = L2_GetNodeById(rtneEntry->dst);
|
commNode = L2_GetNodeById(instPtr->nodeList, rtneEntry->dst);
|
||||||
}
|
}
|
||||||
else if (rtneEntry->src == L2_GetNodeId(instPtr) || rtneEntry->src == L2_BROADCAST_ID)
|
else if (rtneEntry->src == L2_GetNodeId(instPtr) || rtneEntry->src == L2_BROADCAST_ID)
|
||||||
{
|
{
|
||||||
torState = L2_TOR_TX;
|
torState = L2_TOR_TX;
|
||||||
commNode = L2_GetNodeById(rtneEntry->src);
|
commNode = L2_GetNodeById(instPtr->nodeList, rtneEntry->src);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -624,7 +624,7 @@ int32_t L2_Scan_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntry)
|
|||||||
instPtr->log.lastBeamWidth = PHY_ANT_BEAM_25;
|
instPtr->log.lastBeamWidth = PHY_ANT_BEAM_25;
|
||||||
if (commNode != NULL)
|
if (commNode != NULL)
|
||||||
{
|
{
|
||||||
Phy_SetBeamNo(commNode->nodeInfo.beamNo);
|
Phy_SetBeamNo(instPtr->config.phyInstPtr, commNode->nodeInfo.beamNo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -373,12 +373,12 @@ int32_t L2_Service_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntr
|
|||||||
if (rtneEntry->src == L2_GetNodeId(instPtr))
|
if (rtneEntry->src == L2_GetNodeId(instPtr))
|
||||||
{
|
{
|
||||||
torState = L2_TOR_TX;
|
torState = L2_TOR_TX;
|
||||||
commNode = L2_GetNodeById(rtneEntry->src);
|
commNode = L2_GetNodeById(instPtr->nodeList, rtneEntry->src);
|
||||||
}
|
}
|
||||||
else if (rtneEntry->dst == L2_GetNodeId(instPtr))
|
else if (rtneEntry->dst == L2_GetNodeId(instPtr))
|
||||||
{
|
{
|
||||||
torState = L2_TOR_RX;
|
torState = L2_TOR_RX;
|
||||||
commNode = L2_GetNodeById(rtneEntry->src);
|
commNode = L2_GetNodeById(instPtr->nodeList, rtneEntry->src);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "phy_layer.h"
|
#include "phy_layer.h"
|
||||||
|
#include "phy_reg.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#ifndef EMULATION
|
#ifndef EMULATION
|
||||||
@@ -481,13 +482,13 @@ int32_t Phy_InstInit(PHY_INST **instPtr, PHY_CONFIG *phyConfig)
|
|||||||
goto init_error;
|
goto init_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
memccpy(antConfigBram.config.MemBaseAddress,
|
memcpy((void*)antConfigBram.Config.MemBaseAddress,
|
||||||
antSubnrrwPattern, sizeof(antSubnrrwPattern));
|
antSubnrrwPattern, sizeof(antSubnrrwPattern));
|
||||||
uint32_t phyMainCtrl = PhyRead(*instPtr, PHY_MAIN_CTRL);
|
uint32_t phyMainCtrl = PhyRead(*instPtr, PHY_MAIN_CTRL);
|
||||||
phyMainCtrl &= ~PHY_MAIN_CTRL_NSCAN_MASK;
|
phyMainCtrl &= ~PHY_MAIN_CTRL_NSCAN_MASK;
|
||||||
phyMainCtrl |= PHY_MAIN_CTRL_NSCAN_MASK &
|
phyMainCtrl |= PHY_MAIN_CTRL_NSCAN_MASK &
|
||||||
(L1_NUM_ANT_SUBNRRW_PATTERN << PHY_MAIN_CTRL_NSCAN_SHIFT);
|
(L1_NUM_ANT_SUBNRRW_PATTERN << PHY_MAIN_CTRL_NSCAN_SHIFT);
|
||||||
PhyWrite(*instPtr, phyMainCtrl);
|
PhyWrite(*instPtr, PHY_MAIN_CTRL, phyMainCtrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize the XAdc driver. */
|
/* Initialize the XAdc driver. */
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
/***************************** Include Files *********************************/
|
/***************************** Include Files *********************************/
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "phy_reg.h"
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#ifndef EMULATION
|
#ifndef EMULATION
|
||||||
#include "xbram.h"
|
#include "xbram.h"
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
/***************** Macros (Inline Functions) Definitions *********************/
|
/***************** Macros (Inline Functions) Definitions *********************/
|
||||||
#define PhyRead(instPtr, addr) IO_In32(instPtr->phyCofig.baseAddr + addr)
|
#define PhyRead(instPtr, addr) IO_In32((instPtr)->phyCofig.baseAddr + addr)
|
||||||
#define PhyWrite(instPtr, addr, value) IO_Out32(instPtr->phyCofig.baseAddr + addr, value)
|
#define PhyWrite(instPtr, addr, value) IO_Out32((instPtr)->phyCofig.baseAddr + addr, value)
|
||||||
|
|
||||||
/************************** Constant Definitions *****************************/
|
/************************** Constant Definitions *****************************/
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user