Commit Graph

  • 31b01864eb Make sure to send no more than LED_DRIVER_LED_COUNT LED values to the LED driver IC even if LED_DRIVER_LED_COUNT is not an exact multiple of PMW_REGISTER_UPDATE_CHUNK_SIZE. László Monda 2017-08-10 15:07:03 +02:00
  • f9583eb4f4 Copy source LED values to target LED values after LedDriverPhase_InitLedValues finished executing. László Monda 2017-08-10 13:25:15 +02:00
  • 9c5e86df11 Place curly in the same line as LedDriverPhase_Initialized. László Monda 2017-08-10 13:20:35 +02:00
  • e9976f6888 Explicitly initialize all LED values in LedDriverPhase_InitLedValues before moving on to LedDriverPhase_Initialized. László Monda 2017-08-10 13:16:37 +02:00
  • c81291346f Initialize target LED values with zeros, so that they'll be explicitly set to non-zero values by the LED updater algorithm. This makes the desired LEDs light up. László Monda 2017-08-10 01:13:04 +02:00
  • 968a9b13a4 Move the opening braces of the macro parser functions onto their own lines Eric Tang 2017-08-09 13:31:13 -07:00
  • b1fb5f62c1 Make macro_reference_t store the offset of the first macro action and expose ParseMacroAction Eric Tang 2017-08-09 13:13:50 -07:00
  • 22e49c50d1 Make the macro parser store the data it extracts into macro_action_t variables Eric Tang 2017-08-09 13:09:17 -07:00
  • c342f75031 Check the value of macroIndex Eric Tang 2017-08-09 11:50:02 -07:00
  • abc0b994a4 Fully implement parsePlayMacroAction Eric Tang 2017-08-09 11:21:45 -07:00
  • b0b659940d Limit the number of macros to 255 Eric Tang 2017-08-09 11:13:52 -07:00
  • 558089f856 Check the value of macroCount Eric Tang 2017-08-09 10:02:33 -07:00
  • 71b43b8625 Use MAX_KEYMAP_NUM instead of a magic value Eric Tang 2017-08-09 09:54:58 -07:00
  • c983e58d8e When parsing a macro, store its offset and number of actions Eric Tang 2017-08-09 09:49:30 -07:00
  • 1c91a7d5d9 Move the opening brace of ParseKeymap onto its own line and remove a stray semicolon Eric Tang 2017-08-08 17:44:57 -07:00
  • 332f1d9b5a Check the value of abbreviationLen Eric Tang 2017-08-08 17:34:08 -07:00
  • 220654876a Convert the abbreviationLen member of keymap_reference_t to uint8_t Eric Tang 2017-08-08 17:30:08 -07:00
  • 1ef10e9a1a Check the values of moduleConfigurationCount and keymapCount Eric Tang 2017-08-08 17:29:30 -07:00
  • 7306073cee Use 8-bit instead of 16-bit loop indices where they will suffice Eric Tang 2017-08-08 17:23:11 -07:00
  • 2b97758ad2 Move the opening braces of some functions onto their own lines Eric Tang 2017-08-08 16:20:48 -07:00
  • 17fd91c203 Make InitSlaveScheduler() and SetLeds() extern. László Monda 2017-08-09 00:17:05 +02:00
  • 7a45fd7e6c Add uhk_module_id_t. Use UhkModuleId_LeftKeyboardHalf in the Slaves array. Set UHK_MODULE_MAX_COUNT to 3. László Monda 2017-08-09 00:02:44 +02:00
  • 670c6b6e82 Delete the unused slave_type_t enum type. László Monda 2017-08-08 23:59:24 +02:00
  • c53f3a1c3f Use LedDriverId_* enum values for the Slaves array. László Monda 2017-08-08 23:58:24 +02:00
  • dd5a0e058d Split config_state.[ch] to config_globals.[ch] and basic_types.[ch] László Monda 2017-08-08 23:22:18 +02:00
  • 84d510435d Merge pull request #57 from UltimateHackingKeyboard/keymap-switching László Monda 2017-08-08 22:21:29 +02:00
  • aff968f0f9 Fix the type of oldKeymapAbbreviation Eric Tang 2017-08-08 13:00:29 -07:00
  • b91d8ca472 Add a missing include Eric Tang 2017-08-08 13:00:08 -07:00
  • b07aba1766 Set AllKeymapsCount only once when applying a configuration Eric Tang 2017-08-08 12:40:19 -07:00
  • 31de620fee Add error checking to parseSwitchKeymapAction Eric Tang 2017-08-08 09:47:39 -07:00
  • 2621707206 Implement keymap switching Eric Tang 2017-08-08 09:40:31 -07:00
  • 599e701479 Rename current_keymap.* to keymaps.* Eric Tang 2017-08-06 20:41:51 -07:00
  • 709e7644e5 Fully implement parseSwitchKeymapAction Eric Tang 2017-08-06 20:37:51 -07:00
  • 2fa935af37 Revert "Add some temporary code to ensure that only the default keymap is applied" Eric Tang 2017-08-08 12:01:34 -07:00
  • d06cb4f1e2 Merge pull request #55 from UltimateHackingKeyboard/configuration-parser László Monda 2017-08-08 20:49:08 +02:00
  • 711769cb50 Add some temporary code to ensure that only the default keymap is applied Eric Tang 2017-08-08 11:42:35 -07:00
  • 521c84d326 Set GenericHidOutBuffer[3] to 1 if an attempt was made to apply the configuration Eric Tang 2017-08-08 11:31:47 -07:00
  • 2dd0f589db Inline TestConfig Eric Tang 2017-08-08 11:27:15 -07:00
  • 406ea3782d Move back to swapping pointers Eric Tang 2017-08-08 10:54:56 -07:00
  • 079988146d Make the ParserRunDry global. Separate TestConfig() and ApplyConfig() László Monda 2017-08-08 19:20:01 +02:00
  • 0f2c7d53c9 added section for custom user configuration used in right/src/config_parser/config_state.c Erich Styger 2017-08-08 13:49:10 +02:00
  • 29fabe5b2e Revert "Cut the lengths of userConfig1 and userConfig2 in half for now" Eric Tang 2017-08-07 18:18:42 -07:00
  • 036b5c4172 Cut the lengths of userConfig1 and userConfig2 in half for now Eric Tang 2017-08-07 17:39:14 -07:00
  • d035c8699b Try putting userConfig2 in the upper half of the RAM Eric Tang 2017-08-07 16:40:21 -07:00
  • 97336455b5 Verify a new configuration before applying it Eric Tang 2017-08-07 11:19:41 -07:00
  • f817a5cbb9 Kickstart the slave scheduler with the value of currentSlaveId László Monda 2017-08-06 17:53:53 +02:00
  • 48429f1efe Add FORCE_BUSPAL László Monda 2017-08-06 17:37:49 +02:00
  • 68e2dab576 Add config.h and move LED_DRIVER_STRESS_TEST and FIXED_BUSPAL_BOOTLOADER to it. László Monda 2017-08-06 17:28:32 +02:00
  • 48cd8f374a Move EEPROM_SIZE from config_state.h to eeprom.h László Monda 2017-08-06 16:55:12 +02:00
  • f779f3ec6f Rename the config directory to config_parser. László Monda 2017-08-06 16:52:04 +02:00
  • 01baa31241 Rename slave_driver_led_driver.[ch] to is31fl3731_driver.[ch] László Monda 2017-08-06 16:09:33 +02:00
  • fef35bf68e Rename slave_driver_uhk_module.[ch] to uhk_module_driver.[ch] László Monda 2017-08-06 16:06:40 +02:00
  • 78eac147d6 Only delay the initialization of the left LED driver until the KL03 pulls up its SDB. László Monda 2017-08-03 01:42:11 +02:00
  • 7092e1acf9 Update the isConnected status of the correct slaves. László Monda 2017-08-03 01:22:45 +02:00
  • 7b1f9dc2b7 Remove unused variables. László Monda 2017-08-03 00:54:41 +02:00
  • 2bdcb87659 Add UsbCommand_GetDebugInfo. László Monda 2017-08-01 03:00:48 +02:00
  • 546ca5d0b2 Implement much more efficient LED driver updater algorithm that only talks to the LED driver ICs when necessary. Add LED_DRIVER_STRESS_TEST macro. László Monda 2017-07-31 17:30:33 +02:00
  • a30c078f02 Read keymap index instead of keymap abbreviation for keymap switch actions according to the updated binary configuration. László Monda 2017-07-30 21:20:23 +02:00
  • b5fd93f578 Send address bytes to the EEPROM in the right order. László Monda 2017-07-26 16:11:41 +02:00
  • 1dd839d7c8 Merge branch 'master' of github.com:UltimateHackingKeyboard/firmware László Monda 2017-07-26 13:35:39 +02:00
  • 19b3a73e3d Correctly maintain the state of the isEepromBusy flag during reads. Make sure the correct EEPROM memory offsets are sent when dealing with the user configuration. László Monda 2017-07-26 13:34:24 +02:00
  • 1709227a28 Use ternary operators instead of if-else statements Eric Tang 2017-07-25 18:17:41 -07:00
  • eeeff4ec1a Fix parseKeyStrokeAction Eric Tang 2017-07-25 17:46:24 -07:00
  • b48e2b42d3 Stop reading when the desired amount of bytes have been read. László Monda 2017-07-26 02:11:55 +02:00
  • f5d794ec98 Deal with NAKs in the I2C callback while the EEPROM is busy persisting the data. László Monda 2017-07-26 00:49:30 +02:00
  • 35f78f542d Write all the bytes to the EEPROM that are needed to be written, including the last 2 bytes. László Monda 2017-07-25 23:57:06 +02:00
  • c5c44efd22 Add the GetKeyboardState USB command. László Monda 2017-07-25 02:38:51 +02:00
  • c3d9938192 Expose hardware config size and user config size as system properties. László Monda 2017-07-23 20:20:13 +02:00
  • c5abbdcd54 Move system property enum to system_properties.h László Monda 2017-07-23 20:14:29 +02:00
  • 057f048d1b Fix pointer arithmetic. László Monda 2017-07-23 17:51:52 +02:00
  • 5a9286537e Remove the commented out uploadConfig() László Monda 2017-07-23 17:49:15 +02:00
  • d73a5e7880 Make reading and writing the hardware and user configuration possible via USB. Remove readEeprom() and writeEeprom(). Use enums instead of macros. László Monda 2017-07-23 17:37:25 +02:00
  • 3d98a66b64 Rename pageLength to writeLength and improve readability a bit. László Monda 2017-07-23 14:47:16 +02:00
  • 65ff2bf799 Slighly improve readability. László Monda 2017-07-23 14:44:48 +02:00
  • e601ee6c3c Rename setStartAddressCommand to eepromStartAddress. László Monda 2017-07-23 14:36:00 +02:00
  • b6a0470bdb Set IsEepromBusy at the right time inside of the I2C callback when dealing with EepromTransfer_Write*Configuration. László Monda 2017-07-23 14:33:26 +02:00
  • a5c088689e Use the EEPROM_ADDRESS_LENGTH macro instead of a magic constant. László Monda 2017-07-23 14:30:56 +02:00
  • 87cee8b8eb Always update LastEepromTransferStatus in the beginning of i2cCallback() László Monda 2017-07-23 14:04:48 +02:00
  • d399d5f1bf Stop writing the EEPROM when every byte has been transferred. László Monda 2017-07-23 14:03:26 +02:00
  • d87c22a1e1 Abort EEPROM I2C callback if its status is anything but success. László Monda 2017-07-23 13:58:35 +02:00
  • 4d15f6f756 Extract USB response codes into an enum. László Monda 2017-07-23 01:02:24 +02:00
  • 57136e279d Be explicit about void function arguments. László Monda 2017-07-23 00:56:43 +02:00
  • c86bfff38f Remove function prototypes for USB handlers and move usbProtocolHandler to the end of the file. László Monda 2017-07-23 00:55:06 +02:00
  • b87cafd10e Extract system properties as enums. László Monda 2017-07-23 00:53:27 +02:00
  • d8825cc617 Add missing break that could cause troubles later. László Monda 2017-07-23 00:50:37 +02:00
  • e0dcf81421 Extract USB commands as enums of the same type. László Monda 2017-07-23 00:49:50 +02:00
  • 0acb1c54ca Expose EEPROM_LaunchTransfer() via USB. László Monda 2017-07-23 00:41:08 +02:00
  • 8ed4a6ba09 Separate the configuration to hardware configuration and user configuration. Implement async I2C EEPROM handling. Remove USB functions that dealt with EEPROM and individual LEDs because they were dependent on sync I2C functions. László Monda 2017-07-22 23:49:47 +02:00
  • cbb0a02f19 Fix the formatting in parse_keymap.c Eric Tang 2017-07-21 12:56:56 -07:00
  • d14a7565a8 Simplify the error checking in parseKeyAction Eric Tang 2017-07-21 12:43:12 -07:00
  • 7deaedb397 Merge pull request #53 from UltimateHackingKeyboard/configuration-parser László Monda 2017-07-21 21:40:34 +02:00
  • c4ce5a6cf7 Add parsePlayMacroAction Eric Tang 2017-07-21 12:09:32 -07:00
  • 4ad11700c6 Add the macro parser Eric Tang 2017-07-21 11:54:39 -07:00
  • d29d104be2 Add readInt16 Eric Tang 2017-07-21 11:16:52 -07:00
  • c1c00f2b3a Replace tabs with spaces. László Monda 2017-07-20 00:32:37 +02:00
  • ccc02fe795 fixed BusPal Bootloader (https://github.com/UltimateHackingKeyboard/firmware/issues/44) Erich Styger 2017-07-19 17:28:13 +02:00
  • b4ce3b227a disabled unused SWO option Erich Styger 2017-07-19 17:23:40 +02:00
  • 3f70b08c9f producing binary file for bootloader Erich Styger 2017-07-19 16:54:02 +02:00
  • 7c89020ccf disabled SWO (not used) in debug configuration Erich Styger 2017-07-19 16:51:33 +02:00
  • 8a58d97809 Simplify LedDisplay_SetLayer Eric Tang 2017-07-15 23:59:34 -07:00