summaryrefslogtreecommitdiff
path: root/emu/7seg.h
diff options
context:
space:
mode:
Diffstat (limited to 'emu/7seg.h')
-rw-r--r--emu/7seg.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/emu/7seg.h b/emu/7seg.h
index 0256f83..f6e1e98 100644
--- a/emu/7seg.h
+++ b/emu/7seg.h
@@ -6,6 +6,10 @@
#include <stdint.h>
#include <stdbool.h>
+#ifdef WITH_GUI
+#include <SDL.h>
+#endif
+
// VIA connected on PORTA to 3 wires leading to the 3 coupled 74HC595
// shift register which enable the ROM address lines to read the LED
// segment data (cells 0-15 contain the encoded 7 segments of 16 hexdigits)
@@ -16,9 +20,6 @@
// +---- RCLK
// +----- SRCLK
enum {
- PORTA = 0x01,
- DDRA = 0x03,
-
SER = 0x01,
RCLK = 0x02,
SRCLK = 0x04
@@ -27,17 +28,14 @@ enum {
typedef struct seg7_t
{
device_t base;
-
- uint16_t addr;
-
- uint8_t ddr;
+
uint16_t shift;
uint16_t latch;
bool debug;
} seg7_t;
-void seg7_init( seg7_t *seg, uint16_t addr, bool initialize );
+void seg7_init( seg7_t *seg, bool initialize );
uint8_t seg7_read( void *obj, uint16_t addr );
void seg7_write( void *obj, uint16_t addr, uint8_t data );