summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmk <hasu@tmk-kbd.com>2015-05-13 15:59:49 +0900
committertmk <hasu@tmk-kbd.com>2015-05-13 15:59:49 +0900
commitb8fba54a20ef940565c1b443891d7c94a91cf1fb (patch)
tree7f1736b429d6584237d8d8386bbdba3e0f3a7218
parent67137a908aaf22fbd0509fbc127a092b9c0ff84f (diff)
downloadqmk_firmware-b8fba54a20ef940565c1b443891d7c94a91cf1fb.tar.gz
qmk_firmware-b8fba54a20ef940565c1b443891d7c94a91cf1fb.zip
usb_usb: Change debug LED pin config
-rw-r--r--converter/usb_usb/main.cpp23
-rw-r--r--tmk_core/protocol/usb_hid/leonardo_led.h10
2 files changed, 22 insertions, 11 deletions
diff --git a/converter/usb_usb/main.cpp b/converter/usb_usb/main.cpp
index 011baf1d66..57a5de3d35 100644
--- a/converter/usb_usb/main.cpp
+++ b/converter/usb_usb/main.cpp
@@ -18,7 +18,28 @@
#include "debug.h"
#include "keyboard.h"
-#include "leonardo_led.h"
+
+/* LED ping configuration */
+#define TMK_LED
+//#define LEONARDO_LED
+#if defined(TMK_LED)
+// For TMK converter and Teensy
+#define LED_TX_INIT (DDRD |= (1<<6))
+#define LED_TX_ON (PORTD |= (1<<6))
+#define LED_TX_OFF (PORTD &= ~(1<<6))
+#define LED_TX_TOGGLE (PORTD ^= (1<<6))
+#elif defined(LEONARDO_LED)
+// For Leonardo(TX LED)
+#define LED_TX_INIT (DDRD |= (1<<5))
+#define LED_TX_ON (PORTD &= ~(1<<5))
+#define LED_TX_OFF (PORTD |= (1<<5))
+#define LED_TX_TOGGLE (PORTD ^= (1<<5))
+#else
+#define LED_TX_INIT
+#define LED_TX_ON
+#define LED_TX_OFF
+#define LED_TX_TOGGLE
+#endif
static USB usb_host;
diff --git a/tmk_core/protocol/usb_hid/leonardo_led.h b/tmk_core/protocol/usb_hid/leonardo_led.h
deleted file mode 100644
index 6f67a88f5b..0000000000
--- a/tmk_core/protocol/usb_hid/leonardo_led.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef LEONARDO_LED_H
-#define LEONARDO_LED_H
-
-// Leonardo "TX" LED for debug
-#define LED_TX_INIT (DDRD |= (1<<5))
-#define LED_TX_ON (PORTD &= ~(1<<5))
-#define LED_TX_OFF (PORTD |= (1<<5))
-#define LED_TX_TOGGLE (PORTD ^= (1<<5))
-
-#endif