summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/ps2_io_avr.c
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-10-20 21:18:49 +0100
committerGitHub <noreply@github.com>2021-10-20 21:18:49 +0100
commitd4be4b67a251ecc046d857c5cd00cfb37c394ab7 (patch)
tree15f6dd05ec293081782a9b42a30e1a81b33b6aa0 /tmk_core/protocol/ps2_io_avr.c
parent5500c428dd41348243e8a1695986b0da070e2ffa (diff)
Relocate PS2 code (#14895)
* Relocate ps2 protocol code * clang * Move makefile logic
Diffstat (limited to 'tmk_core/protocol/ps2_io_avr.c')
-rw-r--r--tmk_core/protocol/ps2_io_avr.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/tmk_core/protocol/ps2_io_avr.c b/tmk_core/protocol/ps2_io_avr.c
deleted file mode 100644
index 7c826fbf1a..0000000000
--- a/tmk_core/protocol/ps2_io_avr.c
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <stdbool.h>
-#include "ps2_io.h"
-#include "gpio.h"
-#include "wait.h"
-
-/* Check port settings for clock and data line */
-#if !(defined(PS2_CLOCK_PIN))
-# error "PS/2 clock setting is required in config.h"
-#endif
-
-#if !(defined(PS2_DATA_PIN))
-# error "PS/2 data setting is required in config.h"
-#endif
-
-/*
- * Clock
- */
-void clock_init(void) {}
-
-void clock_lo(void) {
- // Transition from input with pull-up to output low via Hi-Z instead of output high
- writePinLow(PS2_CLOCK_PIN);
- setPinOutput(PS2_CLOCK_PIN);
-}
-
-void clock_hi(void) { setPinInputHigh(PS2_CLOCK_PIN); }
-
-bool clock_in(void) {
- setPinInputHigh(PS2_CLOCK_PIN);
- wait_us(1);
- return readPin(PS2_CLOCK_PIN);
-}
-
-/*
- * Data
- */
-void data_init(void) {}
-
-void data_lo(void) {
- // Transition from input with pull-up to output low via Hi-Z instead of output high
- writePinLow(PS2_DATA_PIN);
- setPinOutput(PS2_DATA_PIN);
-}
-
-void data_hi(void) { setPinInputHigh(PS2_DATA_PIN); }
-
-bool data_in(void) {
- setPinInputHigh(PS2_DATA_PIN);
- wait_us(1);
- return readPin(PS2_DATA_PIN);
-}