summaryrefslogtreecommitdiffstats
path: root/sw/z80/drivers/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sw/z80/drivers/include/ctc.h (renamed from sw/z80/kernel/include/drivers/ctc.h)0
-rw-r--r--sw/z80/drivers/include/pio.h (renamed from sw/z80/kernel/include/drivers/pio.h)7
-rw-r--r--sw/z80/drivers/include/usart.h (renamed from sw/z80/kernel/include/drivers/usart.h)9
3 files changed, 10 insertions, 6 deletions
diff --git a/sw/z80/kernel/include/drivers/ctc.h b/sw/z80/drivers/include/ctc.h
index 80e8b4b..80e8b4b 100644
--- a/sw/z80/kernel/include/drivers/ctc.h
+++ b/sw/z80/drivers/include/ctc.h
diff --git a/sw/z80/kernel/include/drivers/pio.h b/sw/z80/drivers/include/pio.h
index 0df2ed0..e91029c 100644
--- a/sw/z80/kernel/include/drivers/pio.h
+++ b/sw/z80/drivers/include/pio.h
@@ -1,8 +1,8 @@
#ifndef __PIO_H__
#define __PIO_H__
-#include "devices.h"
-#include "types.h"
+#include "addresses.h"
+#include <stdint.h>
#define PIO_A 0
#define PIO_B 1
@@ -20,6 +20,7 @@
inline void _pio_data(int port, uint8_t data);
inline void _pio_control(int port, uint8_t cmd);
+/* the last argument is needed only for IO mode */
void pio_set_mode(int port, int mode, uint8_t io);
void pio_set_interrupts(int port, int control);
@@ -34,4 +35,4 @@ inline void pio_write_pin(int port, uint8_t pin);
// TODO: implement mode (in/out/both) and interrupt vector
-#endif // __PIO_H__
+#endif /* __PIO_H__ */
diff --git a/sw/z80/kernel/include/drivers/usart.h b/sw/z80/drivers/include/usart.h
index b85ee3e..bb06aab 100644
--- a/sw/z80/kernel/include/drivers/usart.h
+++ b/sw/z80/drivers/include/usart.h
@@ -1,10 +1,10 @@
#ifndef __USART_H__
#define __USART_H__
-#include "types.h"
-#include "devices.h"
+#include "addresses.h"
-#include "string.h"
+#include <stdint.h>
+#include <string.h>
// baudrate clock divisors
// values from TL16C550C datasheet (table 9 for 1.8432 MHz crystal)
@@ -48,6 +48,9 @@
#define USART_AUTOFLOW_CTS 2
#define USART_AUTOFLOW_OFF 0
+typedef unsigned int uint;
+typedef uint8_t register_t;
+
/* stuctures for usart registers */
struct IER
{