]> Git Repo - qemu.git/commitdiff
mos6522: add defines for IFR bit flags
authorMark Cave-Ayland <[email protected]>
Sat, 5 Mar 2022 15:09:46 +0000 (15:09 +0000)
committerMark Cave-Ayland <[email protected]>
Wed, 9 Mar 2022 09:28:28 +0000 (09:28 +0000)
These are intended to make it easier to see how the physical control lines
are wired for each instance.

Signed-off-by: Mark Cave-Ayland <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20220305150957[email protected]>
Signed-off-by: Mark Cave-Ayland <[email protected]>
include/hw/misc/mos6522.h

index fc95d22b0fd04bf46ae0b6ce87f11323d6128324..be5c90d24db2ddab0b64df4eba06c9a4e954c1af 100644 (file)
 #define IER_SET            0x80    /* set bits in IER */
 #define IER_CLR            0       /* clear bits in IER */
 
-#define CA2_INT            0x01
-#define CA1_INT            0x02
-#define SR_INT             0x04    /* Shift register full/empty */
-#define CB2_INT            0x08
-#define CB1_INT            0x10
-#define T2_INT             0x20    /* Timer 2 interrupt */
-#define T1_INT             0x40    /* Timer 1 interrupt */
+#define CA2_INT_BIT        0
+#define CA1_INT_BIT        1
+#define SR_INT_BIT         2       /* Shift register full/empty */
+#define CB2_INT_BIT        3
+#define CB1_INT_BIT        4
+#define T2_INT_BIT         5       /* Timer 2 interrupt */
+#define T1_INT_BIT         6       /* Timer 1 interrupt */
+
+#define CA2_INT            BIT(CA2_INT_BIT)
+#define CA1_INT            BIT(CA1_INT_BIT)
+#define SR_INT             BIT(SR_INT_BIT)
+#define CB2_INT            BIT(CB2_INT_BIT)
+#define CB1_INT            BIT(CB1_INT_BIT)
+#define T2_INT             BIT(T2_INT_BIT)
+#define T1_INT             BIT(T1_INT_BIT)
 
 /* Bits in ACR */
 #define T1MODE             0xc0    /* Timer 1 mode */
This page took 0.027575 seconds and 4 git commands to generate.