/*
 * $Header: /smsa/bsd:include/dev/fdc_fiq.h:bsd  1.3  $
 * $Source: /smsa/bsd:include/dev/fdc_fiq.h: $
 *
 * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
 */

#ifndef __dev_fdc_fiq_h
#define __dev_fdc_fiq_h

/* fdc_fiq.h */

/* Compile the following block for C code only */
#ifndef fdc_fiq_asm

/*
 * The following FIQ service routines are defined: they are
 * specified here as char arrays since they must not be called 
 * from C!
 */

extern char fdc_fiq[], fdd_read_fiq[], fdd_write_fiq[];
extern char bad_fdc_fiq[];

/*
 * The following int is updated by fdc_fiq and checked by the clock
 * routine.
 */
extern int promote_fiq;

/*
 * The following pointer is used by the write fiq code: it must
 * be initialised before floppy write fiqs are generated.
 */
extern struct ioctrans *fdd_wpt;

/*
 * The following C-callable function is used for checking how far
 * a floppy data transfer got.
 */
caddr_t  fdd_address (/*int op_was_write*/);

/*
 * The following structure is used to pass information between the
 * driver and the low-level FDC FIQ handler (on machines other than
 * A680).  The definitions in the alternate block used in the 
 * assembler code.
 */
struct fdcc {
    unsigned char  errmask;			/* mask for status */
    unsigned char  fdc_status;			/* as read from FDC */
    unsigned char  next_op;			/* read or write + opts */
    unsigned char  next_sector;			/* sec# for re-command */
    unsigned char  sec_count;			/* total sectors to do */
    unsigned char  sec_done;			/* sectors completed so far */
};

#else  fdc_fiq_asm
@ In assembler: the following byte offsets must match struct fdcc above
#define errmask		0
#define fdc_status	1
#define next_op		2
#define next_sector	3
#define sec_count	4
#define sec_done	5

#endif fdc_fiq_asm

#endif/*__dev_fdc_fiq_h*/

/* EOF fdc_fiq.h */
