]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/z80-if.h
Merge tag 'fatfs-0.10b'
[z180-stamp.git] / avr / z80-if.h
index ecb6712188ad5c103d292c0a8cafc633b7c4bb01..b02fe230c68eaec191c99f5650c23434b17074c2 100644 (file)
@@ -1,17 +1,36 @@
 
+#define ZST_ACQUIRED   0x01
+#define ZST_RUNNING    0x02
+
+typedef enum { 
+       RESET           = 0x00,
+       RESET_AQRD      = ZST_ACQUIRED,
+       RUNNING         = ZST_RUNNING,
+       RUNNING_AQRD    = ZST_RUNNING | ZST_ACQUIRED,
+} zstate_t;
+
+typedef enum { 
+       Reset,
+       Request,
+       Release,
+       Run,
+       Restart,
+       M_Cycle
+} bus_cmd_t;
+
 typedef enum {LOW, HIGH} level_t;
 
+zstate_t z80_bus_state(void);
+zstate_t z80_bus_cmd(bus_cmd_t cmd);
 void z80_setup_bus(void);
+int z80_stat_reset(void);
+//void z80_busreq(level_t level);
+int z80_stat_halt(void);
+
 void z80_write(uint32_t addr, uint8_t data);
 uint8_t z80_read(uint32_t addr);
-void z80_request_bus(void);
-void z80_release_bus(void);
 void z80_memset(uint32_t addr, uint8_t data, uint32_t length);
-void z80_reset(level_t level);
-void z80_reset_pulse(void);
-//void z80_busreq(level_t level);
 void z80_write_block(const FLASH uint8_t *src, uint32_t dest, uint32_t length);
-int z80_stat_halt(void);
 
 
 typedef enum fifo_t {fifo_in, fifo_out, NUM_FIFOS} fifo_t;