5 * Copyright (C) 2008-2009 Pawel Dziepak
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #include "resources/block.h"
24 #include "resources/device.h"
28 class fdc
: public block
{
31 int sectors_per_track
;
34 void fdc_read_sector(void *data
, int head
, int cyl
, int start
, int stop
);
35 void fdc_write_sector(void *source
, int head
, int cyl
, int start
, int stop
);
37 /* Specific fdc orders */
38 void fdc_seek(int head
, int cylinder
);
39 void fdc_sense_int_status();
40 void fdc_recalibrate();
41 void fdc_read_data(int head
, int cyl
, int start
, int stop
);
42 void fdc_write_data(int head
, int cyl
, int start
, int stop
);
43 void fdc_set_disk_type();
44 void fdc_wait_command();
50 void fdc_isr_normal();
55 volatile bool irq_occured
;
59 void read_block(int address
, int count
, void *buffer
);
60 void write_block(int address
, int count
, void *buffer
);
64 bool init_device(p
<did
> iadr
);
66 static void register_type();