]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Add rn42_lined(): connection status(GPIO2)
authortmk <nobody@nowhere>
Wed, 23 Jul 2014 03:23:00 +0000 (12:23 +0900)
committertmk <nobody@nowhere>
Wed, 30 Jul 2014 05:38:26 +0000 (14:38 +0900)
keyboard/hhkb_rn42/rn42/rn42.c
keyboard/hhkb_rn42/rn42/rn42.h
keyboard/hhkb_rn42/rn42/rn42_task.c

index 3fcd64ad6a5276b8775d35d1f9b9b106ef6cfb04..e7d8ba45cc23a0bea7d115b10dfc2d0bb4d7622c 100644 (file)
@@ -86,6 +86,11 @@ void rn42_cts_lo(void)
     PORTD &= ~(1<<5);
 }
 
+bool rn42_linked(void)
+{
+    return PINF&(1<<6);
+}
+
 
 static uint8_t keyboard_leds(void) { return 0; }
 
index 4189733b49c926201a5b0834661ce1cff99a232c..72cbb2d724d9f844df0da03647ba87168e3cd027 100644 (file)
@@ -14,5 +14,6 @@ void rn42_disconnect(void);
 bool rn42_rts(void);
 void rn42_cts_hi(void);
 void rn42_cts_lo(void);
+bool rn42_linked(void);
 
 #endif
index 2bc1c7fd0452b0fe9b5b20e5335258b93dbfebc2..437dd46f490983f2512efc02cc00b4bc7f03940e 100644 (file)
@@ -162,8 +162,10 @@ bool command_extra(uint8_t code)
             xprintf("protocol: %s\n", (host_get_driver() == &rn42_driver) ? "RN-42" : "LUFA");
             xprintf("force_usb: %X\n", force_usb);
             xprintf("rn42_autoconnecting(): %X\n", rn42_autoconnecting());
+            xprintf("rn42_linked(): %X\n", rn42_linked());
             xprintf("rn42_rts(): %X\n", rn42_rts());
             xprintf("config_mode: %X\n", config_mode);
+            xprintf("VBUS: %X\n", USBSTA&(1<<VBUS));
             return true;
         case KC_B:
             // battery monitor