MentOS  0.8.0
The Mentoring Operating System
Macros | Typedefs | Enumerations | Functions
Floppy Disc Controller (FDC)

Routines for interfacing with the floppy disc controller. More...

Macros

#define __DEBUG_HEADER__   "[FDC ]"
 Change header.
 
#define __DEBUG_LEVEL__   LOGLEVEL_NOTICE
 Set log level.
 

Typedefs

typedef enum fdc_registers_t fdc_registers_t
 Floppy Disk Controller (FDC) registers.
 

Enumerations

enum  fdc_registers_t {
  STATUS_REGISTER_A = 0x3F0 , STATUS_REGISTER_B = 0x3F1 , DOR = 0x3F2 , TAPE_DRIVE_REGISTER = 0x3F3 ,
  MAIN_STATUS_REGISTER = 0x3F4 , DATARATE_SELECT_REGISTER = 0x3F4 , DATA_FIFO = 0x3F5 , DIGITAL_INPUT_REGISTER = 0x3F7 ,
  CONFIGURATION_CONTROL_REGISTER = 0x3F7
}
 Floppy Disk Controller (FDC) registers. More...
 

Functions

int fdc_initialize (void)
 Initializes the floppy disk controller. More...
 
int fdc_finalize (void)
 De-initializes the floppy disk controller. More...
 

Detailed Description

Routines for interfacing with the floppy disc controller.

Enumeration Type Documentation

◆ fdc_registers_t

Floppy Disk Controller (FDC) registers.

Enumerator
STATUS_REGISTER_A 

This register is read-only and monitors the state of the interrupt pin and several disk interface pins.

STATUS_REGISTER_B 

This register is read-only and monitors the state of several isk interface pins.

DOR 

The Digital Output Register contains the drive select and motor enable bits, a reset bit and a DMA GATE bit.

TAPE_DRIVE_REGISTER 

This register allows the user to assign tape support to a particular drive during initialization.

MAIN_STATUS_REGISTER 

The Main Status Register is a read-only register and is used for controlling command input and result output for all commands.

DATARATE_SELECT_REGISTER 

This register is included for compatibility with the 82072 floppy controller and is write-only.

DATA_FIFO 

All command parameter information and disk data transfers go through the FIFO.

DIGITAL_INPUT_REGISTER 

This register is read only in all modes.

CONFIGURATION_CONTROL_REGISTER 

This register sets the datarate and is write only.

Function Documentation

◆ fdc_finalize()

int fdc_finalize ( void  )

De-initializes the floppy disk controller.

Returns
0 on success, 1 on error.

◆ fdc_initialize()

int fdc_initialize ( void  )

Initializes the floppy disk controller.

Returns
0 on success, 1 on error.