Nut/OS  5.0.5
API Reference
ide.h File Reference
#include <fs/typedefs.h>
Include dependency graph for ide.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define IDE_SUPPORT_WRITE   0
#define IDE_SUPPORT_ATAPI   1
#define ATAPI_START_SEARCH_SECTOR   16
#define ATAPI_MAX_SEARCH_SECTOR   100
#define IDE_OK   0x00
#define IDE_ERROR   0x01
#define IDE_DRIVE_NOT_FOUND   0x02
#define IDE_PARAM_ERROR   0x03
#define IDE_BUSY   0x04
#define IDE_NOT_SUPPORTED   0x08
#define IDE_DRIVE_C   0
#define IDE_DRIVE_D   1
#define IDE_HARDDISK   0
#define IDE_HARDDISK_7MHZ   1
#define IDE_COMPACT_FLASH   2
#define MEM_8BIT_COMPACT_FLASH   3
#define IDE_SECTOR_SIZE   512
#define ATAPI_SECTOR_SIZE   2048
#define MAX_SECTOR_SIZE   2048

Typedefs

typedef void IDE_MOUNT_FUNC (int nDevice)

Functions

int IDEInit (int nBaseAddress, int nIDEMode, IDE_MOUNT_FUNC *pMountFunc, IDE_MOUNT_FUNC *pUnMountFunc)
int IDEMountDevice (BYTE bDevice, BYTE *pSectorBuffer)
int IDEGetSectorSize (BYTE bDevice)
int IDEIsCDROMDevice (BYTE bDevice)
int IDEIsZIPDevice (BYTE bDevice)
int IDEUnMountDevice (BYTE bDevice)
DWORD IDEGetTotalSectors (BYTE bDevice)
int IDEReadSectors (BYTE bDevice, void *pData, DWORD dwStartSector, WORD wSectorCount)
int IDEATAPISetCDSpeed (BYTE bDevice, WORD wSpeed)

Define Documentation

#define IDE_SUPPORT_WRITE   0
#define IDE_SUPPORT_ATAPI   1
#define ATAPI_START_SEARCH_SECTOR   16
#define ATAPI_MAX_SEARCH_SECTOR   100
#define IDE_OK   0x00
#define IDE_ERROR   0x01
#define IDE_DRIVE_NOT_FOUND   0x02
#define IDE_PARAM_ERROR   0x03

Referenced by IDEReadSectors().

#define IDE_BUSY   0x04
#define IDE_NOT_SUPPORTED   0x08

Referenced by IDEATAPISetCDSpeed().

#define IDE_DRIVE_C   0

Referenced by CFChange().

#define IDE_DRIVE_D   1
#define IDE_HARDDISK   0

Referenced by IDEInit().

#define IDE_HARDDISK_7MHZ   1

Referenced by IDEInit().

#define IDE_COMPACT_FLASH   2

Referenced by IDEInit().

#define MEM_8BIT_COMPACT_FLASH   3

Referenced by IDEInit().

#define IDE_SECTOR_SIZE   512

Referenced by IDEMountDevice().

#define ATAPI_SECTOR_SIZE   2048

Referenced by IDEMountDevice().

#define MAX_SECTOR_SIZE   2048

Typedef Documentation

typedef void IDE_MOUNT_FUNC(int nDevice)

Function Documentation

int IDEInit ( int  nBaseAddress,
int  nIDEMode,
IDE_MOUNT_FUNC pMountFunc,
IDE_MOUNT_FUNC pUnMountFunc 
)
int IDEMountDevice ( BYTE  bDevice,
BYTE pSectorBuffer 
)

References ATAPI_SECTOR_SIZE, _drive::dwTotalSectors, IDE_ERROR, IDE_MAX_SUPPORTED_DEVICE, IDE_OK, IDE_READY, IDE_SECTOR_SIZE, IDE_SUPPORT_PACKET, IDEFree(), IDELock(), NULL, _drive::wFlags, and _drive::wSectorSize.

Referenced by CFChange().

Here is the call graph for this function:

int IDEGetSectorSize ( BYTE  bDevice)

References IDE_MAX_SUPPORTED_DEVICE, IDEFree(), IDELock(), and _drive::wSectorSize.

Here is the call graph for this function:

int IDEIsCDROMDevice ( BYTE  bDevice)

References FALSE, IDE_CDROM_DEVICE, IDE_MAX_SUPPORTED_DEVICE, IDE_READY, IDEFree(), IDELock(), TRUE, and _drive::wFlags.

Here is the call graph for this function:

int IDEIsZIPDevice ( BYTE  bDevice)

References FALSE, IDE_MAX_SUPPORTED_DEVICE, IDE_READY, IDE_ZIP_DEVICE, IDEFree(), IDELock(), TRUE, and _drive::wFlags.

Here is the call graph for this function:

int IDEUnMountDevice ( BYTE  bDevice)

References IDE_ERROR, IDE_MAX_SUPPORTED_DEVICE, IDEFree(), IDELock(), NULL, and _drive::wFlags.

Referenced by CFChange().

Here is the call graph for this function:

DWORD IDEGetTotalSectors ( BYTE  bDevice)

References _drive::dwTotalSectors, IDE_MAX_SUPPORTED_DEVICE, IDEFree(), and IDELock().

Here is the call graph for this function:

int IDEReadSectors ( BYTE  bDevice,
void *  pData,
DWORD  dwStartSector,
WORD  wSectorCount 
)

References ATAPI_CMD, ATAPI_CMD_READ12, _drive::dwTotalSectors, IDE_DRIVE_NOT_FOUND, IDE_ERROR, IDE_MAX_SUPPORTED_DEVICE, IDE_OK, IDE_PARAM_ERROR, IDE_READY, IDE_SUPPORT_PACKET, IDEFree(), IDELock(), _drive::wFlags, and _drive::wSectorSize.

Referenced by FATFileRead().

Here is the call graph for this function: