cfdisk.h
来自「这个是嵌入式arm系列的一个bootloader程序。对需要编写bootload」· C头文件 代码 · 共 50 行
H
50 行
/*
Module Name:
CFDisk.h
Abstract:
Compact Flash Memory Card interface.
*/
#ifndef __CFDISK_H__
#define __CFDISK_H__
typedef enum
{
mAtaWaitForBusy, // Drive locked us out from command registers (can read status register though)
mAtaWaitForNotBusy, // Drive allows us access to command registers (can read status register though)
mAtaWaitForReady, // Drive is ready to accept commands
mAtaWaitForDataReady, // Drive is ready to exchange data to host
mAtaWaitForDataReadyIgnoreErr, // Drive is ready to exchange data to host, ignore
// error bit from previous command
} AtaWaitType;
typedef enum
{
mAtaIoErr,
mAtaTimeout,
mAtaOk,
} AtaStatus;
// ATA DISK ACCESS SERVICES
BOOL CFAtaDiskDownload(UINT AtaDiskCmdAddress);
BOOL CFReadSector(int sector, PBYTE ramAddress);
static AtaStatus CFWaitForAtaDisk(AtaWaitType type, ULONG timeout);
static AtaStatus CFReadAtaSector(DWORD sector, PUCHAR pSectorData);
BOOL CFDisk_Open(PBYTE filename, PBYTE extention);
void CFDisk_Read(PBYTE fileAddr, ULONG bytesToRead, PULONG bytesRead);
//
static void FormatDosName(PBYTE d, PBYTE s, DWORD size);
static void DumpATARegisters(void);
#endif // __CFDISK_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?