enhanced code inherence

This commit is contained in:
Gatsby Van
2024-03-02 13:14:17 +08:00
parent 633f6dff37
commit 22417853dd
3 changed files with 6 additions and 6 deletions
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <math.h>
#include "phy_layer.h"
#include "phy_reg.h"
#include "util.h"
#include "error.h"
#ifndef EMULATION
@@ -481,13 +482,13 @@ int32_t Phy_InstInit(PHY_INST **instPtr, PHY_CONFIG *phyConfig)
goto init_error;
}
memccpy(antConfigBram.config.MemBaseAddress,
memcpy((void*)antConfigBram.Config.MemBaseAddress,
antSubnrrwPattern, sizeof(antSubnrrwPattern));
uint32_t phyMainCtrl = PhyRead(*instPtr, PHY_MAIN_CTRL);
phyMainCtrl &= ~PHY_MAIN_CTRL_NSCAN_MASK;
phyMainCtrl |= PHY_MAIN_CTRL_NSCAN_MASK &
(L1_NUM_ANT_SUBNRRW_PATTERN << PHY_MAIN_CTRL_NSCAN_SHIFT);
PhyWrite(*instPtr, phyMainCtrl);
PhyWrite(*instPtr, PHY_MAIN_CTRL, phyMainCtrl);
}
/* Initialize the XAdc driver. */
@@ -26,7 +26,6 @@
/***************************** Include Files *********************************/
#include <stdint.h>
#include "phy_reg.h"
#include "common.h"
#ifndef EMULATION
#include "xbram.h"
@@ -26,8 +26,8 @@
#include "util.h"
/***************** Macros (Inline Functions) Definitions *********************/
#define PhyRead(instPtr, addr) IO_In32(instPtr->phyCofig.baseAddr + addr)
#define PhyWrite(instPtr, addr, value) IO_Out32(instPtr->phyCofig.baseAddr + addr, value)
#define PhyRead(instPtr, addr) IO_In32((instPtr)->phyCofig.baseAddr + addr)
#define PhyWrite(instPtr, addr, value) IO_Out32((instPtr)->phyCofig.baseAddr + addr, value)
/************************** Constant Definitions *****************************/
/**