qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 4/6] hw/char/parallel: Export ParallelState


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 4/6] hw/char/parallel: Export ParallelState
Date: Mon, 22 May 2023 08:05:50 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 21/5/23 14:30, Bernhard Beschow wrote:
Exporting ParallelState is a precondition for exporing TYPE_ISA_PARALLEL.

Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Missing your S-o-b.

---
  include/hw/char/parallel.h | 44 ++++++++++++++++++++++++++++++++++++++
  hw/char/parallel.c         | 42 ------------------------------------
  2 files changed, 44 insertions(+), 42 deletions(-)

diff --git a/include/hw/char/parallel.h b/include/hw/char/parallel.h
index 0a23c0f57e..2d4907c1fe 100644
--- a/include/hw/char/parallel.h
+++ b/include/hw/char/parallel.h
@@ -1,9 +1,53 @@
  #ifndef HW_PARALLEL_H
  #define HW_PARALLEL_H
+#include "exec/ioport.h"
+#include "exec/memory.h"
  #include "hw/isa/isa.h"
+#include "hw/irq.h"
+#include "chardev/char-fe.h"
  #include "chardev/char.h"
+/*
+ * These are the definitions for the Printer Status Register
+ */
+#define PARA_STS_BUSY   0x80    /* Busy complement */
+#define PARA_STS_ACK    0x40    /* Acknowledge */
+#define PARA_STS_PAPER  0x20    /* Out of paper */
+#define PARA_STS_ONLINE 0x10    /* Online */
+#define PARA_STS_ERROR  0x08    /* Error complement */
+#define PARA_STS_TMOUT  0x01    /* EPP timeout */
+
+/*
+ * These are the definitions for the Printer Control Register
+ */
+#define PARA_CTR_DIR    0x20    /* Direction (1=read, 0=write) */
+#define PARA_CTR_INTEN  0x10    /* IRQ Enable */
+#define PARA_CTR_SELECT 0x08    /* Select In complement */
+#define PARA_CTR_INIT   0x04    /* Initialize Printer complement */
+#define PARA_CTR_AUTOLF 0x02    /* Auto linefeed complement */
+#define PARA_CTR_STROBE 0x01    /* Strobe complement */
+
+#define PARA_CTR_SIGNAL (PARA_CTR_SELECT | PARA_CTR_INIT | PARA_CTR_AUTOLF \
+                         | PARA_CTR_STROBE)

Can't we keep these register definitions local to the implementation?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]