fn + F1 AND F4 for BSL entry, not F1 OR F4

Check for F keys was only requiring one of F1 or F4 to be pressed..
master
Adam Engstrom 2017-01-06 12:26:55 +01:00
parent f4cf6e75a0
commit dc92892c28
3 changed files with 4 additions and 4 deletions

View File

@ -84,7 +84,7 @@ patching, and then flash the patched firmware back to the Novatouch.
The patches done by default are: The patches done by default are:
- Replace caps-lock with ctrl - Replace caps-lock with ctrl
- Switch place of the 'backspace' and \ keys - Switch place of the 'backspace' and \ keys
- Add hook function for entering BSL (bootloader) mode with fn + F1 + F2 - Add hook function for entering BSL (bootloader) mode with fn + F1 + F4
Edit the patch.py file to do other key mappings, hopefully it's Edit the patch.py file to do other key mappings, hopefully it's
understandable with the overly commented code. understandable with the overly commented code.

View File

@ -99,9 +99,9 @@ def original_fw_valid(path):
return m.hexdigest() == orig_fw_md5 return m.hexdigest() == orig_fw_md5
def write_jump_to_bsl(): def write_jump_to_bsl():
'''Make fn + F1 + F2 jump to BSL (firmware update mode)''' '''Make fn + F1 + F4 jump to BSL (firmware update mode)'''
# Replace mov instruction with a call to our own code for checking # Replace mov instruction with a call to our own code for checking
# which F keys are currently pressed. If fn + F1 + F2 is pressed # which F keys are currently pressed. If fn + F1 + F4 is pressed
# jump to 0x1000 (BSL entry addr). # jump to 0x1000 (BSL entry addr).
# bytecode for asm 'call 0xa780; nop' # bytecode for asm 'call 0xa780; nop'

View File

@ -13,7 +13,7 @@ void check_bsl_enter() {
*num_for_7x_c1 = *repeat_rate; *num_for_7x_c1 = *repeat_rate;
// Enter BSL if fn + f1 + f4 is pressed // Enter BSL if fn + f1 + f4 is pressed
if (*repeat_flags & 0x9) { if ((*repeat_flags & 0x9) == 0x09) {
__dint(); __dint();
// Maybe need to slow down clock to 8 MHz also, not sure what // Maybe need to slow down clock to 8 MHz also, not sure what
// is configured by Novatouch fw // is configured by Novatouch fw