diff options
author | Jack Humbert <jack.humb@gmail.com> | 2015-10-27 14:52:18 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2015-10-27 14:52:18 -0400 |
commit | d311fd8d1a0af3b767d26b520d399bf0db22f058 (patch) | |
tree | b9de5704143ac205b4e26222f9d7551e9b161924 /protocol/ps2_io_mbed.c | |
parent | a766918d5c48204375f4c207b30bbbf1389df14f (diff) | |
parent | 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b (diff) |
Merge pull request #34 from jackhumbert/tmk-master
merging from tmk, new_project script and template
Diffstat (limited to 'protocol/ps2_io_mbed.c')
-rw-r--r-- | protocol/ps2_io_mbed.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/protocol/ps2_io_mbed.c b/protocol/ps2_io_mbed.c deleted file mode 100644 index 83bdcef7f5..0000000000 --- a/protocol/ps2_io_mbed.c +++ /dev/null @@ -1,60 +0,0 @@ -#include <stdbool.h> -#include "ps2_io.h" -#include "gpio_api.h" - - -static gpio_t clock; -static gpio_t data; - -/* - * Clock - */ -void clock_init(void) -{ - gpio_init(&clock, P0_9); - gpio_mode(&clock, OpenDrain|PullNone); -} - -void clock_lo(void) -{ - gpio_dir(&clock, PIN_OUTPUT); - gpio_write(&clock, 0); -} -void clock_hi(void) -{ - gpio_dir(&clock, PIN_OUTPUT); - gpio_write(&clock, 1); -} - -bool clock_in(void) -{ - gpio_dir(&clock, PIN_INPUT); - return gpio_read(&clock); -} - -/* - * Data - */ -void data_init(void) -{ - gpio_init(&data, P0_8); - gpio_mode(&data, OpenDrain|PullNone); -} - -void data_lo(void) -{ - gpio_dir(&data, PIN_OUTPUT); - gpio_write(&data, 0); -} - -void data_hi(void) -{ - gpio_dir(&data, PIN_OUTPUT); - gpio_write(&data, 1); -} - -bool data_in(void) -{ - gpio_dir(&data, PIN_INPUT); - return gpio_read(&data); -} |