Commit Graph

27 Commits

Author SHA1 Message Date
László Monda
8297dd5c48 Don't include the debug over SPI code from any file. 2018-08-05 22:44:11 +02:00
Eric Tang
0155447c6a Rename InitTestLed to TestLed_Init 2018-06-26 18:37:49 -07:00
László Monda
f5716bdadc Rename some private functions in init_peripherals.c from upper to lower camel case. 2018-01-14 20:30:46 +01:00
László Monda
43587c2e1f Define I2C_WATCHDOG_VALUE_REINIT and I2C_WATCHDOG_VALUE_REBOOT and make them work when assigned to I2C_WATCHDOG. 2017-12-27 17:07:04 +01:00
Erich Styger
7eb83173ed changed I2C watchdog timer implementation, as LPTMR was already used by key scanner 2017-12-25 17:15:41 +01:00
Erich Styger
5581dd26b5 fixed and enabled software watchdog timer 2017-12-24 12:06:46 +01:00
László Monda
4c97238999 Even though the current code seems to be working fine, call KeyMatrix_Init() before InitKeyScanner() just to be sure. 2017-11-14 02:40:51 +01:00
László Monda
5c84620704 Call KeyMatrix_ScanRow() from an LPTMR interrupt for the left half. Remove KeyMatrix_Scan() 2017-11-14 02:29:18 +01:00
László Monda
3dd9744e4d Make I2C communication rock stable by hacking I2C_SlaveTransferHandleIRQ() of the KSDK and making the firmware use incoming bytes via userData. 2017-10-09 04:19:26 +02:00
László Monda
859a770ca3 Dump byteIn after xfer->event via SPI. Make the firmware build without using the DEBUG_OVER_SPI macro. 2017-10-08 23:12:40 +02:00
László Monda
6b0ebb1385 Add debug_over_spi.[ch] 2017-10-08 03:38:43 +02:00
László Monda
7061345ec2 Fix hard faults by moving slaveConfig and slaveHandle out of InitI2c(), thereby making them always available for KSDK. Fixed by @santiagogf89. 2017-10-03 19:15:33 +02:00
László Monda
1b1111e9da Rename I2C_BUFFER_MAX_LENGTH to I2C_MESSAGE_MAX_TOTAL_LENGTH. 2017-10-01 21:55:37 +02:00
László Monda
4ade25d739 Add I2C_MESSAGE_HEADER_LENGTH and use it in i2cSlaveCallback() instead of magic numbers. 2017-10-01 21:42:55 +02:00
László Monda
0ba979a658 Refactor i2cSlaveCallback(). 2017-10-01 21:38:02 +02:00
László Monda
894103a944 Disable the watchdog of the left half because for some reason it makes I2C recovery less reliable. 2017-09-30 20:54:27 +02:00
László Monda
cec8bbfe01 Clone InitI2c() as InitI2cV2() and use it in the LPTMR interrupt handler to avoid the hard fault. 2017-09-30 17:06:17 +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
751810ec4c Explicitly add void to the argument list of zero argument functions. 2017-09-28 03:03:11 +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
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
4d5214fdc9 Add I2C addresses for add-ons and touchpad modules. 2017-09-20 02:21:39 +02:00
Eric Tang
9a5e146866 Rename InitPeripherials to InitPeripherals 2017-07-12 20:06:11 -07: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
László Monda
40498a15b9 Fix typo by renaming init_peripherials.[ch] to init_peripherals.[ch] 2017-05-23 03:19:24 +02:00