xref: /qemu/include/hw/char/parallel.h (revision 8ff98e09f3ad447255368eccaac7412dd15e8777)
1 #ifndef HW_PARALLEL_H
2 #define HW_PARALLEL_H
3 
4 #include "exec/ioport.h"
5 #include "exec/memory.h"
6 #include "hw/isa/isa.h"
7 #include "hw/irq.h"
8 #include "chardev/char-fe.h"
9 #include "chardev/char.h"
10 
11 typedef struct ParallelState {
12     MemoryRegion iomem;
13     uint8_t dataw;
14     uint8_t datar;
15     uint8_t status;
16     uint8_t control;
17     qemu_irq irq;
18     int irq_pending;
19     CharBackend chr;
20     int hw_driver;
21     int epp_timeout;
22     uint32_t last_read_offset; /* For debugging */
23     /* Memory-mapped interface */
24     int it_shift;
25     PortioList portio_list;
26 } ParallelState;
27 
28 #define TYPE_ISA_PARALLEL "isa-parallel"
29 
30 void parallel_hds_isa_init(ISABus *bus, int n);
31 
32 bool parallel_mm_init(MemoryRegion *address_space,
33                       hwaddr base, int it_shift, qemu_irq irq,
34                       Chardev *chr);
35 
36 #endif
37