From 4c8e0fd0bd1712421f957ec5e0ca16fc6bbb3856 Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 19 Jun 2014 16:13:35 +0900 Subject: Port ps2_usb to mbed --- protocol/ps2.h | 65 +++++++--------------------------------------------------- 1 file changed, 7 insertions(+), 58 deletions(-) (limited to 'protocol/ps2.h') diff --git a/protocol/ps2.h b/protocol/ps2.h index 483eea7209..acde679cf4 100644 --- a/protocol/ps2.h +++ b/protocol/ps2.h @@ -39,8 +39,9 @@ POSSIBILITY OF SUCH DAMAGE. #define PS2_H #include -#include -#include +#include "wait.h" +#include "ps2_io.h" +#include "print.h" /* * Primitive PS/2 Library for AVR @@ -92,79 +93,27 @@ uint8_t ps2_host_recv(void); void ps2_host_set_led(uint8_t usb_led); -/* Check port settings for clock and data line */ -#if !(defined(PS2_CLOCK_PORT) && \ - defined(PS2_CLOCK_PIN) && \ - defined(PS2_CLOCK_DDR) && \ - defined(PS2_CLOCK_BIT)) -# error "PS/2 clock port setting is required in config.h" -#endif - -#if !(defined(PS2_DATA_PORT) && \ - defined(PS2_DATA_PIN) && \ - defined(PS2_DATA_DDR) && \ - defined(PS2_DATA_BIT)) -# error "PS/2 data port setting is required in config.h" -#endif - /*-------------------------------------------------------------------- * static functions *------------------------------------------------------------------*/ -static inline void clock_lo(void) -{ - PS2_CLOCK_PORT &= ~(1<