TacOS  0.2
 Tout Structures de données Fichiers Fonctions Variables Définitions de type Énumérations Macros
Macros | Énumérations | Fonctions
Référence du fichier floppy_utils.h
Ce graphe montre quels fichiers incluent directement ou indirectement ce fichier :

Aller au code source de ce fichier.

Macros

#define FLOPPY_BASE   0x03f0
 

Énumérations

enum  floppy_registers {
  FLOPPY_SRA = 0, FLOPPY_SRB = 1, FLOPPY_DOR = 2, FLOPPY_TDR = 3,
  FLOPPY_MSR = 4, FLOPPY_DSR = 4, FLOPPY_FIFO = 5, FLOPPY_DIR = 7,
  FLOPPY_CCR = 7
}
 Offset des différents registres du controleur disquette.
 
enum  floppy_commands {
  READ_TRACK = 2, SPECIFY = 3, SENSE_DRIVE_STATUS = 4, WRITE_DATA = 5,
  READ_DATA = 6, RECALIBRATE = 7, SENSE_INTERRUPT = 8, READ_ID = 10,
  READ_DELETED_DATA = 12, FORMAT_TRACK = 13, SEEK = 15, VERSION = 16,
  SCAN_EQUAL = 17, PERPENDICULAR_MODE = 18, CONFIGURE = 19, LOCK = 20,
  VERIFY = 22, SCAN_LOW_OR_EQUAL = 25, SCAN_HIGH_OR_EQUAL = 29
}
 Numéros de commande du controleur disquette.
 

Fonctions

bool floppy_ready ()
 Vérifie si le controleur floppy est en état ready. Plus de détails...
 
int floppy_write_command (char cmd)
 Envoi une commande au controleur floppy. Plus de détails...
 
uint8_t floppy_read_data ()
 Lis les données disponibles sur la FIFO du controleur. Plus de détails...
 
int floppy_seek (int drive, int cylindre, int head)
 Déplace la tête de lecture à un cylindre défini. Plus de détails...
 
uint8_t floppy_get_type (int drive)
 Retourne le type de disquette accepté par le lecteur. Plus de détails...
 
void floppy_detect_drives ()
 Fonction de détection des lecteur floppy présents.
 
uint8_t floppy_get_version ()
 Retourne le numero de version du controleur disquette. Plus de détails...
 

Description détaillée

Auteur
TacOS developers

LICENSE

Copyright (C) 2010, 2011, 2012 - TacOS developers.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org/copyleft/gpl.html

You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.

DESCRIPTION

Fonctions utilitaires du driver floppy

Documentation des fonctions

uint8_t floppy_get_type ( int  drive)
Paramètres
drivenumero du lecteur
Renvoie
numero indiquant le type de disquette

Voici le graphe des appelants de cette fonction :

uint8_t floppy_get_version ( )
Renvoie
numero de version
uint8_t floppy_read_data ( )
Renvoie
0 si la commande a bien été transmise, -1 sinon

Voici le graphe d'appel pour cette fonction :

Voici le graphe des appelants de cette fonction :

bool floppy_ready ( )
Renvoie
TRUE si le controleur est ready, FALSE sinon

Voici le graphe des appelants de cette fonction :

int floppy_seek ( int  drive,
int  cylindre,
int  head 
)
Paramètres
drivenuméro de drive
cylindrenumero du cylindre à atteindre
headnumero de la tête a déplacer
Renvoie
0 en cas de succes, -1 sinon

Voici le graphe d'appel pour cette fonction :

int floppy_write_command ( char  cmd)
Paramètres
cmdcommande à envoyer
Renvoie
0 si la commande a bien été transmise, -1 sinon

Voici le graphe d'appel pour cette fonction :

Voici le graphe des appelants de cette fonction :