It's worth noting that the interface provides "DownloadImage" and "DownloadMem" indicating a host to device firmware and memory transfer, and "UploadMem" indicating a device to host memory transfer.
In fact, DownloadMem maps directly to ADFUWrite, and UploadMem maps directly to ADFURead.
Here's the full provided interface:
int __cdecl Py_CallEntry(U32 uId, U32 uAddress)
int __cdecl Py_CloseDevice(U32 uId)
int __cdecl Py_DetachDevice(U32 uId)
int __cdecl Py_DoUserComm(U32 uId, unsigned __int8 *USBC, unsigned __int8 *buffer)
int __cdecl Py_DownloadImage(U32 uId, U32 uType, U32 uSubType, U32 uPageSize, U32 uDiskCap, U32 uAddr, int nStartPer, int nEndPer)
int __cdecl Py_DownloadMem(U32 uId, int nType, U32 uAddress, unsigned __int8 *buffer, U32 uLength)
int __cdecl Py_EjectDevice(U32 uId)
const char *__cdecl Py_ExtractScript(const char *szFirmware)
int __cdecl Py_GetConfigFile(char *szType, int nSubType, unsigned __int8 *buffer, int nOffset, int nLength)
int __cdecl Py_GetFileInImage(const char *szImage, const char *szFile, unsigned __int8 *buffer)
U32 __cdecl Py_GetFirmwareBin(unsigned __int8 *fwBin, char *tmpImg)
const char *__cdecl Py_GetFirmwareCfg(const char *szFirmware, const char *szKey)
int __cdecl Py_GetImageSize(U32 uId, U32 uType, U32 uSubType, U32 uPageSize, U32 uDiskCap)
int __cdecl Py_GetProductionConfig(const char *szType, U32 nSubType, unsigned __int8 *szCfgValue)
int __cdecl Py_GetStatus(U32 uId, unsigned __int8 *buffer)
int __cdecl Py_OpenDevice(U32 uId)
int __cdecl Py_OpenFirmware(const char *szFirmwareFile, unsigned __int8 *fwBin, char *szImageFile)
int __cdecl Py_PollReady(U32 uId)
int __cdecl Py_PyThreadExit(U32 uId, int nExitCode)
int __cdecl Py_ReOpenDevice(U32 uId, int nType, int uTimeout)
int __cdecl Py_ReadFileInFW(const char *szImage, const char *szFileName, U32 uOffset, U32 uToRead, unsigned __int8 *buffer, U32 uAlign)
int __cdecl Py_Recv(U32 uId, unsigned __int8 *usbc, unsigned __int8 *buffer, U32 uLength)
int __cdecl Py_Send(U32 uId, unsigned __int8 *usbc, unsigned __int8 *buffer, U32 uLength)
int __cdecl Py_SetCommTimeout(U32 uId, U32 uMS)
void __cdecl Py_SetLibPath(const char *path)
int __cdecl Py_SetProductionConfig(const char *szType, U32 nSubType, unsigned __int8 *szCfgValue)
int __cdecl Py_ShowMessage(int nType, U32 nSubType, const unsigned __int8 *buffer, int nLength)
int __cdecl Py_SwitchFW(U32 uId, U32 uAddress)
int __cdecl Py_SwitchToAdfu(U32 uId, int uTimeout)
int __cdecl Py_UpdateCapacity(U32 uId, U32 uCapacity)
int __cdecl Py_UpdateProgress(U32 uId, int nPercent)
int __cdecl Py_UpdateStatus(U32 uId, const char *buffer)
int __cdecl Py_UploadMem(U32 uId, int nType, U32 uAddress, unsigned __int8 *buffer, U32 uLength)
No comments:
Post a Comment