summaryrefslogtreecommitdiffstats
path: root/src/upio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/upio.c')
-rw-r--r--src/upio.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/upio.c b/src/upio.c
index 2de171c..e6a0444 100644
--- a/src/upio.c
+++ b/src/upio.c
@@ -434,9 +434,10 @@ void upio_set(uint8_t pio, uint8_t action, uint8_t polarity)
/*
* Kick proc btwrite node only at UPIO_ASSERT
*/
+#if (BT_WAKE_VIA_PROC_NOTIFY_DEASSERT == FALSE)
if (action == UPIO_DEASSERT)
return;
-
+#endif
fd = open(VENDOR_BTWRITE_PROC_NODE, O_WRONLY);
if (fd < 0)
@@ -445,8 +446,12 @@ void upio_set(uint8_t pio, uint8_t action, uint8_t polarity)
VENDOR_BTWRITE_PROC_NODE, strerror(errno), errno);
return;
}
-
- buffer = '1';
+#if (BT_WAKE_VIA_PROC_NOTIFY_DEASSERT == TRUE)
+ if (action == UPIO_DEASSERT)
+ buffer = '0';
+ else
+#endif
+ buffer = '1';
if (write(fd, &buffer, 1) < 0)
{