]>
cloudbase.mooo.com Git - z180-stamp.git/blob - avr/z80-if.h
2 #define ZST_ACQUIRED 0x01
3 #define ZST_RUNNING 0x02
7 RESET_AQRD
= ZST_ACQUIRED
,
9 RUN_AQRD
= ZST_RUNNING
| ZST_ACQUIRED
,
12 typedef enum {LOW
, HIGH
} level_t
;
14 zstate_t
z80_runstate(void);
15 void z80_setup_bus(void);
16 void z80_request_bus(void);
17 void z80_release_bus(void);
18 zstate_t
z80_request_bus_save(void);
19 void z80_release_bus_save(zstate_t prev
);
21 void z80_reset_pulse(void);
23 int z80_stat_reset(void);
24 //void z80_busreq(level_t level);
25 void z80_busreq_hpulse(void);
26 int z80_stat_halt(void);
28 void z80_write(uint32_t addr
, uint8_t data
);
29 uint8_t z80_read(uint32_t addr
);
30 void z80_memset(uint32_t addr
, uint8_t data
, uint32_t length
);
31 void z80_write_block(const FLASH
uint8_t *src
, uint32_t dest
, uint32_t length
);
34 typedef enum fifo_t
{fifo_in
, fifo_out
, NUM_FIFOS
} fifo_t
;
36 void z80_memfifo_init(const fifo_t f
, uint32_t adr
);
37 int z80_memfifo_is_empty(const fifo_t f
);
38 int z80_memfifo_is_full(const fifo_t f
);
39 uint8_t z80_memfifo_getc(const fifo_t f
);
40 void z80_memfifo_putc(fifo_t f
, uint8_t val
);
42 void z80_setup_msg_fifo(void);
43 void z80_init_msg_fifo(uint32_t addr
);
44 int z80_msg_fifo_getc(void);