Commit Graph

56 Commits

Author SHA1 Message Date
László Monda
145443c65c Fix the computation of KEY_STATE_SIZE and the byte count to memset in BoolBytesToBits() 2017-09-26 20:18:26 +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
92647b36a9 Move DEFINE_BOOTLOADER_CONFIG_AREA(I2C_ADDRESS_LEFT_KEYBOARD_HALF_BOOTLOADER) from bootloader_config.c to main.c and delete bootloader_config.c 2017-09-22 02:02:23 +02:00
László Monda
d210f46983 Update guard macro name. 2017-09-22 02:00:40 +02:00
László Monda
dbada9dd5d Extract DEFINE_BOOTLOADER_CONFIG_AREA() 2017-09-22 02:00:00 +02:00
László Monda
50207a288d Add CLOCK_FLAG_HIGH_SPEED_MODE and negate .clockDivider value according to the spec, so that the actual value is easier to read. 2017-09-22 01:52:44 +02:00
László Monda
444e9d58d0 Rename ENABLE_PERIPHERAL_* macros to EnabledBootloaderPeripherial_* enums. 2017-09-22 01:31:03 +02:00
László Monda
4e665b5701 Rename JumpToKboot() to JumpToBootloader() 2017-09-22 01:25:20 +02:00
László Monda
ccc93f48cc Extract BOOTLOADER_TIMEOUT_MS and set it to 100 ms. 2017-09-22 01:22:03 +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
cc3208a947 Add BOOTLOADER_TAG 2017-09-22 01:17:41 +02:00
László Monda
11d9e85cb7 Move kboot related code to shared/kboot.[ch] because it'll be reused by the firmwares of the add-ons. 2017-09-22 01:10:29 +02:00
László Monda
e7330f5d61 Extend the description of the I2C address allocation strategy. 2017-09-20 13:24:39 +02:00
László Monda
02ae123acc Rename IS_IS31FL3731_I2C_ADDRESS macro to IS_I2C_ADDRESS_IS31FL3731 2017-09-20 13:17:36 +02:00
László Monda
2086138d9c Use hex address for EEPROM. 2017-09-20 13:16:07 +02:00
László Monda
5c8138f123 Be more specific by using IC names instead of generic names like LED driver or touchpad. 2017-09-20 13:13:57 +02:00
László Monda
4d5214fdc9 Add I2C addresses for add-ons and touchpad modules. 2017-09-20 02:21:39 +02:00
László Monda
d7b3aee50e Elaborate on the UHK I2C address allocation strategy. Use hex numbers instead of binary for I2C addresses. 2017-09-19 16:52:58 +02:00
László Monda
57e6a6c067 Link Adafrut I2C address list. Feature the EEPROM separately as it's not on the main bus, so its address won't clash with other addresses. 2017-09-19 16:00:11 +02:00
László Monda
430c02f0ed Remove test actions and related code. 2017-08-19 13:32:02 +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
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
b969feb346 Simplify bool array converter functions. 2017-05-31 01:41:44 +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
8b69dd7d90 Move crc16.[ch] to shared 2017-05-30 17:20:06 +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
f6f5a13c48 Fix header section names. 2017-05-23 03:12:22 +02:00
László Monda
debe0240dc Fix #ifdef macro names to be in sync with header filenames. 2017-05-23 03:08:31 +02:00
László Monda
a1a3a052dd Implement "disable LED driver SDB pin" and "set LED PWM to 0" test actions. 2017-04-30 22:03:21 +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
fef5deea4a Handle disable key matrix scan test action for the right keyboard half. 2017-04-29 21:15:04 +02:00
László Monda
4a5e5019aa Update LED PWM and test LED states of UHK modules in an async manner. 2017-03-18 15:12:31 +01:00
László Monda
bb9a39d999 Remove Robi's interruption friendlier I2C implementation because sync I2C calls will be completely eliminated shortly. 2017-03-18 02:01:04 +01:00
László Monda
e69b2720d1 Remove the OLD_MATRIX clause of the keyboard matrix code, thereby obsoleting the reverse diode UHK prototype. 2017-03-18 01:42:07 +01:00
László Monda
780f8199ea Update README.md 2017-02-19 17:02:30 +01:00
László Monda
ed0b51dbff Restore the original I2c{Read,Write}() implementations to make the communication between keyboard halves fully functional again. Fixes #8. 2016-12-09 22:24:15 +01:00
László Monda
6c6afd6395 Make comments more explicit. 2016-12-09 21:59:19 +01:00
László Monda
c47105afd3 Change I2cRead() and I2cWrite() to more closely resemble I2C_MasterReadBlocking() and I2C_MasterWriteBlocking() respectively. This way, we should be able to figure out the root cause of the communication error regarding the blink script more easily. 2016-12-09 21:44:03 +01:00
Robert Csordas
1d2f35dfe9 Fix i2c hangs when disconnecting the left half. 2016-11-13 18:35:22 +01:00
Robert Csordas
fc434c7857 Remove keyboard scanning from USB interrupt. Fix initial blink of LEDs when initializing. Coding style fixes. 2016-11-13 15:50:49 +01:00
László Monda
05359dc320 Add back the code of the old KeyMatrix functions via ifdefs. 2016-10-20 20:54:14 +02:00
László Monda
a08bdbf124 Reverse the diodes and optimize key scanning as much as possible. 2016-10-20 19:29:36 +02:00
László Monda
7a6e5523fb Make bidirectional communication work between the keyboard halves. Make the set test LED USB command set the test LED of the left half, too. 2016-10-19 19:39:00 +02:00
László Monda
9436be444c Implement read EEPROM and write EEPROM USB commands. 2016-10-12 12:51:22 +02:00
László Monda
d65e846502 Add lots of useful comments about I2C addresses. 2016-10-12 00:24:28 +02:00
László Monda
2dd260e84b Fix and use KeyMatrix_Scan() 2016-10-11 21:56:24 +02:00
László Monda
fbfb744fa4 Reduce the number of false positive keystroke registrations by setting output logic right... Hopefully. 2016-10-10 23:26:55 +02:00