Commit Graph
119 Commits
Author SHA1 Message Date
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 f927aef7f5 Put function curlies into their own line according to our coding standards all across the codebase. 2017-11-10 23:14:44 +01:00
László Monda b8846cd601 Add LedDisplay_SetCurrentKeymapText() and use it when reinitializaing the LED display upon disconnect. This fixes the bug that shows FTY on the display upon I2C watchdog recoveries. 2017-11-09 20:59:51 +01:00
László Monda c2efb5e0d0 Rename watchdog related variables to be more intuitively named. 2017-11-09 20:41:19 +01:00
László Monda 003f313947 Make UsbCommand_JumpToSlaveBootloader expect a slave slot id instead of a uhkModuleDriverId. 2017-11-06 00:32: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 f0a98eebb5 Set the initial keymap abbrivation to FTY (for factory keymap). 2017-10-26 20:32:19 +02:00
László Monda 85b1a65ea7 Implement KbootCommand_Ping and set set left BOOTLOADER_TIMEOUT_MS back to 100 ms. 2017-10-23 21:33:08 +02:00
László Monda ab807cd0c8 Make sendKbootCommand() accept various command types, not only reset. 2017-10-23 01:19:19 +02:00
László Monda 92ee3b5606 Add KBOOT I2C slave driver, its related USB command, and make the firmware updater script of the left half successfully reset the left half after firmware update. 2017-10-22 02:17:43 +02:00
László Monda ef34094004 Add jump to slave bootloader command. 2017-10-12 19:57:41 +02:00
László Monda fd7f2c3b25 Expose the currently attached module ids via getKeyboardState() 2017-10-05 20:53:15 +02:00
László Monda bea13f063a UpperCamelCase UhkModuleStates now that it's a global. 2017-10-05 20:27:57 +02:00
László Monda 9842a6ff60 Merge UhkModuleVars into uhkModuleStates. Also make uhkModuleStates globally accessible because it must be accessed by other parts of the firmware, so it's unpractical to keep it private and write accessor functions for it. 2017-10-05 20:18:57 +02:00
László Monda f8e83b139d Rerequest transfer if CRC is invalid. 2017-10-05 20:02:12 +02:00
László Monda 6be45c4521 Add uhk_module_state_t->isEnumerated and maintain its state. 2017-10-05 19:56:26 +02:00
László Monda 96eb2ef7a3 Make slaves send their protocol version to the master. 2017-10-05 17:55:59 +02:00
László Monda bd76fb44c2 Make slaves send their module id to the master. 2017-10-05 17:26:10 +02:00
László Monda 316602bb02 Rename the obsoleted LED_DRIVER_FORCE_UPDATE macro to LED_DRIVER_STRESS_TEST. 2017-10-04 12:59:05 +02:00
László Monda 6658d62805 Group module phases. 2017-10-04 02:52:53 +02:00
László Monda c707f0e408 Transfer a synchronization message to make I2C recovery more robust. 2017-10-04 02:24:34 +02:00
László Monda 3079d527b1 Add uhk_slave_t.disconnect() callback so that upon disconnecting the left keyboard half, the left LED driver IC can be marked as disconnected too, so it'll be reinitialized upon reconnect. This usually didn't happen because LED states are cached so the LED drivers are rarely spoken to. 2017-10-01 02:47:29 +02:00
László Monda ea71253d6a Remove KEY_STATE_SIZE in favor of the more general BOOL_BYTES_TO_BITS_COUNT() macro. 2017-09-30 00:57:10 +02:00
László Monda c23d327384 Rename uhkModuleId to uhkModuleDriverId in UhkModuleSlaveDriver_Init() and UhkModuleSlaveDriver_Update() 2017-09-30 00:40:13 +02:00
László Monda a7b0dfef1d Compute slot id based on module driver id instead of using a hardcoded value. 2017-09-30 00:23:34 +02:00
László Monda d8de4f0b3e Update variable names. 2017-09-30 00:18:37 +02:00
László Monda 01ef8f59c2 Create separate sections of module driver phases. 2017-09-30 00:14:29 +02:00
László Monda 04047eb128 Make modules send their features (key count and whether they have pointer input) to the master upon enumeration. 2017-09-30 00:08:28 +02:00
László Monda e7a1d27cde Make private LED driver variables static. 2017-09-29 15:22:52 +02:00
László Monda 877cb78b0a Extract LedDriverValues from LedDriverStates to make them public, and make LedDriverStates values private. 2017-09-29 15:18:01 +02:00
László Monda 0624d088b6 Remove unused LED driver BUFFER_SIZE. 2017-09-29 02:19:12 +02:00
László Monda 1ab984413a Extract ISO key related LED driver macros. 2017-09-29 02:07:55 +02:00
László Monda 92c0da9695 For the sake of correctness, only initialize the LED driver control register of the ISO key for the left LED driver IC. 2017-09-29 01:53:08 +02:00
László Monda 07142c3ce2 Fix coding style. 2017-09-29 01:46:51 +02:00
László Monda eb2d7ada3a Extract LED_BRIGHTNESS_LEVEL. 2017-09-29 01:30:02 +02:00
László Monda 76a80c3090 Inline SetLeds() 2017-09-29 01:27:34 +02:00
László Monda 69f3c86185 Rename UhkModuleId_* to UhkModuleDriverId_*. 2017-09-28 23:26:58 +02:00
László Monda 8136acf63c Add the left add-on and right add-on to the list of slaves to be scheduled. 2017-09-28 21:15:01 +02:00
László Monda 6ec5140eca Add and initialize firmwareI2cAddress and bootloaderI2cAddress to uhk_module_state_t. 2017-09-28 18:10:33 +02:00
László Monda f80a88c419 RX messages are per-module by nature, so instead of using a singleton, add rxMessage to uhk_module_state_t. 2017-09-28 17:17:30 +02:00
László Monda 3fda14df27 Update the coding style of dereference operators. 2017-09-28 17:09:59 +02:00
László Monda ef2c4a1e7f Add uhk_module_state_t containing module variables and phase. Merge uhkModuleTargetStates and uhkModulePhases to uhkModuleStates. 2017-09-28 17:06:56 +02:00
László Monda de21cfc07e Rename uhk_module_state_t to uhk_module_vars_t. 2017-09-28 16:57:46 +02:00
László Monda 8b5b224bf3 Compute KEY_STATE_SIZE the right way. 2017-09-28 04:05:44 +02:00
László Monda 9a42123648 Rename kStatus_Uhk_NoOp to kStatus_Uhk_NoTransfer. 2017-09-28 03:30:32 +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 ecf1ad2468 Don't use the extern keyword for functions because it's redundant. 2017-09-28 02:37:55 +02:00
László Monda 41c2556386 Use the static keyword wherever it's valid inside of uhk_module_driver.c 2017-09-28 02:26:56 +02:00
László Monda 5473c102ec Add per-module UHK module phases. 2017-09-28 02:24:28 +02:00