diff options
Diffstat (limited to 'tmk_core/protocol/ps2_io_chibios.c')
-rw-r--r-- | tmk_core/protocol/ps2_io_chibios.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tmk_core/protocol/ps2_io_chibios.c b/tmk_core/protocol/ps2_io_chibios.c index b672bd1f47..906d85d848 100644 --- a/tmk_core/protocol/ps2_io_chibios.c +++ b/tmk_core/protocol/ps2_io_chibios.c @@ -6,11 +6,11 @@ #include "hal.h" /* Check port settings for clock and data line */ -#if !(defined(PS2_CLOCK)) +#if !(defined(PS2_CLOCK_PIN)) # error "PS/2 clock setting is required in config.h" #endif -#if !(defined(PS2_DATA)) +#if !(defined(PS2_DATA_PIN)) # error "PS/2 data setting is required in config.h" #endif @@ -20,18 +20,18 @@ void clock_init(void) {} void clock_lo(void) { - palSetLineMode(PS2_CLOCK, PAL_MODE_OUTPUT_OPENDRAIN); - palWriteLine(PS2_CLOCK, PAL_LOW); + palSetLineMode(PS2_CLOCK_PIN, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_CLOCK_PIN, PAL_LOW); } void clock_hi(void) { - palSetLineMode(PS2_CLOCK, PAL_MODE_OUTPUT_OPENDRAIN); - palWriteLine(PS2_CLOCK, PAL_HIGH); + palSetLineMode(PS2_CLOCK_PIN, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_CLOCK_PIN, PAL_HIGH); } bool clock_in(void) { - palSetLineMode(PS2_CLOCK, PAL_MODE_INPUT); - return palReadLine(PS2_CLOCK); + palSetLineMode(PS2_CLOCK_PIN, PAL_MODE_INPUT); + return palReadLine(PS2_CLOCK_PIN); } /* @@ -40,16 +40,16 @@ bool clock_in(void) { void data_init(void) {} void data_lo(void) { - palSetLineMode(PS2_DATA, PAL_MODE_OUTPUT_OPENDRAIN); - palWriteLine(PS2_DATA, PAL_LOW); + palSetLineMode(PS2_DATA_PIN, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_DATA_PIN, PAL_LOW); } void data_hi(void) { - palSetLineMode(PS2_DATA, PAL_MODE_OUTPUT_OPENDRAIN); - palWriteLine(PS2_DATA, PAL_HIGH); + palSetLineMode(PS2_DATA_PIN, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_DATA_PIN, PAL_HIGH); } bool data_in(void) { - palSetLineMode(PS2_DATA, PAL_MODE_INPUT); - return palReadLine(PS2_DATA); + palSetLineMode(PS2_DATA_PIN, PAL_MODE_INPUT); + return palReadLine(PS2_DATA_PIN); } |