/* Header for module IODECLARATIONS, generated by p2c */
#ifndef IODECLARATIONS_H
#define IODECLARATIONS_H



#ifndef SYSGLOBALS_H
#include <p2c/sysglobals.h>
#endif



#ifdef IODECLARATIONS_G
# define vextern
#else
# define vextern extern
#endif



#define P_iominisc      0
#define P_iomaxisc      31
#define P_minrealisc    7
#define P_maxrealisc    31

#define io_line_feed    '\n'
#define io_carriage_rtn '\015'

#define P_ioescapecode  (-26)
#define ioe_no_error    0
#define ioe_no_card     1
#define ioe_not_hpib    2
#define ioe_not_act     3
#define ioe_not_dvc     4
#define ioe_no_space    5
#define ioe_no_data     6
#define ioe_bad_tfr     7
#define ioe_isc_busy    8
#define ioe_buf_busy    9
#define ioe_bad_cnt     10
#define ioe_bad_tmo     11
#define ioe_no_driver   12
#define ioe_no_dma      13
#define ioe_no_word     14
#define ioe_not_talk    15
#define ioe_not_lstn    16
#define ioe_timeout     17
#define ioe_not_sctl    18
#define ioe_rds_wtc     19
#define ioe_bad_sct     20
#define ioe_crd_dwn     21
#define ioe_eod_seen    22
#define ioe_misc        23
#define ioe_sr_toomany  304
#define ioe_dc_fail     306
#define ioe_dc_usart    313
#define ioe_dc_ovfl     314
#define ioe_dc_clk      315
#define ioe_dc_cts      316
#define ioe_dc_car      317
#define ioe_dc_act      318
#define ioe_dc_conn     319
#define ioe_dc_conf     325
#define ioe_dc_reg      326
#define ioe_dc_rval     327
#define ioe_sr_fail     353
#define no_isc          255

#define gtl_message     '\001'
#define sdc_message     '\004'
#define ppc_message     '\005'
#define get_message     '\b'
#define tct_message     '\t'
#define llo_message     '\021'
#define dcl_message     '\024'
#define ppu_message     '\025'
#define spe_message     '\030'
#define spd_message     '\031'
#define unl_message     '?'
#define unt_message     '_'
#define ppe_message     '`'
#define ppd_message     'p'

#define talk_constant   64
#define listen_constant 32
#define no_card         0
#define other_card      1
#define system_card     2
#define hpib_card       3
#define gpio_card       4
#define serial_card     5
#define graphics_card   6
#define srm_card        7
#define bubble_card     8
#define eprom_prgmr     9
#define hp98628_dsndl   (-7)
#define P_hp98629       (-6)
#define hp_datacomm     (-5)
#define P_hp98620       (-4)
#define internal_kbd    (-3)
#define internal_crt    (-2)
#define internal_hpib   (-1)
#define no_id           0
#define P_hp98624       1
#define P_hp98626       2
#define P_hp98622       3
#define P_hp98623       4
#define P_hp98625       8
#define hp98628_async   20
#define P_hpGATOR       25
#define P_hp98253       27
#define P_hp98627       28
#define P_hp98259       30
#define P_hp98644       66



typedef enum {
    ren_line, ifc_line, srq_line, eoi_line, nrfd_line, ndac_line, dav_line,
    atn_line
} type_hpib_line;

typedef enum {
    no_parity, odd_parity, even_parity, zero_parity, one_parity
} type_parity;

typedef enum {
    rts_line, cts_line, dcd_line, dsr_line, drs_line, ri_line, dtr_line
} type_serial_line;

typedef struct drv_table_type {
    _PROCEDURE iod_init;
    _PROCEDURE iod_isr;
    _PROCEDURE iod_rdb;
    _PROCEDURE iod_wtb;
    _PROCEDURE iod_rdw;
    _PROCEDURE iod_wtw;
    _PROCEDURE iod_rds;
    _PROCEDURE iod_wtc;
    _PROCEDURE iod_end;
    _PROCEDURE iod_tfr;
    _PROCEDURE iod_send;
    _PROCEDURE iod_ppoll;
    _PROCEDURE iod_set, iod_clr;
    _PROCEDURE iod_test;
} drv_table_type;

typedef union io_funny_proc {
    _PROCEDURE real_proc;
    struct {
	Anyptr *dummy_pr, *dummy_sl;
    } U0;
} io_funny_proc;

typedef struct io_temp_type {
    isrib myisrib;
    io_funny_proc user_isr;
    Anyptr *user_parm, *card_addr, *in_bufptr, *out_bufptr;
    Char eirbyte;
    uchar my_isc;
    long timeout;
    short addressed;
    Char drv_misc[32];
} io_temp_type;

typedef struct io_temp_type2 {
    isrib myisrib;
    io_funny_proc user_isr;
    Anyptr *user_parm, *card_addr, *in_bufptr, *out_bufptr;
    Char eirbyte;
    uchar my_isc;
    long timeout;
    short addressed;
    Char drv_misc[128];
} io_temp_type2;

typedef struct io_temp_type3 {
    isrib myisrib;
    io_funny_proc user_isr;
    Anyptr *user_parm, *card_addr, *in_bufptr, *out_bufptr;
    Char eirbyte;
    uchar my_isc;
    long timeout;
    short addressed;
    Char drv_misc[160];
} io_temp_type3;

typedef struct io_temp_type4 {
    isrib myisrib;
    io_funny_proc user_isr;
    Anyptr *user_parm, *card_addr, *in_bufptr, *out_bufptr;
    Char eirbyte;
    uchar my_isc;
    long timeout;
    short addressed;
    Char drv_misc[164];
} io_temp_type4;

typedef struct isc_table_type {
    drv_table_type *io_drv_ptr;
    io_temp_type *io_tmp_ptr;
    short card_type;
    long user_time;
    short card_id;
    Anyptr *card_ptr;
} isc_table_type;

typedef enum {
    dummy_tfr_1, serial_DMA, serial_FHS, serial_FASTEST, dummy_tfr_2,
    overlap_INTR, overlap_DMA, overlap_FHS, overlap_FASTEST, P_OVERLAP
} user_tfr_type;

typedef enum {
    no_tfr, INTR_tfr, DMA_tfr, BURST_tfr, FHS_tfr
} actual_tfr_type;

typedef enum {
    to_memory, from_memory
} dir_of_tfr;

typedef Char buf_type[];

typedef struct buf_info_type {
    io_temp_type *drv_tmp_ptr;
    uchar active_isc;
    actual_tfr_type act_tfr;
    user_tfr_type usr_tfr;
    boolean b_w_mode, end_mode;
    dir_of_tfr direction;
    short term_char;
    long term_count;
    Char *buf_ptr;
    long buf_size;
    Anyptr *buf_empty, *buf_fill;
    io_funny_proc eot_proc;
    Anyptr *eot_parm;
    boolean dma_priority;
} buf_info_type;



vextern io_funny_proc dma_ch_0;
vextern uchar dma_isc_0;
vextern io_funny_proc dma_ch_1;
vextern uchar dma_isc_1;
vextern isrib dma_isrib0, dma_isrib1;
vextern boolean dma_here;
vextern Char io_work_char;
vextern long ioe_result, ioe_isc;
vextern isc_table_type isc_table[P_iomaxisc - P_iominisc + 1];
vextern Char io_revid[97];
vextern _PROCEDURE io_error_link;



extern Void io_escape PP((long my_code, long select_code));
extern uchar io_find_isc PP((Anyptr *iod_temp));



#undef vextern

#endif /*IODECLARATIONS_H*/

/* End. */

