HP85 GPIB Disk Emulator  1.0
HP85GPIBDiskEmulator
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
defines.h
Go to the documentation of this file.
1 
16 #ifndef _DEFINES_H
17 #define _DEFINES_H
18 
19 #include "user_config.h"
20 
21 extern int debuglevel;
22 
23 typedef struct stat stat_t;
24 
25 // =============================================
29 
31 #define SS80_DEFAULT_ADDRESS 0 /* SS80 default address */
32 
35 #define SS80_DEFAULT_PPR 0 /* SS80 default PPR BIT */
36 
37 #ifdef AMIGO
38 #define AMIGO_DEFAULT_ADDRESS 1 /* AMIGO default address */
40 
43 #define AMIGO_DEFAULT_PPR 1 /* AMIGO default PPR BIT */
44 #endif
45 
47 #define PRINTER_DEFAULT_ADDRESS 2 /* PRINTER default address */
48 
50 // =============================================
51 
52 #define ABORT_FLAG 1 /*< user abort */
53 #define MEDIA_FLAG 2 /*< missing media */
54 
55 #define HP9121D //< HP9121 dual 270K AMIGO floppy drive
56 #define HP9134L //< HP9134L 40M SS/80 Winchester drive
57 
60 #define GTL 0x01 //< Go to local
61 #define SDC 0x04 //< Selected device clear
62 #define PPC 0x05 //< Parallell poll configure
63 #define GET 0x08 //< Group execute trigger
64 #define TCT 0x09 //< Take control
65 #define LLO 0x11 //< Local lockout
66 #define DCL 0x14 //< Device clear
67 #define PPU 0x15 //< Parallell poll unconfigure
68 #define SPE 0x18 //< Serial poll enable
69 #define SPD 0x19 //< Serial poll disable
70 
71 #define UNL 0x3F //< Unlisten
72 #define UNT 0x5F //< Untalk
73 
75 #define BASE_MLA 0x20 //< Base listen address = 0 (0+0x20)
76 #define BASE_MTA 0x40 //< Base talk address = 0 (0+0x40)
77 #define BASE_MSA 0x60 //< Base seconday address = 0 (0+0x60)
78 
79 // Used for AMIGO and SS80 error reporting
80 #define ERR_READ 0b00000001 //< Read Error
81 #define ERR_WRITE 0b00000010 //< Write Error
82 #define ERR_SEEK 0b00000100 //< Seek Error
83 #define ERR_WP 0b00001000 //< Write Protect Error
84 #define ERR_DISK 0b00010000 //< Disk Error
85 #define ERR_GPIB 0b00100000 //< GPIB Error
86 #define ERR_UNIT 0b01000000 //< Unit number Error
87 #define ERR_VOLUME 0b10000000 //< Volume number Error
88 
89 // =============================================
91 typedef struct
92 {
93  int index;
94  char *msg;
95 } fault_t;
96 
97 // =============================================
98 #endif // #ifndef _DEFINES_H
stat
POSIX stat structure.
Definition: posix.h:105
fault_t
Fault bit and Message type.
Definition: defines.h:91
debuglevel
int debuglevel
Debug flag - used to log GPIB and emulator messages.
Definition: gpib_task.c:33
fault_t::index
int index
Definition: defines.h:93
fault_t::msg
char * msg
Definition: defines.h:94