summaryrefslogtreecommitdiffstats
path: root/protocol
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2012-10-14 20:03:26 +0900
committertmk <nobody@nowhere>2012-10-14 20:06:50 +0900
commit1ac674db66e47e69b87c4c78566932ab73225836 (patch)
treed4005c76a5c2f5ec06c5a74a27460a764c9589d6 /protocol
parent9f05dc6f444e159af3805baf5117be4d0da2d349 (diff)
Fix PS/2 protocol build options
Diffstat (limited to 'protocol')
-rw-r--r--protocol/ps2.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/protocol/ps2.c b/protocol/ps2.c
index 8a05916210..cf7b1f43ce 100644
--- a/protocol/ps2.c
+++ b/protocol/ps2.c
@@ -89,8 +89,9 @@ uint8_t ps2_error = PS2_ERR_NONE;
void ps2_host_init(void)
{
-#ifdef PS2_INT_ENABLE
- PS2_INT_ENABLE();
+#ifdef PS2_USE_INT
+ PS2_INT_INIT();
+ PS2_INT_ON();
idle();
#else
inhibit();
@@ -103,8 +104,8 @@ uint8_t ps2_host_send(uint8_t data)
uint8_t res = 0;
bool parity = true;
ps2_error = PS2_ERR_NONE;
-#ifdef PS2_INT_DISABLE
- PS2_INT_DISABLE();
+#ifdef PS2_USE_INT
+ PS2_INT_OFF();
#endif
/* terminate a transmission if we have */
inhibit();
@@ -144,8 +145,8 @@ uint8_t ps2_host_send(uint8_t data)
res = ps2_host_recv_response();
ERROR:
-#ifdef PS2_INT_ENABLE
- PS2_INT_ENABLE();
+#ifdef PS2_USE_INT
+ PS2_INT_ON();
idle();
#else
inhibit();
@@ -173,7 +174,7 @@ uint8_t ps2_host_recv_response(void)
return data;
}
-#ifndef PS2_INT_VECT
+#ifndef PS2_USE_INT
uint8_t ps2_host_recv(void)
{
return ps2_host_recv_response();