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

#ifndef	__dev_fdioctl_h
#define	__dev_fdioctl_h

/*
 *	This is a set of definitions to control the 3.5" floppy disk unit
 *	on the A500.
 */

/* ioctl numbers */
#define	XIOCGPARM	_IOR('X', 0, struct xiocparm)
#define	XIOCSPARM	_IOW('X', 1, struct xiocparm)
#define	XIOCSSTD	_IO('X', 2)
#define	XIOCFORMAT	_IOR('X', 3, int)

/*
 *	Standard disk layouts.  Also part of minor device number.
 */

#define	XST0	0		/*  Standard format 0 - 1024 bytes/sector */
#define	XST1	1		/*  Standard format 1 - 256  bytes/sector  */
#define	XST2	2		/*  Standard format 2 - 512  bytes/sector  */

/*
 *	Structure to pass with XIOC[GS]PARM
 */

struct	xiocparm	{
	unsigned  char	fd_bytes;	/*  Bytes/sector / 256  */
	unsigned  char	fd_sects;	/*  Sectors/track  */
	unsigned  char	fd_tracks;	/*  Tracks per side  */
	unsigned  char	fd_interleave;	/*  Interleave factor  */
	unsigned  char	fd_skew;	/*  Intertrack skew  */
	unsigned  char	fd_inittrack;	/*  Track to start at  */
	unsigned	fd_snstart : 1;	/*  Sector numbering starts at 0 or 1 */
	unsigned	fd_cylmode : 1;	/*  0 surface by surface 1 cyl  */
	unsigned	fd_backside : 1;/*  2nd side goes backwards  */
	unsigned	fd_hardskew : 1;/*  Skew part of formatting */
};

#endif/*__dev_fdioctl_h*/

/* EOF fdioctl.h */
