Commit Graph

79 Commits

Author SHA1 Message Date
László Monda
b76b3c0e4f Slow down main bus I2C baud rate to 30kHz when BusPal is on to make firmware transfer more robust. 2018-01-14 20:27:17 +01:00
László Monda
d2ef63184b Move updateUsbReports() from main.c to usb_report_updater.c and delete main.h 2017-11-17 01:21:30 +01:00
László Monda
7f6f9e7094 Detect the use of USB interfaces by introducing IsUsb*ReportSent and compute areUsbReportsSent using them. 2017-11-15 16:54:34 +01:00
László Monda
ae4d60882f Use interrupt based keyboard matrix scanning for the right keyboard half. Get rid of INTERRUPT_KEY_SCANNER 2017-11-13 02:18:55 +01:00
László Monda
f3682efe53 Revert to the factory default state when the reset button is pressed upon firmware startup. Display FTY on the display in this case. 2017-11-10 22:48:21 +01:00
László Monda
ae3efce452 Extract the applyConfig USB command into usb_command_apply_config.[ch] 2017-11-04 01:32:03 +01:00
László Monda
88fac5c1ff Rename key_matrix_instance.[ch] to right_key_matrix.[ch] 2017-11-03 03:30:14 +01:00
László Monda
fe2e611bb1 Update KeyStates[SlotId_RightKeyboardHalf] within usb_report_updater.c instead of main.c 2017-11-03 03:22:56 +01:00
László Monda
599b78a676 Don't expose UpdateUsbReports() anymore. 2017-11-03 03:20:08 +01:00
László Monda
a0a162ae9e Extend key states to include not only the current state but also the previous state and suppressed state. 2017-11-03 03:17:46 +01:00
László Monda
e0868ac866 Rename CurrentKeyStates to KeyStates and move it to the newly created key_states.[ch] 2017-11-03 02:46:34 +01:00
László Monda
00dfd96d55 Instead of scanning the keyboard matrix from the main loop and utilizing busy loops, try to use a PIT interrupt handler to do the same thing, scanning one row per interrupt call without busy loops.
For some reason, this makes the movement of the mouse pointer very slow and makes it jump from time to time, so I ended up adding INTERRUPT_KEY_SCANNER and disabling the timer interrupt.
Also double bufferred the mouse report just like the others. Unfortunately this does not affect this issue.
2017-11-02 01:11:41 +01:00
László Monda
569493cbfa Add UsbDebugInfo to aid future debugging via USB. 2017-10-28 17:12:52 +02:00
László Monda
c77286512c Reset keyboard reports just before changing them by UpdateActiveUsbReports(). This seems to completely solve the repeated media key issue. 2017-10-25 18:31:52 +02:00
László Monda
95faf64b76 Remove the now unused FORCE_BUSPAL macro. 2017-10-21 03:50:07 +02:00
László Monda
25f8017879 Get rid of the now obsoleted bootloader_config.h 2017-10-20 00:52:32 +02:00
László Monda
d4200524d7 Make the firmware depend of the wormhole.[ch] files of the bootloader. Remove local wormhole.[ch] files. 2017-10-13 22:09:52 +02:00
László Monda
377fe4a2b2 Make EEPROM transfers receive an operation and a buffer id parameter. This allows reading and writing both staging and validated user configurations which will aid future debugging. This API is also cleaner. 2017-10-05 02:45:22 +02:00
László Monda
6c2e806d6d Fix coding style. 2017-09-28 21:16:42 +02:00
László Monda
751810ec4c Explicitly add void to the argument list of zero argument functions. 2017-09-28 03:03:11 +02:00
László Monda
9dde9ee917 Replace SLOT_ID_* macros with SlotId_* enum values. 2017-09-26 20:01:18 +02:00
László Monda
2227508130 Use __WFI() instead of asm("wfi") for better readability. 2017-09-22 02:19:16 +02:00
László Monda
e6b5b3b3a5 Read the hardware configuration area and the user configuration area of the EEPROM into the RAM and try to apply it. 2017-09-14 09:55:29 +02:00
László Monda
430c02f0ed Remove test actions and related code. 2017-08-19 13:32:02 +02:00
László Monda
48429f1efe Add FORCE_BUSPAL 2017-08-06 17:37:49 +02:00
Eric Tang
970dbd0a50 Call InitClock before InitPeripherals 2017-07-14 13:18:09 -07:00
Eric Tang
9a5e146866 Rename InitPeripherials to InitPeripherals 2017-07-12 20:06:11 -07:00
Eric Tang
595ced9902 Treat the LED driver as a peripheral with a driver 2017-07-12 20:03:50 -07:00
László Monda
237ef3c34a Rename action.h to key_action.h 2017-06-15 19:27:44 +02:00
László Monda
ab62a3189c Remove configuration parser test data. 2017-06-15 13:11:27 +02:00
László Monda
1f556a8095 Move deserialize.c into the newly create config_parser subdirectory. 2017-06-15 13:09:31 +02:00
László Monda
6c60af4ba8 Preserve state across resets by putting Wormhole to the newly added .noinit section. Rename The jump to bootloader USB command to reenumerate and generalize accordingly by handling the passed reenumeration mode. 2017-06-04 23:32:48 +02:00
László Monda
40498a15b9 Fix typo by renaming init_peripherials.[ch] to init_peripherals.[ch] 2017-05-23 03:19:24 +02:00
László Monda
b039afc37a Remove UHK_PCB_MAJOR_VERSION macro from the right firmware and default to v7. 2017-05-23 02:29:19 +02:00
László Monda
f9a9ebb1d9 Rename InitBridgeProtocolScheduler() to InitSlaveScheduler() 2017-05-05 01:13:36 +02:00
László Monda
d2eed48418 Rename bridge_protocol_scheduler.[ch] to slave_scheduler.[ch] 2017-05-05 00:17:27 +02:00
László Monda
d1d847ff57 Branch to BusPal vs keyboard function depending on Wormhole->enumerationMode 2017-05-01 19:26:38 +02:00
László Monda
8675effabc Add wormhole.[ch] 2017-05-01 17:02:18 +02:00
László Monda
14225a9ba9 Implement disabling keyboard matrix scanning for the left keyboard half, too. 2017-04-30 03:39:27 +02:00
László Monda
3d5b90f583 Add wormhole_t, getSP() and tweak SP before touched by the C runtime. 2017-04-21 09:50:20 +02:00
László Monda
cca1e49d18 Rename the misspelled peripherials directory to peripherals. 2017-04-15 01:00:55 +02:00
László Monda
fc202d8dde Make BusPal relay command between USB and I2C. 2017-04-14 14:31:42 +02:00
László Monda
890660938e Fix up BusPal I2C initialization. 2017-04-14 01:59:35 +02:00
László Monda
adc69dcad5 Clean up bus_pal_hardware.[ch]. Add the ENABLE_BUSPAL macro and setup up BusPal if it's 1 instead of the default UHK USB interfaces. 2017-04-12 22:58:53 +02:00
László Monda
62a3f6b3a4 Add system keyboard interface and add sleep, power and wake keys. 2017-03-06 01:58:02 +01:00
László Monda
c887b5e309 Add another HID interface using the consumer HID class for media keys. Resolves #32. 2017-03-03 20:21:05 +01:00
László Monda
8b46810643 Update USB reports from the main loop instead of the callback of the USB keyboard interface. 2017-02-26 11:10:04 +01:00
László Monda
657431e130 Remove commented out, synchronous I2C communication. 2017-02-26 03:10:18 +01:00
László Monda
6e415696d7 Move merge_sensor.[ch], reset_button.[ch] and test_led.[ch] into the newly created peripherials directory. 2017-02-26 02:50:21 +01:00
László Monda
3561906ebb Remove PreviousKeyStates for the time being. 2017-02-26 02:05:36 +01:00