Commit Graph

31 Commits

Author SHA1 Message Date
Eric Tang
c6b180b8f5 Convert macros for controlling test LEDs to functions 2018-06-26 18:39:40 -07:00
László Monda
fd43e81e46 Query module key count and pointer count in separate messages instead of a combined message for better clarity. 2017-12-15 02:13:58 +01:00
László Monda
c994a97d03 Make the modules transfer their firmware version to the device. Fix the message length of the module protocol version. 2017-12-15 01:42:58 +01:00
László Monda
d59ba83d99 Make the modules transfer a module protocol version composed of a major, a minor and a patch number. 2017-12-15 01:28:13 +01:00
László Monda
c1b887cea8 Rename UhkModulePhase_*ProtocolVersion to UhkModulePhase_*ModuleProtocolVersion. 2017-12-15 01:16:27 +01:00
László Monda
e5865009f5 Remove unused SetError(), SetGenericError, and SetResponseByte() functions. 2017-11-09 01:17:50 +01:00
László Monda
3230b94973 Make the left half call NVIC_SystemReset() upon receiving SlaveCommand_JumpToBootloader instead of jumping to the ROM address of the bootloader. This way the bootloader timeouts. Remove bootloader.c because it only contained JumpToBootloader() which is now unused. 2017-10-17 00:58:23 +02:00
László Monda
12c055aec7 Extract MODULE_ID. 2017-10-05 18:00:17 +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
c707f0e408 Transfer a synchronization message to make I2C recovery more robust. 2017-10-04 02:24:34 +02:00
László Monda
724d72132a Rearrange slave_command_t enum values a bit to reflect their relative importance and rearrange a related case block too. 2017-10-01 22:21:00 +02:00
László Monda
6edf4113a4 Make the slave check message integrity and only process if it's valid. 2017-10-01 22:05:20 +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
abc1923897 Rename LEFT_KEYBOARD_HALF_KEY_COUNT to MODULE_KEY_COUNT. 2017-09-30 00:47:15 +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
9309c1e954 UpperCamelCase rxMessage and txMessage because they're extern variables. 2017-09-28 03:38:44 +02:00
László Monda
3b3e40af83 Pass i2c_message_t messages not only from the left half to the right, but vice versa. 2017-09-26 04:12:05 +02:00
László Monda
b88c6e4291 Add i2c_message_t and use it all across the codebase. This will allow handling variable-length I2C messages and validation with minimal effort. The test LED and brightness PWM update features got temporarily broken and will fix them soon. 2017-09-25 03:03:14 +02:00
László Monda
ac138d2da6 Rename SlaveCommand_GetKeyStates to SlaveCommand_RequestKeyStates 2017-09-22 02:47:05 +02:00
László Monda
4e665b5701 Rename JumpToKboot() to JumpToBootloader() 2017-09-22 01:25:20 +02:00
László Monda
228bebcd59 Rename kboot.[ch] to bootloader.[ch] to improve clarity. 2017-09-22 01:20:00 +02:00
László Monda
5dd3b8e0be Handle SlaveCommand_JumpToBootloader 2017-09-22 01:17:58 +02:00
László Monda
8924c36cb3 Implement I2C watchdog for the left half. Disable the watchdog because it causes a hard fault. Don't update the test LED inside of SlaveCommand_SetTestLed due to testing purposes until the watchdog issue gets resolved. 2017-09-21 23:40:49 +02:00
László Monda
8e50712f75 Remove deleted slave protocol command clauses. 2017-08-19 18:29:26 +02:00
László Monda
1e290ebc34 Verify the integrity of key state update messages using CRC16-CCITT. 2017-05-31 03:26:50 +02:00
László Monda
57319489d2 Make the left half send only as many bytes of key state information as required. 2017-05-31 02:24:55 +02:00
László Monda
0edd56fa82 Serialize key states much more efficiently by using bits instead of bytes. 2017-05-31 01:26:16 +02:00
László Monda
8ac4f5a069 Rename bridge_protocol.h to slave_protocol.h 2017-05-29 22:17:40 +02:00
László Monda
1daf6db53c Rename *bridge* identifiers to *slave* 2017-05-29 22:14:11 +02:00
László Monda
2e66d4bc21 Rename bridge_protocol_handler.[ch] to slave_protocol_handler.[ch] 2017-05-29 22:07:13 +02:00