]> git.friedersdorff.com Git - max/tmk_keyboard.git/log
max/tmk_keyboard.git
3 years agoadb_usb: Add Apple ISO key support
tmk [Mon, 4 Jan 2021 13:00:08 +0000 (22:00 +0900)]
adb_usb: Add Apple ISO key support

Scan code 2A of Apple ISO is translated to 70 and mapped to NUHS.
And rewrite UNIMAP_ADB() based on ADB scan codes.

3 years agoadb_usb: Add scan code print
tmk [Mon, 4 Jan 2021 06:53:21 +0000 (15:53 +0900)]
adb_usb: Add scan code print

3 years agousb_usb: Update prebuilt firmware files
tmk [Thu, 24 Dec 2020 14:22:55 +0000 (23:22 +0900)]
usb_usb: Update prebuilt firmware files

3 years agousb_usb: Update USB_Host_Shield_2.0
tmk [Thu, 24 Dec 2020 14:19:36 +0000 (23:19 +0900)]
usb_usb: Update USB_Host_Shield_2.0

Fix for STALL at GET DESCRIPTOR(CONFIGURATION)
https://github.com/tmk/USB_Host_Shield_2.0/issues/4

3 years agoibmpc_usb: Fix comment of scan code mapping
tmk [Mon, 21 Dec 2020 06:35:44 +0000 (15:35 +0900)]
ibmpc_usb: Fix comment of scan code mapping

3 years agopc98_usb: Add prebuilt firmware files
tmk [Wed, 9 Dec 2020 04:16:03 +0000 (13:16 +0900)]
pc98_usb: Add prebuilt firmware files

4 years agoibmpc_usb: Update prebuilt firmware files
tmk [Sun, 22 Nov 2020 13:01:42 +0000 (22:01 +0900)]
ibmpc_usb: Update prebuilt firmware files

4 years agoibmpc_usb: Add info to debug print
tmk [Mon, 16 Nov 2020 02:32:53 +0000 (11:32 +0900)]
ibmpc_usb: Add info to debug print

4 years agoibmpc: Add adhoc fix for Z-150 AT send
tmk [Mon, 16 Nov 2020 03:46:01 +0000 (12:46 +0900)]
ibmpc: Add adhoc fix for Z-150 AT send

This is not confirmed yet, test report is needed.

4 years agoibmpc_usb: Add Z-150 AT support
tmk [Mon, 16 Nov 2020 02:32:08 +0000 (11:32 +0900)]
ibmpc_usb: Add Z-150 AT support

4 years agoxt_usb: Remove prebuilt firmware file
tmk [Sat, 21 Nov 2020 19:32:23 +0000 (04:32 +0900)]
xt_usb: Remove prebuilt firmware file

4 years agoibmpc_usb: Update prebuilt firmware files
tmk [Sat, 21 Nov 2020 19:27:39 +0000 (04:27 +0900)]
ibmpc_usb: Update prebuilt firmware files

4 years agoxt_usb: Fix Pause of Code Set1(XT)
tmk [Tue, 17 Nov 2020 04:09:47 +0000 (13:09 +0900)]
xt_usb: Fix Pause of Code Set1(XT)

4 years agoibmpc_usb: Fix Pause of Code Set1(XT)
tmk [Tue, 17 Nov 2020 03:55:10 +0000 (12:55 +0900)]
ibmpc_usb: Fix Pause of Code Set1(XT)

https://geekhack.org/index.php?topic=17458.msg2980704#msg2980704

4 years agousb_usb: Update prebuilt firmware files
tmk [Sat, 7 Nov 2020 09:12:02 +0000 (18:12 +0900)]
usb_usb: Update prebuilt firmware files

4 years agocore: Fix TAP_KEY(CapsLock) for MacOS #659
tmk [Sat, 7 Nov 2020 05:59:16 +0000 (14:59 +0900)]
core: Fix TAP_KEY(CapsLock) for MacOS #659

4 years agocore: Clean up code of Locking key support
tmk [Sat, 7 Nov 2020 07:39:15 +0000 (16:39 +0900)]
core: Clean up code of Locking key support

4 years agousb_usb: Add Mechanical Locking key support
tmk [Sat, 7 Nov 2020 08:16:20 +0000 (17:16 +0900)]
usb_usb: Add Mechanical Locking key support

4 years agousb_usb: Update prebuilt firmware files
tmk [Thu, 5 Nov 2020 15:42:09 +0000 (00:42 +0900)]
usb_usb: Update prebuilt firmware files

4 years agousb_hid: Update and fix USB Host Shield lib
tmk [Sat, 31 Oct 2020 10:29:33 +0000 (19:29 +0900)]
usb_hid: Update and fix USB Host Shield lib

- Fix TOGGLE Error
- Fix HUBPRE
- Update from upstream repo

4 years agousb_usb: Update Makefile.debug
tmk [Thu, 22 Oct 2020 13:10:30 +0000 (22:10 +0900)]
usb_usb: Update Makefile.debug

enable debug print on USB Host lib and disable on LUFA

4 years agousb_hid: Update arduino cores to 1.8.13
tmk [Mon, 26 Oct 2020 18:47:40 +0000 (03:47 +0900)]
usb_hid: Update arduino cores to 1.8.13

4 years agousb_hid: Delete arduino cores 1.0.1
tmk [Mon, 26 Oct 2020 18:45:34 +0000 (03:45 +0900)]
usb_hid: Delete arduino cores 1.0.1

4 years agoxt_usb: Fix comment of scancode
tmk [Tue, 12 Nov 2019 02:28:49 +0000 (11:28 +0900)]
xt_usb: Fix comment of scancode

4 years agoibmpc: Fix XT reset comment and add inhibit_xt()
tmk [Mon, 26 Oct 2020 17:33:33 +0000 (02:33 +0900)]
ibmpc: Fix XT reset comment and add inhibit_xt()

4 years agoxt_usb: Fix XT soft reset
tmk [Mon, 26 Oct 2020 17:15:42 +0000 (02:15 +0900)]
xt_usb: Fix XT soft reset

Data line should be hi while Clock line is low
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol#keyboard-soft-reset

4 years agovusb: Fix keyboard_protocol and keyboard_idle #547
tmk [Mon, 27 Jul 2020 01:02:38 +0000 (10:02 +0900)]
vusb: Fix keyboard_protocol and keyboard_idle #547

4 years agoibmpc_usb: Update prebuilt firmware files
tmk [Sun, 5 Jul 2020 03:56:43 +0000 (12:56 +0900)]
ibmpc_usb: Update prebuilt firmware files

4 years agoibmpc: Change timeout period: 1.0ms to 2.0ms
tmk [Sun, 5 Jul 2020 03:40:16 +0000 (12:40 +0900)]
ibmpc: Change timeout period: 1.0ms to 2.0ms

Timeout error *could*(not always) detects when signal sequence takes beyond 1.0ms.
Now this gives 2.0ms window at least to read signal sequence.

4 years agoMerge remote-tracking branch 'origin/ibmpc_timer0isr_fix'
tmk [Wed, 3 Jun 2020 03:35:47 +0000 (12:35 +0900)]
Merge remote-tracking branch 'origin/ibmpc_timer0isr_fix'

4 years agocore: Fix matrix_print()
tmk [Mon, 1 Jun 2020 15:57:37 +0000 (00:57 +0900)]
core: Fix matrix_print()

4 years agocore: Add default impl for led_set()
tmk [Sat, 30 May 2020 06:19:20 +0000 (15:19 +0900)]
core: Add default impl for led_set()

4 years agoibmpc: Update prebuilt firmware files
tmk [Fri, 22 May 2020 04:15:51 +0000 (13:15 +0900)]
ibmpc: Update prebuilt firmware files

4 years agocore: Make TIMER0 ISR noblock
tmk [Thu, 21 May 2020 06:41:34 +0000 (15:41 +0900)]
core: Make TIMER0 ISR noblock

The TIMER0 ISR takes 1.5us and can affect IBMPC protocol ISR.
Add ISR_NOBLOCK to allow interrupt during TIMER0 ISR.

4 years agoibmpc: Add Z-150 AT protocol recognition
tmk [Wed, 13 May 2020 14:34:42 +0000 (23:34 +0900)]
ibmpc: Add Z-150 AT protocol recognition

https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#zenith-z-150-beige

4 years agoibmpc: Fix 'Ack' check of sending data
tmk [Fri, 8 May 2020 12:32:41 +0000 (21:32 +0900)]
ibmpc: Fix 'Ack' check of sending data

4 years agoibmpc: Fix AT 'request to send' signaling
tmk [Wed, 13 May 2020 13:32:14 +0000 (22:32 +0900)]
ibmpc: Fix AT 'request to send' signaling

Without this fix Realforce 101 PS/2 fails to receive 'set indicator'
command sometimes when pressing Caps Lock and some keys simultaneously.

before fix:
      ____     ______
clock     \___/
      ________
data          \_______
          | 100|

after fix:
      ____          __
clock     \________/
      ________
data          \_______
          | 100| 100|

4 years agoibmpc_usb: Add 'protocol change detection'
tmk [Tue, 12 May 2020 12:59:02 +0000 (21:59 +0900)]
ibmpc_usb: Add 'protocol change detection'

for better keybaord hotswap support

4 years agoibmpc_usb: Fix scan code set change detection
tmk [Tue, 12 May 2020 10:48:09 +0000 (19:48 +0900)]
ibmpc_usb: Fix scan code set change detection

4 years agoibmpc_usb: Update debug prints
tmk [Tue, 12 May 2020 09:57:57 +0000 (18:57 +0900)]
ibmpc_usb: Update debug prints

4 years agoibmpc_usb: Add AT_RESET with reset command 'FF'
tmk [Tue, 12 May 2020 09:56:24 +0000 (18:56 +0900)]
ibmpc_usb: Add AT_RESET with reset command 'FF'

4 years agoibmpc: Fix ibmpc_host_isr_clear()
tmk [Tue, 12 May 2020 09:51:39 +0000 (18:51 +0900)]
ibmpc: Fix ibmpc_host_isr_clear()

4 years agoibmpc: Add debug code for isr_state
tmk [Tue, 12 May 2020 09:50:21 +0000 (18:50 +0900)]
ibmpc: Add debug code for isr_state

4 years agoibmpc: Fix buffer full check
tmk [Tue, 12 May 2020 09:28:07 +0000 (18:28 +0900)]
ibmpc: Fix buffer full check

recv_data should appear to as 'sstt' when it is full with two data.
Both upper and lower byte should be checked.

4 years agoibmpc: Fix Timeout error
tmk [Tue, 12 May 2020 09:21:40 +0000 (18:21 +0900)]
ibmpc: Fix Timeout error

Timeout error may be recoverable but may not in some situations.
For safety it is handled as a real error to start keyboard
recognition again.

4 years agoibmpc_usb: Fix led_set for XT keyobard
tmk [Tue, 12 May 2020 02:01:33 +0000 (11:01 +0900)]
ibmpc_usb: Fix led_set for XT keyobard

4 years agohhkb: Add keys for Display Brightness Control
tmk [Mon, 11 May 2020 12:59:33 +0000 (21:59 +0900)]
hhkb: Add keys for Display Brightness Control

4 years agocore: Add HID usage for Display Brightness Control
tmk [Mon, 11 May 2020 12:51:41 +0000 (21:51 +0900)]
core: Add HID usage for Display Brightness Control

4 years agoibmpc_usb: Update prebuilt firmware files
tmk [Mon, 11 May 2020 08:15:22 +0000 (17:15 +0900)]
ibmpc_usb: Update prebuilt firmware files

4 years agoibmpc_usb: Remove invalid code check in Code Set 1
tmk [Sun, 10 May 2020 15:45:32 +0000 (00:45 +0900)]
ibmpc_usb: Remove invalid code check in Code Set 1

4 years agoibmpc_usb: Update Overrun and buffer full handling(00, FF)
tmk [Sun, 10 May 2020 15:04:36 +0000 (00:04 +0900)]
ibmpc_usb: Update Overrun and buffer full handling(00, FF)

4 years agoibmpc: Update ERR_FF, ERR_FULL handling
tmk [Sun, 10 May 2020 12:59:16 +0000 (21:59 +0900)]
ibmpc: Update ERR_FF, ERR_FULL handling

4 years agoibmpc_usb: Fix led_set
tmk [Sun, 10 May 2020 03:07:17 +0000 (12:07 +0900)]
ibmpc_usb: Fix led_set

4 years agoibmpc_usb: Add protocol and isr_debug check
tmk [Mon, 11 May 2020 04:24:31 +0000 (13:24 +0900)]
ibmpc_usb: Add protocol and isr_debug check

4 years agoibmpc: Add ibmpc_isr_debug to see isr_state
tmk [Mon, 11 May 2020 04:22:06 +0000 (13:22 +0900)]
ibmpc: Add ibmpc_isr_debug to see isr_state

4 years agoibmpc: Add handling for erroneous start bit XT(IBM)
tmk [Sun, 22 Mar 2020 04:08:57 +0000 (13:08 +0900)]
ibmpc: Add handling for erroneous start bit XT(IBM)

This is **not perferred** if it is evitable.
It allows to read start(0) as 1 wrongly at cost of 100us wait.

4 years agoMerge branch 'interrupt_control_endpoint_fix'
tmk [Fri, 8 May 2020 13:47:29 +0000 (22:47 +0900)]
Merge branch 'interrupt_control_endpoint_fix'

4 years agoibm4704: Use INTERRUPT_CONTROL_ENDPOINT to debug prints
tmk [Sun, 29 Mar 2020 13:15:29 +0000 (22:15 +0900)]
ibm4704: Use INTERRUPT_CONTROL_ENDPOINT to debug prints

4 years agousb_usb: Remove hook_usb_startup_wait_loop
tmk [Sun, 29 Mar 2020 05:37:55 +0000 (14:37 +0900)]
usb_usb: Remove hook_usb_startup_wait_loop

matrix_scan in hook_usb_startup_wait_loop is not required for
FC660C since commit dd7b75: SOF timing fix of USB_Host_Shield_2.0.
Without INTERRUPT_CONTROL_ENDPOINT the matrix_scan blocks around 2300ms
and prevents getting USB configured. In the result console_putc
starts sending before hid_listen is ready and chars are lost.

console_is_ready delay value should be around 5000ms if matrix_scan
is needed in hook_usb_startup_wait_loop.

4 years agoRemove INTERRUPT_CONTROL_ENDPOINT from converters
tmk [Sat, 28 Mar 2020 12:56:54 +0000 (21:56 +0900)]
Remove INTERRUPT_CONTROL_ENDPOINT from converters

The LUFA feature can prevent converter's ISR from handing signal instantly.
The interrupt can block a while for Standard Device Requests and 500-1000us
for keyboard LED report.

4 years agolufa: Fix comment on INTERRUPT_CONTROL_ENDPOINT
tmk [Sat, 28 Mar 2020 12:55:20 +0000 (21:55 +0900)]
lufa: Fix comment on INTERRUPT_CONTROL_ENDPOINT

4 years agocore: ibmpc: Check response of set indicator command
tmk [Fri, 8 May 2020 12:30:41 +0000 (21:30 +0900)]
core: ibmpc: Check response of set indicator command

4 years agocore: ibmpc: Add comments on stop bit of Z-150 AT
tmk [Fri, 8 May 2020 12:31:50 +0000 (21:31 +0900)]
core: ibmpc: Add comments on stop bit of Z-150 AT

4 years agoibmpc_usb: Fix Code Set 2 for Z-150 SysRq
tmk [Sat, 2 May 2020 06:46:16 +0000 (15:46 +0900)]
ibmpc_usb: Fix Code Set 2 for Z-150 SysRq

Zenith Z-150 AT sends scan code 0x7F for SysRq.
Accoding to i8042 translation table it maps both 0x7F and
0x84 into 0x54(Print Screen).
https://geekhack.org/index.php?topic=103648.msg2897404#msg2897404

Swap MUTE and PSCR in unimap_cs2.

4 years agoibmpc_usb: Fix Makefile
tmk [Wed, 6 May 2020 06:59:49 +0000 (15:59 +0900)]
ibmpc_usb: Fix Makefile

4 years agoibmpc_usb: Add keyboard id AB85, BFB0
tmk [Wed, 6 May 2020 06:54:52 +0000 (15:54 +0900)]
ibmpc_usb: Add keyboard id AB85, BFB0

Other 122-key Teminals and IBM RT

4 years agocore: Add 'dude' makefile target for avrdude
tmk [Wed, 6 May 2020 00:36:28 +0000 (09:36 +0900)]
core: Add 'dude' makefile target  for avrdude

Run like `make dude DEV=/dev/ttyACM0` to program
Arduino such as Pro Micro and Leonardo

4 years agoibmpc_usb: Update firmware files again
tmk [Tue, 28 Apr 2020 03:29:07 +0000 (12:29 +0900)]
ibmpc_usb: Update firmware files again

4 years agoibmpc_usb: Update prebuilt firmware files
tmk [Tue, 28 Apr 2020 03:20:44 +0000 (12:20 +0900)]
ibmpc_usb: Update prebuilt firmware files

4 years agoibmpc_usb: Add some comments
tmk [Tue, 28 Apr 2020 03:14:47 +0000 (12:14 +0900)]
ibmpc_usb: Add some comments

4 years agoibmpc_usb: Remove G80-2551 support from Code Set 2
tmk [Tue, 28 Apr 2020 03:07:19 +0000 (12:07 +0900)]
ibmpc_usb: Remove G80-2551 support from Code Set 2

4 years agoibmpc_usb: Add G80-2551 support in Code Set 3
tmk [Tue, 28 Apr 2020 02:59:20 +0000 (11:59 +0900)]
ibmpc_usb: Add G80-2551 support in Code Set 3

https://deskthority.net/wiki/Cherry_G80-2551
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#g80-2551-in-code-set-3
https://geekhack.org/index.php?topic=103648.msg2894921#msg2894921

4 years agoibmpc_usb: Add codes in Set 3
tmk [Mon, 27 Apr 2020 09:44:34 +0000 (18:44 +0900)]
ibmpc_usb: Add codes in Set 3

GUI, Application, Henkan, Mehenkan, Kana used in PS/2 PC
keyboard when it is switched to Set 3
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#g80-3600-and-skidata2-de-in-code-set-3

4 years agoibmpc_usb: Update prebuilt firmware hex files
tmk [Sun, 26 Apr 2020 14:35:59 +0000 (23:35 +0900)]
ibmpc_usb: Update prebuilt firmware hex files

4 years agoibmpc_usb: Add support for G80-2551
tmk [Sat, 25 Apr 2020 02:10:19 +0000 (11:10 +0900)]
ibmpc_usb: Add support for G80-2551

Support for extra keys around cursor keys
https://deskthority.net/wiki/Cherry_G80-2551
https://geekhack.org/index.php?topic=103648.msg2893404#msg2893404
https://gist.github.com/tmk/22cb8680ca8ef854630ecd1953268c5b

4 years agoibmpc_usb: Change key mapping for Code Set 3
tmk [Sun, 26 Apr 2020 06:34:03 +0000 (15:34 +0900)]
ibmpc_usb: Change key mapping for Code Set 3

4 years agoFix TIMER_DIFF #646
tmk [Tue, 14 Apr 2020 00:44:30 +0000 (09:44 +0900)]
Fix TIMER_DIFF #646

Merge branch 'timer_diff_fixes' of https://github.com/purdeaandrei/tmk_keyboard into purdeaandrei-timer_diff_fixes

4 years agosun_usb: Add prebuilt firmware files
tmk [Thu, 9 Apr 2020 04:57:48 +0000 (13:57 +0900)]
sun_usb: Add prebuilt firmware files

4 years agosun_usb: Add Makefile for ATmega32U4
tmk [Thu, 9 Apr 2020 04:50:55 +0000 (13:50 +0900)]
sun_usb: Add Makefile for ATmega32U4

4 years agosun_usb: Update README and rename to .md
tmk [Wed, 8 Apr 2020 08:48:20 +0000 (17:48 +0900)]
sun_usb: Update README and rename to .md

4 years agosun_usb: Add unimap support
tmk [Wed, 8 Apr 2020 05:53:10 +0000 (14:53 +0900)]
sun_usb: Add unimap support

4 years agotmk_core/common/timer.h: Improve code generation for TIMER_DIFF* macros
Purdea Andrei [Wed, 1 Apr 2020 04:46:18 +0000 (07:46 +0300)]
tmk_core/common/timer.h: Improve code generation for TIMER_DIFF* macros

Because of integer promotion the compiler is having a hard time generating
efficient code to calculate TIMER_DIFF* macros in some situations.
In the below example, the return value is "int", and this is causing the
trouble.

Example C code:

int __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer)
{
    return TIMER_DIFF_8(current_timer, start_timer);
}

BEFORE: (with -Os)

00004c40 <test>:
    4c40:       28 2f           mov     r18, r24
    4c42:       30 e0           ldi     r19, 0x00       ; 0
    4c44:       46 2f           mov     r20, r22
    4c46:       50 e0           ldi     r21, 0x00       ; 0
    4c48:       86 17           cp      r24, r22
    4c4a:       20 f0           brcs    .+8             ; 0x4c54 <test+0x14>
    4c4c:       c9 01           movw    r24, r18
    4c4e:       84 1b           sub     r24, r20
    4c50:       95 0b           sbc     r25, r21
    4c52:       08 95           ret
    4c54:       c9 01           movw    r24, r18
    4c56:       84 1b           sub     r24, r20
    4c58:       95 0b           sbc     r25, r21
    4c5a:       93 95           inc     r25
    4c5c:       08 95           ret

AFTER: (with -Os)

00004c40 <test>:
    4c40:       86 1b           sub     r24, r22
    4c42:       90 e0           ldi     r25, 0x00       ; 0
    4c44:       08 95           ret

Note: the example is showing -Os but improvements can be seen at all optimization levels,
including -O0. We never use -O0, but I tested it to make sure that no extra code is
generated in that case.

4 years agotmk_core/common/timer.h: Fixing TIMER_DIFF macro to calculate difference correctly...
Purdea Andrei [Wed, 1 Apr 2020 04:44:00 +0000 (07:44 +0300)]
tmk_core/common/timer.h: Fixing TIMER_DIFF macro to calculate difference correctly after the timer wraps.

Let's go through an example, using the following macro:

If the first timer read is 0xe4 and the second one is 0x32, the timer wrapped.
If the timer would have had more bits, it's new value would have been 0x132,
and the correct difference in time is 0x132 - 0xe4 = 0x4e

old code TIMER_DIFF_8(0x32, 0xe4) = 0xff - 0xe4 + 0x32 = 0x4d, which is wrong.
new code TIMER_DIFF_8(0x32, 0xe4) = 0xff + 1 - 0xe4 + 0x32 = 0x4e, which is correct.

This also gives a chance for a smart compiler to optimize the code using normal
integer overflow.

For example on AVR, the following C code:
uint8_t __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer)
{
    return TIMER_DIFF_8(current_timer, start_timer);
}
With the original code, it gets translated to the following list of instructions:
00004c6e <test>:
    4c6e:       98 2f           mov     r25, r24
    4c70:       86 1b           sub     r24, r22
    4c72:       96 17           cp      r25, r22
    4c74:       08 f4           brcc    .+2             ; 0x4c78 <test+0xa>
    4c76:       81 50           subi    r24, 0x01       ; 1
    4c78:       08 95           ret
But with this commit, it gets translated to a single instruction:
00004c40 <test>:
    4c40:       86 1b           sub     r24, r22
    4c42:       08 95           ret

This unfortunately doesn't always work so nicely, for example the following C code:
int __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer)
{
    return TIMER_DIFF_8(current_timer, start_timer);
}
(Note: return type changed to int)
With the original code it gets translated to:
00004c6e <test>:
    4c6e:       28 2f           mov     r18, r24
    4c70:       30 e0           ldi     r19, 0x00       ; 0
    4c72:       46 2f           mov     r20, r22
    4c74:       50 e0           ldi     r21, 0x00       ; 0
    4c76:       86 17           cp      r24, r22
    4c78:       20 f0           brcs    .+8             ; 0x4c82 <test+0x14>
    4c7a:       c9 01           movw    r24, r18
    4c7c:       84 1b           sub     r24, r20
    4c7e:       95 0b           sbc     r25, r21
    4c80:       08 95           ret
    4c82:       c9 01           movw    r24, r18
    4c84:       84 1b           sub     r24, r20
    4c86:       95 0b           sbc     r25, r21
    4c88:       81 50           subi    r24, 0x01       ; 1
    4c8a:       9f 4f           sbci    r25, 0xFF       ; 255
    4c8c:       08 95           ret
Wth this commit it gets translated to:
00004c40 <test>:
    4c40:       28 2f           mov     r18, r24
    4c42:       30 e0           ldi     r19, 0x00       ; 0
    4c44:       46 2f           mov     r20, r22
    4c46:       50 e0           ldi     r21, 0x00       ; 0
    4c48:       86 17           cp      r24, r22
    4c4a:       20 f0           brcs    .+8             ; 0x4c54 <test+0x14>
    4c4c:       c9 01           movw    r24, r18
    4c4e:       84 1b           sub     r24, r20
    4c50:       95 0b           sbc     r25, r21
    4c52:       08 95           ret
    4c54:       c9 01           movw    r24, r18
    4c56:       84 1b           sub     r24, r20
    4c58:       95 0b           sbc     r25, r21
    4c5a:       93 95           inc     r25
    4c5c:       08 95           ret
There is not much performance improvement in this case, however at least with this
commit it functions correctly.

Note: The following commit will improve compiler output for the latter example.

4 years agoibmpc_usb: Update firmware hex files
tmk [Sun, 22 Mar 2020 12:29:58 +0000 (21:29 +0900)]
ibmpc_usb: Update firmware hex files

4 years agoibmpc_usb: Add comment on INTERRUPT_CONTROL_ENDPOINT
tmk [Fri, 20 Mar 2020 05:43:52 +0000 (14:43 +0900)]
ibmpc_usb: Add comment on INTERRUPT_CONTROL_ENDPOINT

4 years agolufa: Add comment on INTERRUPT_CONTROL_ENDPOINT
tmk [Fri, 20 Mar 2020 05:34:44 +0000 (14:34 +0900)]
lufa: Add comment on INTERRUPT_CONTROL_ENDPOINT

This feature can block other executions and prevents converter
from handling signal.

4 years agolufa: Disable SOF interrupt
tmk [Fri, 20 Mar 2020 03:46:48 +0000 (12:46 +0900)]
lufa: Disable SOF interrupt

The interrupt takes 3us every 1ms and can prevent
signal handling of ibmpc converter.

4 years agofc660c: Update firmware hex files
tmk [Fri, 13 Mar 2020 04:51:22 +0000 (13:51 +0900)]
fc660c: Update firmware hex files

4 years agoibmpc_usb: Fix CS3 scan code in comment
tmk [Tue, 3 Mar 2020 23:02:16 +0000 (08:02 +0900)]
ibmpc_usb: Fix CS3 scan code in comment

4 years agoibmpc_usb: Update README
tmk [Mon, 2 Mar 2020 05:44:39 +0000 (14:44 +0900)]
ibmpc_usb: Update README

4 years agoMerge branch 'ibmpc_update'
tmk [Mon, 2 Mar 2020 05:36:38 +0000 (14:36 +0900)]
Merge branch 'ibmpc_update'

4 years agoibmpc_usb: Update firmware binary
tmk [Mon, 2 Mar 2020 05:32:51 +0000 (14:32 +0900)]
ibmpc_usb: Update firmware binary

4 years agoibmpc_usb: Change keymap for application key
tmk [Mon, 2 Mar 2020 05:21:54 +0000 (14:21 +0900)]
ibmpc_usb: Change keymap for application key

4 years agoibmpc: Fix debug print
tmk [Mon, 2 Mar 2020 05:11:16 +0000 (14:11 +0900)]
ibmpc: Fix debug print

4 years agoibmpc_usb: Check overrun error for CS2 and CS3
tmk [Mon, 2 Mar 2020 05:10:27 +0000 (14:10 +0900)]
ibmpc_usb: Check overrun error for CS2 and CS3

4 years agoibmpc_usb: Check invalid code for CS1
tmk [Mon, 2 Mar 2020 03:23:15 +0000 (12:23 +0900)]
ibmpc_usb: Check invalid code for CS1

4 years agoibmpc: Protocol detection between AT and XT
tmk [Mon, 2 Mar 2020 02:02:48 +0000 (11:02 +0900)]
ibmpc: Protocol detection between AT and XT

4 years agoibmpc: Check buffer full and error code FF
tmk [Sun, 1 Mar 2020 16:48:11 +0000 (01:48 +0900)]
ibmpc: Check buffer full and error code FF

4 years agoibmpc: Fix comments
tmk [Sun, 1 Mar 2020 16:21:04 +0000 (01:21 +0900)]
ibmpc: Fix comments

4 years agoibmpc: Add timeout check
tmk [Sun, 1 Mar 2020 15:14:09 +0000 (00:14 +0900)]
ibmpc: Add timeout check