summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeo C2014-10-23 02:25:00 +0200
committerLeo C2014-10-23 02:25:00 +0200
commit89adce76dd02f2076ec6de1c6b434bc1f29512f4 (patch)
tree33badc10f344a4648a41dee78b0a7ea24ae36144 /include
parent6a4e9540b950d871ea8fa072b195490a231b251d (diff)
downloadz180-stamp-89adce76dd02f2076ec6de1c6b434bc1f29512f4.zip
working host communication, new command: connect
Diffstat (limited to 'include')
-rw-r--r--include/background.h4
-rw-r--r--include/common.h1
-rw-r--r--include/config.h1
-rw-r--r--include/z180-serv.h7
-rw-r--r--include/z80-if.h9
5 files changed, 19 insertions, 3 deletions
diff --git a/include/background.h b/include/background.h
index a624dbb..8a430b3 100644
--- a/include/background.h
+++ b/include/background.h
@@ -3,7 +3,9 @@
typedef int (*bg_func)(int);
-int bg_register(bg_func f);
+int bg_register(bg_func f, int initval);
+int bg_setstat(int handle, int val);
+int bg_getstat(int handle);
void bg_shed(void);
#endif /* BACKGROUND_H */
diff --git a/include/common.h b/include/common.h
index d054ad1..ef5af12 100644
--- a/include/common.h
+++ b/include/common.h
@@ -38,6 +38,7 @@ extern volatile uint_least8_t Stat;
#define S_10MS_TO (1<<0)
#define S_MSG_PENDING (2<<0)
+#define S_CON_PENDING (3<<0)
static inline
void my_puts(const char *s)
diff --git a/include/config.h b/include/config.h
index c0777a8..82dbf81 100644
--- a/include/config.h
+++ b/include/config.h
@@ -32,6 +32,7 @@
#define CONFIG_SYS_ENV_NAMELEN 16
#define CONFIG_SYS_PROMPT "=> "
+#define CONFIG_ESC_CHAR ('^'-0x40)
/* TODO: */
diff --git a/include/z180-serv.h b/include/z180-serv.h
new file mode 100644
index 0000000..af4b1c0
--- /dev/null
+++ b/include/z180-serv.h
@@ -0,0 +1,7 @@
+#ifndef Z180_SERV_H
+#define Z180_SERV_H
+
+void setup_z180_serv(void);
+void restart_z180_serv(void);
+
+#endif /* Z180_SERV_H */
diff --git a/include/z80-if.h b/include/z80-if.h
index b4a4e6f..24fda5d 100644
--- a/include/z80-if.h
+++ b/include/z80-if.h
@@ -34,11 +34,16 @@ void z80_memset(uint32_t addr, uint8_t data, uint32_t length);
void z80_write_block(const FLASH uint8_t *src, uint32_t dest, uint32_t length);
-typedef enum fifo_t {fifo_in, fifo_out, NUM_FIFOS} fifo_t;
+typedef enum fifo_t {
+ fifo_msgin, fifo_msgout,
+ fifo_conout, fifo_conin,
+ 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);
+int z80_memfifo_getc(const fifo_t f);
+uint8_t z80_memfifo_getc_wait(const fifo_t f);
void z80_memfifo_putc(fifo_t f, uint8_t val);