terminal: +chvili pockat, asi zbytecne, jen aby to bylo videt na portu
[lptgpib.git] / lptgpib.h
1 #ifndef GPIB_H
2 #define GPIB_H
3
4 /* GPIB commands*/
5 #define GTL 0x01
6 #define SDC 0x04
7 #define PPC 0x05
8 #define GET 0x08
9 #define TCT 0x09
10 #define LLO 0x11
11 #define DCL 0x14
12 #define PPU 0x15
13 #define SPE 0x18
14 #define SPD 0x19
15 #define MLA 0x20 // 0x20 - 0x3e
16 #define UNL 0x3f
17 #define MTA 0x40 // 0x40 - 0x5e
18 #define UNT 0x5f 
19 #define MSA 0x60 // 0x60 - 0x7e
20 #define PPE 0x60
21 #define PPD 0x70
22 /* GPIB end of string */
23 #define EOS 0x0a
24 /* these depend on wiring !! */
25 #define EOI 0x80 /* LPT 8th data bit */
26 #define ATN  0x08 /* LPT pin 17 */
27
28
29 void lptgpib_print_command(unsigned char val);
30 void lptgpib_init(int base);
31
32 char lptgpib_read_byte(char *_flags);
33 void lptgpib_write_byte(char value, char flags);
34
35 int  lptgpib_read_data(char *dest, int size);
36 void lptgpib_write_data(char *src, int size);
37
38 void lptgpib_command(char value);
39
40 int lptgpib_read(int address, char *dest, int size);
41 void lptgpib_write(int address, char *src);
42 #endif