⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 atlasapi.h

📁 cell phone source code
💻 H
字号:
// AtlasApi.h: interface for the AtlasApi class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ATLASAPI_H__88E2D399_BF3C_4758_906C_DFC9169A476C__INCLUDED_)
#define AFX_ATLASAPI_H__88E2D399_BF3C_4758_906C_DFC9169A476C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifdef _ATLAS_EXPORT
#define ATLAS_API	__declspec(dllexport)
#else
#define ATLAS_API
#endif

typedef struct tagATLAS_OS_IMG_INFO
{
	DWORD	dwLength;
	DWORD	dwVerMaj;
	DWORD	dwVerMin;
}ATLAS_OS_IMG_INFO, *PATLAS_OS_IMG_INFO;

typedef struct tagATLAS_BL_IMG_INFO
{
	DWORD	dwLength;
	DWORD	dwVerMaj;
	DWORD	dwVerMin;
}ATLAS_BL_IMG_INFO, *PATLAS_BL_IMG_INFO;

typedef struct tagATLAS_DEV_INFO
{
	DWORD dwBootloaderVer;
	DWORD dwProcessorInfo;
	char szHardwareName[20];
	char szSoftwareName[20];
	char szImageType[20];
	DWORD dwNandXIPInfo;
	DWORD dwEbootReservedSize;
	DWORD dwDMReservedSize;
	DWORD dwNKReservedSize;
	DWORD dwNBootReservedSize;
    DWORD dwBootStage;
}ATLAS_DEV_INFO, *PATLAS_DEV_INFO;


typedef struct DUMPNFINFO
{
	DWORD		dwManufactureId;
	DWORD		dwPageSize;			//@<<info> total page size including spare area size
	DWORD		dwTotalSize;		//@<<info> total flash size in bytes
	DWORD		dwSpareDataLength;	//@<<info> spare area size
	BYTE		ucSectorSizeBits;
	BYTE		ucSectorsPerBlockBits;
	BYTE		ucBlockSizeBits;
	BYTE		ucDataWidth;			//@<<info> 8/16 bits data width
}DumpNFInfo,*pDumpNFInfo;

BOOL ATLAS_API AtlasIsConnected();
BOOL ATLAS_API AtlasInitUsb();
BOOL ATLAS_API AtlasOpenUsb(HWND hParentWnd);
VOID ATLAS_API AtlasCloseUsb();

BOOL ATLAS_API AtlasInitRs232(DWORD dwPort , DWORD dwBaud);
BOOL ATLAS_API AtlasDeinitRs232();
BOOL AtlasSendRs232Msg(UINT uMsg, WPARAM wParam, LPARAM lParam);

BOOL ATLAS_API AtlasInitJTAG();
BOOL ATLAS_API AtlasDeinitJTAG();
BOOL ATLAS_API AtlasJTAGDownImage(LPCSTR lpszFileName,int cs);

BOOL ATLAS_API AtlasRequestImageBuf(DWORD dwImgLength, DWORD &pDeviceBuf);
BOOL ATLAS_API AtlasWriteBlock2Device(PBYTE pData, DWORD dwLength);
BOOL ATLAS_API AtlasWriteLastBlock2Device(PBYTE pData, DWORD dwLength);
BOOL ATLAS_API AtlasSetNandCS(DWORD nCs);
BOOL ATLAS_API AtlasGetNFBlockData(DWORD dwBlockIndex);
BOOL ATLAS_API ReadDumpNFData(BYTE *pByte,DWORD dwCount);

BOOL ATLAS_API AtlasOpenDownloadPipe();
void ATLAS_API AtlasCloseDownloadPipe();



BOOL ATLAS_API AtlasWriteImage2Nand();
BOOL ATLAS_API AtlasUpdateNandToc();
BOOL ATLAS_API AtlasSetCurImageType(DWORD dwImgType);

BOOL ATLAS_API AtlasGetBootStage(DWORD &dwBootStage);
BOOL ATLAS_API AtlasSetDataBlockLength(DWORD nLength);
BOOL ATLAS_API AtlasSetDataBlock();
BOOL ATLAS_API AtlasGetDeviceInfo();
BOOL ATLAS_API AtlasGetNfInfo(DWORD dwCS);
BOOL ATLAS_API AtlasGetEBOOTPositon(DWORD dwCS,DWORD *pEbootStart,DWORD *pEbootEnd);

BOOL ATLAS_API AtlasGetUsbPipeIndex(DWORD &dwDownloadIndex, DWORD &dwDevStatusIndex, DWORD &dwDbgMsgToDevIndex, DWORD &dwDbgMsgFromDevIndex);
BOOL ATLAS_API AtlasGetDevStatus(DWORD &dwDevStatus,UINT &nReadBytes);

BOOL ATLAS_API AtlasBeginSession();
BOOL ATLAS_API AtlasEndSession();
BOOL ATLAS_API AtlasWriteDbgMsg(char * pMsg);

//In Nboot stage we have to use 0x80 as frame length
#define NBOOT_DATA_FRAME_LENGTH				0x80  
//In Eboot stage we could use larger dma values
#define EBOOT_DATA_FRAME_LENGTH					0x8000
#endif // !defined(AFX_ATLASAPI_H__88E2D399_BF3C_4758_906C_DFC9169A476C__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -