floppy.h File Reference

#include "routix/system.h"

Go to the source code of this file.

Defines

Functions


Define Documentation

#define BASE   0x3f0
 

Definition at line 25 of file floppy.h.

#define BLOQUE_SIZE   512
 

Definition at line 125 of file floppy.h.

Referenced by init_floppy_DMA(), leer_escribir_new(), leer_sec(), and levantar_fat().

#define CARAS_POR_PISTA   2
 

Definition at line 151 of file floppy.h.

Referenced by leer_escribir(), and leer_escribir_new().

#define CCR   BASE+7
 

Definition at line 33 of file floppy.h.

Referenced by init_floppy(), and init_floppy_new().

#define CMDBUSY   1<<4
 

Definition at line 55 of file floppy.h.

Referenced by floppy_get_result().

#define COMMAND_OK   ( ! (ST0&0xc0 == ST0_IC_OK ) )
 

Definition at line 122 of file floppy.h.

Referenced by read_sector(), read_sector_block_new(), recalibrate(), recalibrate_block_new(), seek(), and seek_block_new().

#define CONF_EFIFO   1<<5
 

Definition at line 84 of file floppy.h.

#define CONF_EIS   1<<6
 

Definition at line 83 of file floppy.h.

Referenced by init_floppy(), and init_floppy_block_new().

#define CONF_POLL   1<<4
 

Definition at line 85 of file floppy.h.

Referenced by init_floppy(), and init_floppy_block_new().

#define CONFIGURE_0   0x13
 

Definition at line 79 of file floppy.h.

Referenced by init_floppy(), and init_floppy_block_new().

#define CONFIGURE_1   0
 

Definition at line 80 of file floppy.h.

Referenced by init_floppy(), and init_floppy_block_new().

#define DATA   BASE+5
 

Definition at line 31 of file floppy.h.

Referenced by floppy_get_result(), floppy_sendbyte(), and init_MM_base().

#define DIO   1<<6
 

Definition at line 53 of file floppy.h.

Referenced by floppy_get_result(), and floppy_sendbyte().

#define DIR   BASE+7
 

Definition at line 32 of file floppy.h.

#define DMA   1<<3 | 4
 

Definition at line 41 of file floppy.h.

#define DMA_CH2_ADDR   0x4
 

Definition at line 137 of file floppy.h.

Referenced by init_floppy_DMA().

#define DMA_CH2_COUNT   0x5
 

Definition at line 138 of file floppy.h.

Referenced by init_floppy_DMA().

#define DMA_CH2_PAGE   0x81
 

Definition at line 136 of file floppy.h.

Referenced by init_floppy_DMA().

#define DMA_CMD   0xB
 

Definition at line 135 of file floppy.h.

Referenced by init_floppy_DMA().

#define DMA_INT   DMA
 

Definition at line 42 of file floppy.h.

Referenced by motor_off(), motor_off_new(), motor_on(), and motor_on_new().

#define DMA_MASK   0xA
 

Definition at line 134 of file floppy.h.

Referenced by init_floppy_DMA().

#define DMA_READ   0x46
 

Definition at line 139 of file floppy.h.

Referenced by read_sector(), and read_sector_new().

#define DMA_WRITE   0x4A
 

Definition at line 140 of file floppy.h.

#define DOR   BASE+2
 

Definition at line 28 of file floppy.h.

Referenced by init_floppy(), init_floppy_new(), motor_off(), motor_off_new(), motor_on(), motor_on_new(), and set_dor().

#define DR_1MBPS   3
 

Definition at line 63 of file floppy.h.

#define DR_250KBPS   2
 

Definition at line 66 of file floppy.h.

#define DR_300KBPS   1
 

Definition at line 65 of file floppy.h.

#define DR_500KBPS   0
 

Definition at line 64 of file floppy.h.

Referenced by init_floppy(), and init_floppy_new().

#define DRIVE_0   0
 

Definition at line 44 of file floppy.h.

Referenced by open(), read_sector(), read_sector_new(), recalibrate(), recalibrate_new(), seek(), and seek_new().

#define DRIVE_1   1
 

Definition at line 45 of file floppy.h.

#define DRIVE_2   2
 

Definition at line 46 of file floppy.h.

#define DRIVE_3   3
 

Definition at line 47 of file floppy.h.

#define DRV0BUSY   1<<0
 

Definition at line 59 of file floppy.h.

#define DRV1BUSY   1<<1
 

Definition at line 58 of file floppy.h.

#define DRV2BUSY   1<<2
 

Definition at line 57 of file floppy.h.

#define DRV3BUSY   1<<3
 

Definition at line 56 of file floppy.h.

#define DSR   BASE+4
 

Definition at line 30 of file floppy.h.

#define DSR_POWERDOWN   1<<6
 

Definition at line 70 of file floppy.h.

#define DSR_RESET   1<<7
 

Definition at line 69 of file floppy.h.

#define ERR_MAX_TRYS   -3
 

Definition at line 19 of file floppy.h.

Referenced by leer_escribir().

#define ERR_NEED_RESET   -2
 

Definition at line 18 of file floppy.h.

Referenced by leer_sec(), read_sector(), and recalibrate().

#define ERR_TIMEOUT   -1
 

Definition at line 17 of file floppy.h.

Referenced by block(), floppy_get_result(), init_floppy(), init_floppy_block_new(), read_sector(), read_sector_block_new(), read_sector_id(), read_sector_new(), recalibrate(), recalibrate_block_new(), recalibrate_new(), seek(), seek_block_new(), and seek_new().

#define GETBYTE_TIMEOUT   1000000
 

Definition at line 10 of file floppy.h.

Referenced by floppy_get_result().

#define MAX_FLOPPY_TRYS   1
 

Definition at line 152 of file floppy.h.

Referenced by leer_escribir().

#define MOTA   1<<4 | 4
 

Definition at line 40 of file floppy.h.

Referenced by motor_on(), and motor_on_new().

#define MOTB   1<<5 | 4
 

Definition at line 39 of file floppy.h.

#define MOTC   1<<6 | 4
 

Definition at line 38 of file floppy.h.

#define MOTD   1<<7 | 4
 

Definition at line 37 of file floppy.h.

#define MOTOR_OFF   0
 

Definition at line 157 of file floppy.h.

Referenced by leer_escribir_new(), and motor_off_new().

#define MOTOR_ON   1
 

Definition at line 156 of file floppy.h.

Referenced by motor_on_new_finish().

#define MSR   BASE+4
 

Definition at line 29 of file floppy.h.

Referenced by floppy_get_result(), floppy_sendbyte(), and read_msr().

#define NO_VALIDO   -100
 

Definition at line 20 of file floppy.h.

Referenced by dump_states(), floppy_get_result(), and read_sector_id().

#define NONDMA   1<<5
 

Definition at line 54 of file floppy.h.

#define READ_SECTOR   0Xe6
 

Definition at line 97 of file floppy.h.

Referenced by leer_escribir(), read_sector(), and read_sector_new().

#define READ_SECTOR_ID   0x4a
 

Definition at line 94 of file floppy.h.

Referenced by read_sector_id().

#define RECALIBRATE   0x7
 

Definition at line 91 of file floppy.h.

Referenced by recalibrate(), and recalibrate_new().

#define RESET   0
 

Definition at line 43 of file floppy.h.

#define RQM   1<<7
 

Definition at line 52 of file floppy.h.

Referenced by floppy_get_result(), and floppy_sendbyte().

#define SECTORES_POR_PISTA   18
 

Definition at line 150 of file floppy.h.

Referenced by leer_escribir(), leer_escribir_new(), read_sector(), and read_sector_new().

#define SEEK   0xf
 

Definition at line 103 of file floppy.h.

Referenced by seek(), and seek_new().

#define SENDBYTE_TIMEOUT   1000000
 

Definition at line 9 of file floppy.h.

Referenced by floppy_sendbyte().

#define SENSE_INTERRUPT_STATUS   0x8
 

Definition at line 76 of file floppy.h.

Referenced by init_floppy(), init_floppy_block_new(), recalibrate(), recalibrate_block_new(), seek(), and seek_block_new().

#define SPECIFY   0x3
 

Definition at line 88 of file floppy.h.

Referenced by init_floppy(), and init_floppy_block_new().

#define SRA   BASE
 

Definition at line 26 of file floppy.h.

#define SRB   BASE+1
 

Definition at line 27 of file floppy.h.

#define ST0_DRIVE_A   0x0
 

Definition at line 116 of file floppy.h.

#define ST0_DRIVE_B   0x1
 

Definition at line 117 of file floppy.h.

#define ST0_DRIVE_C   0x2
 

Definition at line 118 of file floppy.h.

#define ST0_DRIVE_D   0x3
 

Definition at line 119 of file floppy.h.

#define ST0_HEAD
 

Definition at line 115 of file floppy.h.

#define ST0_IC_ABNORMAL   (0x1 << 6)
 

Definition at line 110 of file floppy.h.

#define ST0_IC_ABNORMAL_POLL   (0x3 << 6)
 

Definition at line 112 of file floppy.h.

#define ST0_IC_NOT_EXIST   (0x2 << 6)
 

Definition at line 111 of file floppy.h.

#define ST0_IC_OK   (0x0 << 6)
 

Definition at line 109 of file floppy.h.

#define ST0_NOT_READY   (0x1 << 3)
 

Definition at line 114 of file floppy.h.

#define ST0_SEEK   (0x1 << 5)
 

Definition at line 113 of file floppy.h.

#define TIEMPO_APAGADO_MOTOR_POR_INACTIVIDAD   2000000
 

Definition at line 159 of file floppy.h.

Referenced by error(), and leer_escribir_new().

#define TIEMPO_TIMEOUT_COMANDO   1000000
 

Definition at line 160 of file floppy.h.

Referenced by read_sector_new(), recalibrate_new(), and seek_new().

#define TIME_WAIT_FOR_MOTOR_ON   500000
 

Definition at line 161 of file floppy.h.

Referenced by motor_on_new().

#define WRITE_SECTOR   0x0
 

Definition at line 100 of file floppy.h.

Referenced by leer_escribir().


Function Documentation

void init_floppy_DMA byte   ) 
 

Definition at line 869 of file floppy.c.

Referenced by read_sector(), and read_sector_new().

int leer_escribir byte  operacion,
dword  sector_logico,
byte buffer
 

Definition at line 897 of file floppy.c.

void set_dor word  valor  ) 
 

Definition at line 161 of file floppy.c.


Generated on Sun May 30 18:38:36 2004 for Routix OS by doxygen 1.3.6