Skip to content

Commit

Permalink
update to ver 4.14
Browse files Browse the repository at this point in the history
  • Loading branch information
PWHSU0 committed Sep 3, 2024
1 parent 4e21afc commit afc4fd8
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 77 deletions.
Binary file modified Documents/RH_ISP_Programming_Tool_EN_RevO.OO.docx
Binary file not shown.
Binary file modified Documents/UM_ISP_Programming_Tool_RevX.XX.doc
Binary file not shown.
2 changes: 2 additions & 0 deletions NuvoISP/DataBase/IGetChipInformation.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ enum eAllChipSeries : DWORD
N584_SERIES = 0x90000C,
N589L_SERIES = 0x90000D,
NSP2_SERIES = 0x90000E,
SPEECH_NSR_SERIES = 0x90000F,
UNKNOWN_SERIES = 0xFFFFFF,
};

Expand Down Expand Up @@ -104,6 +105,7 @@ const sSeriesName g_SeriesToName[] =
{N589E_SERIES,_T("N589E")},
{N584_SERIES,_T("N584")},
{N589L_SERIES,_T("N589L")},
{SPEECH_NSR_SERIES,_T("NSR")},
};

typedef struct sChipInfo
Expand Down
50 changes: 1 addition & 49 deletions NuvoISP/DataBase/NuDataBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
extern struct CPartNumID g_PartNumIDs[];

CChipConfigInfo gsChipCfgInfo;
sFindChipInfo FindChipInfo;
struct sChipInfo gNuVoiceChip;

/**
Expand Down Expand Up @@ -45,46 +44,6 @@ bool GetInfo_NuVoice(DWORD dwChipID, DWORD *pConfig)

return ret;
}

bool FindInfo_NuVoice(DWORD dwChipID, DWORD* pConfig, DWORD *m_uUCID)
{
bool ret = false;
memset(&gNuVoiceChip, 0, sizeof(sChipInfo));
memset(&FindChipInfo, 0, sizeof(sFindChipInfo));

FindChipInfo.dwChipID = dwChipID;
FindChipInfo.dwCfgNum = 2;
FindChipInfo.dwConfig[0] = pConfig[0];
FindChipInfo.dwConfig[1] = pConfig[1];
FindChipInfo.dwChipUCID[0] = m_uUCID[0];
FindChipInfo.dwChipUCID[1] = m_uUCID[1];
FindChipInfo.dwChipUCID[2] = m_uUCID[2];
FindChipInfo.dwChipUCID[3] = m_uUCID[3];
HMODULE hDll = ::LoadLibrary(_T("GetChipInformation.dll"));

if (hDll != NULL) {
CREATE_CHIPINFO_MANAGER pCreateChipInfoManager = (CREATE_CHIPINFO_MANAGER)::GetProcAddress(hDll, "CreateChipInfoManager");

if (pCreateChipInfoManager) {
I_ChipInfoManager* pChipInfoManager = NULL;

if (pCreateChipInfoManager(&pChipInfoManager) == TRUE) {
eChipInfoError err = pChipInfoManager->GetChipInfoByFindInfo(FindChipInfo, gNuVoiceChip, 0);

if (err == ECE_NO_ERROR) {
ret = true;
}

pChipInfoManager->ReleaseDLL();
}
}

FreeLibrary(hDll);
}

return ret;
}

/**
* @brief Check if any given uID is available in g_PartNumIDs (ref: PartNumID.cpp).
* @param[in] uID The PDID read from the target device.
Expand Down Expand Up @@ -208,7 +167,7 @@ static bool HasNoDynamicInfo()
return false;
}

bool GetChipDynamicInfo(unsigned int uID, unsigned int uConfig0, unsigned int uConfig1, unsigned int m_uUCID[])
bool GetChipDynamicInfo(unsigned int uID, unsigned int uConfig0, unsigned int uConfig1)
{
if (gsChipCfgInfo.uID == uID) {
if ((gsChipCfgInfo.uConfig0 == uConfig0) && (gsChipCfgInfo.uConfig1 == uConfig1)) {
Expand Down Expand Up @@ -270,15 +229,8 @@ bool GetChipDynamicInfo(unsigned int uID, unsigned int uConfig0, unsigned int uC
DWORD pConfig[4];
pConfig[0] = uConfig0;
pConfig[1] = uConfig1;
DWORD UCID[4];
UCID[0] = m_uUCID[0];
UCID[1] = m_uUCID[1];
UCID[2] = m_uUCID[2];
UCID[3] = m_uUCID[3];
if (GetInfo_NuVoice(uID, pConfig)) {
uProductLine = 3; // Audio
memcpy(gsChipCfgInfo.uUCID, m_uUCID, 4);
FindInfo_NuVoice(uID, pConfig, UCID);
gsChipCfgInfo.uID = uID;
gsChipCfgInfo.uConfig0 = uConfig0;
gsChipCfgInfo.uConfig1 = uConfig1;
Expand Down
2 changes: 1 addition & 1 deletion NuvoISP/DataBase/NuDataBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct CChipConfigInfo {
};

extern CChipConfigInfo gsChipCfgInfo;
bool GetChipDynamicInfo(unsigned int uID, unsigned int uConfig0, unsigned int uConfig1, unsigned int m_uUCID[]);
bool GetChipDynamicInfo(unsigned int uID, unsigned int uConfig0, unsigned int uConfig1);
bool GetInfo_NuVoice(DWORD dwChipID, DWORD* pConfig);

extern std::vector<CPartNumID> g_NuMicroChipSeries;
Expand Down
Binary file modified NuvoISP/GetChipInformation.dll
Binary file not shown.
17 changes: 0 additions & 17 deletions NuvoISP/ISPLdCMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,23 +375,6 @@ unsigned char ISPLdCMD::GetVersion()
return ucVersion;
}

void ISPLdCMD::GetUCID(unsigned int config[])
{
unsigned int UCID[4] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF};
if (m_uInterface == INTF_CAN) {
memcpy(config, UCID, 4);
return ; // not support
}

WriteFile(
CMD_GET_UCID,
NULL,
0,
USBCMD_TIMEOUT);
ReadFile((char*)config, 16, USBCMD_TIMEOUT, TRUE);
return ;
}

unsigned long ISPLdCMD::GetDeviceID()
{
if (m_uInterface == INTF_CAN) {
Expand Down
2 changes: 0 additions & 2 deletions NuvoISP/ISPLdCMD.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class ISPLdCMD
CMD_ERASE_ALL = 0x000000A3,
CMD_READ_CONFIG = 0x000000A2,
CMD_GET_DEVICEID = 0x000000B1,
CMD_GET_UCID = 0x000000B2,
CMD_RUN_APROM = 0x000000AB,
CMD_RUN_LDROM = 0x000000AC,
CMD_RESET = 0x000000AD,
Expand All @@ -113,7 +112,6 @@ class ISPLdCMD
void SyncPackno();
unsigned char GetVersion();
unsigned long GetDeviceID();
void GetUCID(unsigned int config[]);
void ReadConfig(unsigned int config[]);
void UpdateConfig(unsigned int config[], unsigned int response[]);
void UpdateAPROM(unsigned long start_addr,
Expand Down
8 changes: 1 addition & 7 deletions NuvoISP/ISPProc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,6 @@ void CISPProc::Thread_CheckDeviceConnect()
m_ulDeviceID = m_ISPLdDev.GetDeviceID();
m_ISPLdDev.ReadConfig(m_CONFIG);
memcpy(m_CONFIG_User, m_CONFIG, sizeof(m_CONFIG));
DWORD pConfig[4];
pConfig[0] = m_CONFIG_User[0];
pConfig[1] = m_CONFIG_User[1];
if (GetInfo_NuVoice(m_ulDeviceID, pConfig)) {
m_ISPLdDev.GetUCID(m_uUCID);
}
m_bSupport_SPI = m_ISPLdDev.bSupport_SPI;
m_eProcSts = EPS_OK;

Expand Down Expand Up @@ -506,7 +500,7 @@ void CISPProc::UnlockGUI()

bool CISPProc::UpdateSizeInfo(unsigned int uID, unsigned int uConfig0, unsigned int uConfig1)
{
if (GetChipDynamicInfo(uID, uConfig0, uConfig1, m_uUCID)) {
if (GetChipDynamicInfo(uID, uConfig0, uConfig1)) {
m_uNVM_Addr = gsChipCfgInfo.uNVM_Addr;
m_uNVM_Size = gsChipCfgInfo.uNVM_Size;
m_uAPROM_Size = gsChipCfgInfo.uAPROM_Size;
Expand Down
1 change: 0 additions & 1 deletion NuvoISP/ISPProc.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ class CISPProc
unsigned int m_ulDeviceID;
unsigned int m_CONFIG[14];
unsigned int m_CONFIG_User[14];
unsigned int m_uUCID[4];

unsigned int m_uAPROM_Addr;
unsigned int m_uAPROM_Size;
Expand Down

0 comments on commit afc4fd8

Please sign in to comment.