VSF Documented
fd.h
Go to the documentation of this file.
1#ifndef __VSF_LINUX_FD_H__
2#define __VSF_LINUX_FD_H__
3
5
6#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
7# include "../sys/ioctl.h"
8#else
9# include <sys/ioctl.h>
10#endif
11
13 unsigned int size;
14 unsigned int sect;
15 unsigned int head;
16 unsigned int track;
17 unsigned int stretch;
18#define FD_STRETCH 1
19#define FD_SWAPSIDES 2
20#define FD_ZEROBASED 4
21#define FD_SECTBASEMASK 0x3FC
22#define FD_MKSECTBASE(s) (((s) ^ 1) << 2)
23#define FD_SECTBASE(floppy) ((((floppy)->stretch & FD_SECTBASEMASK) >> 2) ^ 1)
24
25 unsigned char gap;
26
27 unsigned char rate;
28#define FD_2M 0x4
29#define FD_SIZECODEMASK 0x38
30#define FD_SIZECODE(floppy) (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8)
31#define FD_SECTSIZE(floppy) ( (floppy)->rate & FD_2M ? \
32 512 : 128 << FD_SIZECODE(floppy) )
33#define FD_PERP 0x40
34
35 unsigned char spec1;
36 unsigned char fmt_gap;
37 const char * name;
38};
39
40#define FDGETPRM _IOR(2, 0x04, struct floppy_struct)
41
42#endif
Definition fd.h:12
unsigned char spec1
Definition fd.h:35
unsigned int size
Definition fd.h:13
unsigned int stretch
Definition fd.h:17
unsigned int sect
Definition fd.h:14
const char * name
Definition fd.h:37
unsigned int track
Definition fd.h:16
unsigned int head
Definition fd.h:15
unsigned char fmt_gap
Definition fd.h:36
unsigned char rate
Definition fd.h:27
unsigned char gap
Definition fd.h:25