From a074364c3731d66b56d988c8a6c960a83ea0e0a1 Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 10 Apr 2015 01:32:04 +0900 Subject: Squashed 'tmk_core/' content from commit 05caacc git-subtree-dir: tmk_core git-subtree-split: 05caaccec92694bb24c8c3c3a9940b96efd4605c --- protocol/ps2_io_avr.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 protocol/ps2_io_avr.c (limited to 'protocol/ps2_io_avr.c') diff --git a/protocol/ps2_io_avr.c b/protocol/ps2_io_avr.c new file mode 100644 index 0000000000..ed462345ba --- /dev/null +++ b/protocol/ps2_io_avr.c @@ -0,0 +1,75 @@ +#include +#include +#include + +/* 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 + + +/* + * Clock + */ +void clock_init(void) +{ +} + +void clock_lo(void) +{ + PS2_CLOCK_PORT &= ~(1<