# fdc.h File Reference

`#include <ubixos/types.h>`

Go to the source code of this file.

## Data Structures

struct | DrvGeom

## Defines

#define | fdcMsr (0x3f4)
#define | fdcData (0x3f5)
#define | fdcDir (0x3f7)
#define | fdcCcr (0x3f7)
#define | fdcDor (0x3f2)
#define | fdcDrs (0x3f4)
#define | cmdWrite (0xc5)
#define | cmdRead (0xe6)
#define | cmdSeek (0x0f)
#define | cmdSensei (0x08)
#define | cmdRecal (0x07)
#define | cmdSpecify (0x03)
#define | dg144Heads 2
#define | dg144Tracks 80
#define | dg144Spt 18
#define | dg144Gap3rw 0x1b
#define | dg168Gap3rw 0x1c

## Typedefs

typedef DrvGeom | drvGeom

## Functions

void | fdcInit ()
void | floppyIsr ()
void | floppyIsrhndlr ()
void | sendByte (int Int8)
int | getByte ()
bool | fdcRw (int block, Int8 *blockBuffer, bool read, unsigned long numSectors)
void | block2Hts (int block, int *head, int *track, int *sector)
void | motorOn (void)
void | motorOff (void)
bool | seek (int track)
bool | waitFdc (bool sensei)
void | recalibrate (void)
void | reset (void)
bool | writeBlock (int block, Int8 *blockBuffer, unsigned long numSectors)
bool | readBlock (int block, Int8 *blockBuffer, unsigned long numSectors)
void | fdcWrite (void *info, void *, uInt32 startSector, uInt32 sectorCount)
void | fdcRead (void *info, void *, uInt32 startSector, uInt32 sectorCount)

## Define Documentation

#define cmdRead (0xe6)

#define cmdRecal (0x07)

#define cmdSeek (0x0f)

#define cmdSensei (0x08)

#define cmdSpecify (0x03)

#define cmdWrite (0xc5)

#define dg144Gap3rw 0x1b

#define dg144Heads 2

#define dg144Spt 18

#define dg144Tracks 80

#define dg168Gap3rw 0x1c

#define fdcCcr (0x3f7)

#define fdcData (0x3f5)

#define fdcDir (0x3f7)

#define fdcDor (0x3f2)

#define fdcDrs (0x3f4)

#define fdcMsr (0x3f4)

## Typedef Documentation

typedef struct DrvGeom drvGeom

## Function Documentation

void block2Hts | ( | int | block,
|  | int * | head,
|  | int * | track,
|  | int * | sector
| ) |

void fdcInit | ( |  | ) |

void fdcRead | ( | void * | info,
|  | void * | ,
|  | uInt32 | startSector,
|  | uInt32 | sectorCount
| ) |

bool fdcRw | ( | int | block,
|  | Int8 * | blockBuffer,
|  | bool | read,
|  | unsigned long | numSectors
| ) |

void fdcWrite | ( | void * | info,
|  | void * | ,
|  | uInt32 | startSector,
|  | uInt32 | sectorCount
| ) |

void floppyIsr | ( |  | ) |

void floppyIsrhndlr | ( |  | ) |

int getByte | ( |  | ) |

void motorOff | ( | void |  | ) |

void motorOn | ( | void |  | ) |

bool readBlock | ( | int | block,
|  | Int8 * | blockBuffer,
|  | unsigned long | numSectors
| ) |

void recalibrate | ( | void |  | ) |

void reset | ( | void |  | ) |

bool seek | ( | int | track | ) |

void sendByte | ( | int | Int8 | ) |

bool waitFdc | ( | bool | sensei | ) |

bool writeBlock | ( | int | block,
|  | Int8 * | blockBuffer,
|  | unsigned long | numSectors
| ) |