diff options
| author | Peter Roe <pete@13bit.me> | 2019-02-02 14:43:58 -0600 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-02-02 12:43:58 -0800 |
| commit | e9c9c3a4fa1f9a3d948b58315b5d85369392fa6a (patch) | |
| tree | aa55074c7184cbe8546798ef3a0a94fd97375c5d | |
| parent | 4e2007b855ab32923b2f85cd1ff5222b8bad7804 (diff) | |
| download | qmk_firmware-e9c9c3a4fa1f9a3d948b58315b5d85369392fa6a.tar.gz qmk_firmware-e9c9c3a4fa1f9a3d948b58315b5d85369392fa6a.zip | |
[Keyboard] ADB converter lock LED fix (#5035)
* 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.
| -rw-r--r-- | keyboards/converter/adb_usb/README.md | 3 | ||||
| -rw-r--r-- | keyboards/converter/adb_usb/led.c | 2 | ||||
| -rw-r--r-- | keyboards/converter/adb_usb/matrix.c | 10 | ||||
| -rw-r--r-- | keyboards/converter/adb_usb/rules.mk | 3 |
4 files changed, 7 insertions, 11 deletions
diff --git a/keyboards/converter/adb_usb/README.md b/keyboards/converter/adb_usb/README.md index ed7175008..8de9b9ad4 100644 --- a/keyboards/converter/adb_usb/README.md +++ b/keyboards/converter/adb_usb/README.md | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ADB-to USB Keyboard Converter | 1 | ADB-to-USB Keyboard Converter |
| 2 | ============================= | 2 | ============================= |
| 3 | 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. | 3 | 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. |
| 4 | 4 | ||
| @@ -81,3 +81,4 @@ though the ADB protocol itself supports it. See protocol/adb.c for more info. | |||
| 81 | QMK Port Changelog | 81 | QMK Port Changelog |
| 82 | --------- | 82 | --------- |
| 83 | - 2018/09/16 - Initial release. | 83 | - 2018/09/16 - Initial release. |
| 84 | - 2018/12/23 - Fixed lock LED support. | ||
diff --git a/keyboards/converter/adb_usb/led.c b/keyboards/converter/adb_usb/led.c index ea9bf77b5..3ee64a8e7 100644 --- a/keyboards/converter/adb_usb/led.c +++ b/keyboards/converter/adb_usb/led.c | |||
| @@ -23,5 +23,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 23 | 23 | ||
| 24 | void led_set(uint8_t usb_led) | 24 | void led_set(uint8_t usb_led) |
| 25 | { | 25 | { |
| 26 | adb_host_kbd_led(ADB_ADDR_KEYBOARD, ~usb_led); | 26 | adb_host_kbd_led(~usb_led); |
| 27 | } | 27 | } |
diff --git a/keyboards/converter/adb_usb/matrix.c b/keyboards/converter/adb_usb/matrix.c index 8ee48bf23..4a70eb502 100644 --- a/keyboards/converter/adb_usb/matrix.c +++ b/keyboards/converter/adb_usb/matrix.c | |||
| @@ -58,26 +58,20 @@ void matrix_scan_user(void) { | |||
| 58 | 58 | ||
| 59 | void matrix_init(void) | 59 | void matrix_init(void) |
| 60 | { | 60 | { |
| 61 | // LED on | ||
| 62 | DDRD |= (1<<6); PORTD |= (1<<6); | ||
| 63 | |||
| 64 | adb_host_init(); | 61 | adb_host_init(); |
| 62 | |||
| 65 | // wait for keyboard to boot up and receive command | 63 | // wait for keyboard to boot up and receive command |
| 66 | _delay_ms(2000); | 64 | _delay_ms(2000); |
| 67 | 65 | ||
| 68 | // initialize matrix state: all keys off | 66 | // initialize matrix state: all keys off |
| 69 | for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00; | 67 | for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00; |
| 70 | 68 | ||
| 71 | led_set(host_keyboard_leds()); | 69 | // debug_enable = true; |
| 72 | |||
| 73 | // debug_enable = false; | ||
| 74 | // debug_matrix = true; | 70 | // debug_matrix = true; |
| 75 | // debug_keyboard = true; | 71 | // debug_keyboard = true; |
| 76 | // debug_mouse = true; | 72 | // debug_mouse = true; |
| 77 | // print("debug enabled.\n"); | 73 | // print("debug enabled.\n"); |
| 78 | 74 | ||
| 79 | // LED off | ||
| 80 | DDRD |= (1<<6); PORTD &= ~(1<<6); | ||
| 81 | matrix_init_quantum(); | 75 | matrix_init_quantum(); |
| 82 | } | 76 | } |
| 83 | 77 | ||
diff --git a/keyboards/converter/adb_usb/rules.mk b/keyboards/converter/adb_usb/rules.mk index 3a9b6dedc..4743b6b08 100644 --- a/keyboards/converter/adb_usb/rules.mk +++ b/keyboards/converter/adb_usb/rules.mk | |||
| @@ -70,4 +70,5 @@ BACKLIGHT_ENABLE = no | |||
| 70 | 70 | ||
| 71 | CUSTOM_MATRIX = yes | 71 | CUSTOM_MATRIX = yes |
| 72 | SRC = matrix.c \ | 72 | SRC = matrix.c \ |
| 73 | adb.c | 73 | adb.c \ |
| 74 | led.c | ||
