summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/ps2_usart.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/protocol/ps2_usart.c')
-rw-r--r--tmk_core/protocol/ps2_usart.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tmk_core/protocol/ps2_usart.c b/tmk_core/protocol/ps2_usart.c
index 6a66dc4a1e..5f70083698 100644
--- a/tmk_core/protocol/ps2_usart.c
+++ b/tmk_core/protocol/ps2_usart.c
@@ -46,6 +46,19 @@ POSSIBILITY OF SUCH DAMAGE.
#include "ps2_io.h"
#include "print.h"
+#ifndef PS2_CLOCK_DDR
+# define PS2_CLOCK_DDR PORTx_ADDRESS(PS2_CLOCK_PIN)
+#endif
+#ifndef PS2_CLOCK_BIT
+# define PS2_CLOCK_BIT (PS2_CLOCK_PIN & 0xF)
+#endif
+#ifndef PS2_DATA_DDR
+# define PS2_DATA_DDR PORTx_ADDRESS(PS2_DATA_PIN)
+#endif
+#ifndef PS2_DATA_BIT
+# define PS2_DATA_BIT (PS2_DATA_PIN & 0xF)
+#endif
+
#define WAIT(stat, us, err) \
do { \
if (!wait_##stat(us)) { \