diff options
author | Leo C | 2014-07-02 15:24:17 +0200 |
---|---|---|
committer | Leo C | 2014-07-02 15:24:17 +0200 |
commit | 0c5890bb8c70f34026315c9c5a1878cfd0bbea0d (patch) | |
tree | 25219cb3c74f5038f323ad7d33d9a878d3a034e0 /avr/z80-if.h | |
parent | 70da9bec89594932d89d8a8a0815e127f3359365 (diff) | |
download | z180-stamp-0c5890bb8c70f34026315c9c5a1878cfd0bbea0d.zip |
New sub dir: avr.
Diffstat (limited to 'avr/z80-if.h')
-rw-r--r-- | avr/z80-if.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/avr/z80-if.h b/avr/z80-if.h new file mode 100644 index 0000000..1068225 --- /dev/null +++ b/avr/z80-if.h @@ -0,0 +1,27 @@ + +typedef enum {LOW, HIGH} level_t; + +void z80_setup_bus(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(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; + +void z80_memfifo_init(const fifo_t f, uint32_t adr); +int z80_memfifo_is_empty(const fifo_t f); +int z80_memfifo_is_full(const fifo_t f); +uint8_t z80_memfifo_getc(const fifo_t f); +void z80_memfifo_putc(fifo_t f, uint8_t val); + +void z80_setup_msg_fifo(void); +void z80_init_msg_fifo(uint32_t addr); +int z80_msg_fifo_getc(void); |