Commit Graph

94 Commits

Author SHA1 Message Date
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
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
8c067b9190 Use UhkModuleDriverId_* enum values instead of magic numbers wherever possible. 2017-10-05 20:36:29 +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
21beb59cb6 Add merge sensor state to getKeyboardState() 2017-10-05 14:21:37 +02:00
László Monda
3ed3272fa3 Write the validated user config area to the EEPROM, not the staging area. 2017-10-05 09:12:50 +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
f348aec97a Rename UserConfigBuffer to ValidatedUserConfigBuffer. 2017-10-04 22:10:55 +02:00
László Monda
9ecdfc0b71 Improve the readability of ApplyConfig() 2017-10-04 22:06:45 +02:00
László Monda
827ad7e08e Rename BridgeCounter to I2cSchedulerCounter and move it to the top of masterCallback. 2017-09-29 00:50:56 +02:00
László Monda
508ef870ae Rename I2C_Watchdog*Counter to I2cWatchdog_*Counter. 2017-09-29 00:44:22 +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
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
58f36cf6c3 Add I2C_WatchdogOuterCounter, I2C_WatchdogInnerCounter, BridgeCounter and expose them via USB getDebugInfo() 2017-08-19 12:12:49 +02:00
László Monda
529219ee99 Init microseconds PIT counter. Can see ticks, but cannot convert them down to microseconds and milliseconds yet. 2017-08-10 23:45:36 +02:00
Eric Tang
2b97758ad2 Move the opening braces of some functions onto their own lines 2017-08-08 16:20:48 -07:00
László Monda
dd5a0e058d Split config_state.[ch] to config_globals.[ch] and basic_types.[ch] 2017-08-08 23:22:18 +02:00
Eric Tang
aff968f0f9 Fix the type of oldKeymapAbbreviation 2017-08-08 13:00:29 -07:00
Eric Tang
2621707206 Implement keymap switching 2017-08-08 12:10:26 -07:00
Eric Tang
521c84d326 Set GenericHidOutBuffer[3] to 1 if an attempt was made to apply the configuration 2017-08-08 11:31:47 -07:00
Eric Tang
2dd0f589db Inline TestConfig 2017-08-08 11:27:15 -07:00
Eric Tang
406ea3782d Move back to swapping pointers 2017-08-08 10:57:12 -07:00
László Monda
079988146d Make the ParserRunDry global. Separate TestConfig() and ApplyConfig() 2017-08-08 19:20:01 +02:00
Eric Tang
97336455b5 Verify a new configuration before applying it 2017-08-07 11:19:41 -07:00
László Monda
f779f3ec6f Rename the config directory to config_parser. 2017-08-06 16:52:04 +02:00
László Monda
fef35bf68e Rename slave_driver_uhk_module.[ch] to uhk_module_driver.[ch] 2017-08-06 16:06:40 +02:00
László Monda
2bdcb87659 Add UsbCommand_GetDebugInfo. 2017-08-01 03:00:48 +02:00
László Monda
c5c44efd22 Add the GetKeyboardState USB command. 2017-07-25 02:38:51 +02:00
László Monda
c3d9938192 Expose hardware config size and user config size as system properties. 2017-07-23 20:20:13 +02:00
László Monda
c5abbdcd54 Move system property enum to system_properties.h 2017-07-23 20:14:29 +02:00
László Monda
057f048d1b Fix pointer arithmetic. 2017-07-23 17:51:52 +02:00
László Monda
5a9286537e Remove the commented out uploadConfig() 2017-07-23 17:49:15 +02:00
László Monda
d73a5e7880 Make reading and writing the hardware and user configuration possible via USB. Remove readEeprom() and writeEeprom(). Use enums instead of macros. 2017-07-23 17:37:25 +02:00
László Monda
4d15f6f756 Extract USB response codes into an enum. 2017-07-23 01:02:24 +02:00
László Monda
57136e279d Be explicit about void function arguments. 2017-07-23 00:56:43 +02:00
László Monda
c86bfff38f Remove function prototypes for USB handlers and move usbProtocolHandler to the end of the file. 2017-07-23 00:55:06 +02:00
László Monda
b87cafd10e Extract system properties as enums. 2017-07-23 00:53:27 +02:00
László Monda
d8825cc617 Add missing break that could cause troubles later. 2017-07-23 00:50:37 +02:00
László Monda
e0dcf81421 Extract USB commands as enums of the same type. 2017-07-23 00:49:50 +02:00
László Monda
0acb1c54ca Expose EEPROM_LaunchTransfer() via USB. 2017-07-23 00:41:08 +02:00
László Monda
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. 2017-07-22 23:49:47 +02:00
Eric Tang
595ced9902 Treat the LED driver as a peripheral with a driver 2017-07-12 20:03:50 -07:00
Eric Tang
ec5f774944 Add the parser for the top-level configuration 2017-07-09 10:35:52 -07:00
Eric Tang
fa79957ab2 Convert ConfigBuffer to serialized_buffer_t 2017-07-09 10:23:51 -07:00
Eric Tang
c7977c905c Send the final position of the configuration parser to the host 2017-07-03 19:42:45 -07:00
Eric Tang
ebb154472c Send the status code returned by the configuration parser to the host 2017-07-03 19:41:17 -07:00
Eric Tang
0f92b0ba22 Take a step towards parsing keymaps 2017-06-24 11:07:56 -07:00
László Monda
bdaef763a4 Rename deserialize_Layer() to parseLayer() and process* functions to parse* 2017-06-15 18:13:42 +02:00