Nut/OS  4.10.3
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

Definition at line 53 of file ide.h.

#define IDE_SUPPORT_ATAPI   1

Definition at line 54 of file ide.h.

#define ATAPI_START_SEARCH_SECTOR   16

Definition at line 56 of file ide.h.

#define ATAPI_MAX_SEARCH_SECTOR   100

Definition at line 57 of file ide.h.

#define IDE_OK   0x00

Definition at line 59 of file ide.h.

Referenced by FATFileRead(), IDEATAPISetCDSpeed(), IDEInit(), IDEMountDevice(), and IDEReadSectors().

#define IDE_ERROR   0x01

Definition at line 60 of file ide.h.

Referenced by IDEMountDevice(), IDEReadSectors(), and IDEUnMountDevice().

#define IDE_DRIVE_NOT_FOUND   0x02

Definition at line 61 of file ide.h.

Referenced by IDEATAPISetCDSpeed(), and IDEReadSectors().

#define IDE_PARAM_ERROR   0x03

Definition at line 62 of file ide.h.

Referenced by IDEReadSectors().

#define IDE_BUSY   0x04

Definition at line 63 of file ide.h.

#define IDE_NOT_SUPPORTED   0x08

Definition at line 64 of file ide.h.

Referenced by IDEATAPISetCDSpeed().

#define IDE_DRIVE_C   0

Definition at line 66 of file ide.h.

Referenced by CFChange().

#define IDE_DRIVE_D   1

Definition at line 67 of file ide.h.

#define IDE_HARDDISK   0

Definition at line 72 of file ide.h.

Referenced by IDEInit().

#define IDE_HARDDISK_7MHZ   1

Definition at line 73 of file ide.h.

Referenced by IDEInit().

#define IDE_COMPACT_FLASH   2

Definition at line 74 of file ide.h.

Referenced by IDEInit().

#define MEM_8BIT_COMPACT_FLASH   3

Definition at line 75 of file ide.h.

Referenced by IDEInit().

#define IDE_SECTOR_SIZE   512

Definition at line 80 of file ide.h.

Referenced by IDEMountDevice().

#define ATAPI_SECTOR_SIZE   2048

Definition at line 81 of file ide.h.

Referenced by IDEMountDevice().

#define MAX_SECTOR_SIZE   2048

Definition at line 82 of file ide.h.


Typedef Documentation

typedef void IDE_MOUNT_FUNC(int nDevice)

Definition at line 87 of file ide.h.


Function Documentation

int IDEMountDevice ( BYTE  bDevice,
BYTE pSectorBuffer 
)

Definition at line 1325 of file ide.c.

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

Referenced by CFChange().

Here is the call graph for this function:

int IDEGetSectorSize ( BYTE  bDevice)

Definition at line 1391 of file ide.c.

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

Here is the call graph for this function:

int IDEIsCDROMDevice ( BYTE  bDevice)

Definition at line 1415 of file ide.c.

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)

Definition at line 1441 of file ide.c.

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)

Definition at line 1467 of file ide.c.

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

Referenced by CFChange().

Here is the call graph for this function:

DWORD IDEGetTotalSectors ( BYTE  bDevice)

Definition at line 1492 of file ide.c.

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 
)
int IDEATAPISetCDSpeed ( BYTE  bDevice,
WORD  wSpeed 
)