···11+/*****************************************************************************
22+ * pce *
33+ *****************************************************************************/
44+55+/*****************************************************************************
66+ * File name: src/devices/fdc.h *
77+ * Created: 2007-09-06 by Hampa Hug <hampa@hampa.ch> *
88+ * Copyright: (C) 2007-2010 Hampa Hug <hampa@hampa.ch> *
99+ *****************************************************************************/
1010+1111+/*****************************************************************************
1212+ * This program is free software. You can redistribute it and / or modify it *
1313+ * under the terms of the GNU General Public License version 2 as published *
1414+ * by the Free Software Foundation. *
1515+ * *
1616+ * This program is distributed in the hope that it will be useful, but *
1717+ * WITHOUT ANY WARRANTY, without even the implied warranty of *
1818+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
1919+ * Public License for more details. *
2020+ *****************************************************************************/
2121+2222+2323+#ifndef PCE_DEVICES_FDC_H
2424+#define PCE_DEVICES_FDC_H 1
2525+2626+2727+#include <devices/device.h>
2828+#include <devices/memory.h>
2929+#include <devices/block/block.h>
3030+3131+#include <chipset/82xx/e8272.h>
3232+3333+3434+typedef struct {
3535+ device_t dev;
3636+ e8272_t e8272;
3737+3838+ mem_blk_t blk;
3939+4040+ disks_t *dsks;
4141+ unsigned drive[4];
4242+} dev_fdc_t;
4343+4444+4545+dev_fdc_t *dev_fdc_new (unsigned long addr);
4646+void dev_fdc_del (dev_fdc_t *fdc);
4747+4848+void dev_fdc_mem_add_io (dev_fdc_t *fdc, memory_t *io);
4949+void dev_fdc_mem_rmv_io (dev_fdc_t *fdc, memory_t *io);
5050+5151+void dev_fdc_reset (dev_fdc_t *fdc);
5252+5353+void dev_fdc_set_disks (dev_fdc_t *fdc, disks_t *dsks);
5454+5555+void dev_fdc_set_drive (dev_fdc_t *fdc, unsigned fdcdrv, unsigned drive);
5656+5757+unsigned dev_fdc_get_drive (dev_fdc_t *fdc, unsigned fdcdrv);
5858+5959+6060+#endif