]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
[Keyboard] ADB converter lock LED fix (#5035)
authorPeter Roe <pete@13bit.me>
Sat, 2 Feb 2019 20:43:58 +0000 (14:43 -0600)
committerDrashna Jaelre <drashna@live.com>
Sat, 2 Feb 2019 20:43:58 +0000 (12:43 -0800)
* Enabled ADB lock LEDs

* Updated converter/adb_usb/README.md

Fixed a typo in the readme title. Added the lock LED fix to the changelog.

keyboards/converter/adb_usb/README.md
keyboards/converter/adb_usb/led.c
keyboards/converter/adb_usb/matrix.c
keyboards/converter/adb_usb/rules.mk

index ed71750080754f977282b35531e43a3f1ac2026f..8de9b9ad46d15cb51d223bb1a14cc209fecb63b7 100644 (file)
@@ -1,4 +1,4 @@
-ADB-to USB Keyboard Converter
+ADB-to-USB Keyboard Converter
 =============================
 This firmware converts Apple Desktop Bus (ADB) keyboard protocol to USB so that you can use an ADB keyboard on a modern computer. It works on the PJRC Teensy 2.0 and other USB AVR MCUs (ATMega32U4, AT90USB64/128, etc) and needs at least 10KB of flash memory.
 
@@ -81,3 +81,4 @@ though the ADB protocol itself supports it. See protocol/adb.c for more info.
 QMK Port Changelog
 ---------
 - 2018/09/16 - Initial release.
+- 2018/12/23 - Fixed lock LED support.
index ea9bf77b5c1e0f52af171542e999586e562fab06..3ee64a8e7d319b1b3164fe6b88242b6e25f6d377 100644 (file)
@@ -23,5 +23,5 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 void led_set(uint8_t usb_led)
 {
-    adb_host_kbd_led(ADB_ADDR_KEYBOARD, ~usb_led);
+    adb_host_kbd_led(~usb_led);
 }
index 8ee48bf23f2cef5430d6ec6ee3ce4d867c5815f8..4a70eb5021371ece2cf4d0a4f1b708543fde3384 100644 (file)
@@ -58,26 +58,20 @@ void matrix_scan_user(void) {
 
 void matrix_init(void)
 {
-    // LED on
-    DDRD |= (1<<6); PORTD |= (1<<6);
-
     adb_host_init();
+
     // wait for keyboard to boot up and receive command
     _delay_ms(2000);
 
     // initialize matrix state: all keys off
     for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
 
-    led_set(host_keyboard_leds());
-
-    // debug_enable = false;
+    // debug_enable = true;
     // debug_matrix = true;
     // debug_keyboard = true;
     // debug_mouse = true;
     // print("debug enabled.\n");
 
-    // LED off
-    DDRD |= (1<<6); PORTD &= ~(1<<6);
     matrix_init_quantum();
 }
 
index 3a9b6dedcca5fc2bcd042314a8a03fc26f5aab28..4743b6b08f12982ad2cc169fb7fa0f0817188f9c 100644 (file)
@@ -70,4 +70,5 @@ BACKLIGHT_ENABLE      = no
 
 CUSTOM_MATRIX = yes
 SRC = matrix.c \
-      adb.c
+      adb.c \
+                       led.c