2018-03-09 01:39:22 +03:00
|
|
|
#ifndef HW_PARALLEL_H
|
|
|
|
#define HW_PARALLEL_H
|
|
|
|
|
2023-06-12 11:12:37 +03:00
|
|
|
#include "exec/memory.h"
|
2018-03-09 01:39:22 +03:00
|
|
|
#include "hw/isa/isa.h"
|
2023-06-12 11:12:37 +03:00
|
|
|
#include "hw/irq.h"
|
|
|
|
#include "chardev/char-fe.h"
|
2018-03-09 01:39:22 +03:00
|
|
|
#include "chardev/char.h"
|
|
|
|
|
2023-06-12 11:12:37 +03:00
|
|
|
typedef struct ParallelState {
|
|
|
|
MemoryRegion iomem;
|
|
|
|
uint8_t dataw;
|
|
|
|
uint8_t datar;
|
|
|
|
uint8_t status;
|
|
|
|
uint8_t control;
|
|
|
|
qemu_irq irq;
|
|
|
|
int irq_pending;
|
|
|
|
CharBackend chr;
|
|
|
|
int hw_driver;
|
|
|
|
int epp_timeout;
|
|
|
|
uint32_t last_read_offset; /* For debugging */
|
|
|
|
/* Memory-mapped interface */
|
|
|
|
int it_shift;
|
|
|
|
} ParallelState;
|
|
|
|
|
2018-03-09 01:39:22 +03:00
|
|
|
void parallel_hds_isa_init(ISABus *bus, int n);
|
|
|
|
|
|
|
|
bool parallel_mm_init(MemoryRegion *address_space,
|
|
|
|
hwaddr base, int it_shift, qemu_irq irq,
|
|
|
|
Chardev *chr);
|
|
|
|
|
|
|
|
#endif
|