diff options
author | tmk <hasu@tmk-kbd.com> | 2015-04-10 01:25:48 +0900 |
---|---|---|
committer | tmk <hasu@tmk-kbd.com> | 2015-04-10 01:25:48 +0900 |
commit | 6746e37088ce8ba03529c1226bd216705edb2b1f (patch) | |
tree | a256db88ec3e9e8b1b70839fcd9459d972ce26e0 /protocol/ps2_io_avr.c | |
parent | b4e2d325f355a4d083106476393775e75e11f284 (diff) |
Remove core library and build files
Diffstat (limited to 'protocol/ps2_io_avr.c')
-rw-r--r-- | protocol/ps2_io_avr.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/protocol/ps2_io_avr.c b/protocol/ps2_io_avr.c deleted file mode 100644 index ed462345ba..0000000000 --- a/protocol/ps2_io_avr.c +++ /dev/null @@ -1,75 +0,0 @@ -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> - -/* 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<<PS2_CLOCK_BIT); - PS2_CLOCK_DDR |= (1<<PS2_CLOCK_BIT); -} - -void clock_hi(void) -{ - /* input with pull up */ - PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); - PS2_CLOCK_PORT |= (1<<PS2_CLOCK_BIT); -} - -bool clock_in(void) -{ - PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); - PS2_CLOCK_PORT |= (1<<PS2_CLOCK_BIT); - _delay_us(1); - return PS2_CLOCK_PIN&(1<<PS2_CLOCK_BIT); -} - -/* - * Data - */ -void data_init(void) -{ -} - -void data_lo(void) -{ - PS2_DATA_PORT &= ~(1<<PS2_DATA_BIT); - PS2_DATA_DDR |= (1<<PS2_DATA_BIT); -} - -void data_hi(void) -{ - /* input with pull up */ - PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); - PS2_DATA_PORT |= (1<<PS2_DATA_BIT); -} - -bool data_in(void) -{ - PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); - PS2_DATA_PORT |= (1<<PS2_DATA_BIT); - _delay_us(1); - return PS2_DATA_PIN&(1<<PS2_DATA_BIT); -} |