Commit Graph

169 Commits

Author SHA1 Message Date
László Monda
9e18caa0ba Set the left KEY_SCANNER_INTERVAL_USEC to 1000 / KEYBOARD_MATRIX_ROWS_NUM 2017-11-14 13:08:01 +01:00
László Monda
f63f2f9b96 Adding left/key_scanner.[ch] which I totally forgot. 2017-11-14 03:43:51 +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
f927aef7f5 Put function curlies into their own line according to our coding standards all across the codebase. 2017-11-10 23:14:44 +01:00
László Monda
c2efb5e0d0 Rename watchdog related variables to be more intuitively named. 2017-11-09 20:41:19 +01:00
László Monda
c83e331c37 Remove the unused PROTOCOL_RESPONSE_{SUCCESS,GENERIC_ERROR} macros. 2017-11-09 01:45:55 +01:00
László Monda
f8ad10b0c1 Make build/uhk60-left_{debug,release}_kboot.launch build the relevant firmware images before running their update script. 2017-11-09 01:34:23 +01:00
László Monda
f1058294a6 Wrap the whole debug_over_spi.[ch] files into #ifdef DEBUG_OVER_SPI to silence compiler warnings when it's not defined. 2017-11-09 01:33:23 +01:00
László Monda
e5865009f5 Remove unused SetError(), SetGenericError, and SetResponseByte() functions. 2017-11-09 01:17:50 +01:00
László Monda
272ff3ccbe Tweak firmware updater script paths according to the changes of the Agent repo. 2017-11-08 18:33:00 +01:00
László Monda
b49d5a7f7e Add launch configurations for the release and debug versions of the left half firmware. 2017-11-08 04:09:58 +01:00
László Monda
ba5a49f7d1 Hoist {left,right}/build/kds/* to {left,right}/build to simplify the directory hierarchy. 2017-10-31 23:11:22 +01:00
László Monda
010b276f8b Fix XML structure. 2017-10-31 01:33:18 +01:00
László Monda
808d916687 Clean up .cproject and .gitignore files after the rename of the build and run configurations. 2017-10-29 22:04:48 +01:00
László Monda
52bb02bc3d Rename build and run configurations to reflect device ids. 2017-10-29 21:54:02 +01:00
László Monda
9db5c5e067 Port blhost-unix.sh as update-slave-firmware.js using ShellJS. 2017-10-24 13:59:36 +02:00
László Monda
c370cab513 Use the renamed send-kboot-command-to-slave.js 2017-10-23 22:24:40 +02:00
László Monda
85b1a65ea7 Implement KbootCommand_Ping and set set left BOOTLOADER_TIMEOUT_MS back to 100 ms. 2017-10-23 21:33:08 +02:00
László Monda
c46dcad490 Use reenumerate.js instead of jump-to-bootloader.js and make left/blhost-unix.sh handle argument related errors. 2017-10-23 16:52:15 +02:00
László Monda
ab807cd0c8 Make sendKbootCommand() accept various command types, not only reset. 2017-10-23 01:19:19 +02:00
László Monda
92ee3b5606 Add KBOOT I2C slave driver, its related USB command, and make the firmware updater script of the left half successfully reset the left half after firmware update. 2017-10-22 02:17:43 +02:00
László Monda
5149e7e8ad Remove the now unused ALWAYS_ENTER_BOOTLOADER macro. 2017-10-21 03:40:10 +02:00
László Monda
f67bcced4a Keep only one release and one debug build configuration. Add related kboot run configurations. 2017-10-21 03:35:17 +02:00
László Monda
e9920cfebb Increase the delay from 1s to 2s and flash the firmware script argument. 2017-10-21 03:28:54 +02:00
László Monda
a052f4f59c Add blhost script for the left firmware, too. 2017-10-21 01:27:33 +02: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
53cb8aa129 Delete armgcc build scripts because they aren't planned to be used anymore. 2017-10-14 13:04:39 +02: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
457894ecd8 Remove redundant InitI2cV2() function prototype. 2017-10-07 16:35:34 +02:00
László Monda
8dba4df6f6 Set the heap size to 0 given that no dynamic memory is allocated in the firmware. This makes the bss go from 1252 to 740, exactly 0x200 difference. 2017-10-07 12:57:52 +02:00
László Monda
3d443a8bfc Remove semihosting related changes. 2017-10-06 22:36:02 +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
1bca95d366 Don't stop execution upon starting a debugging session. 2017-10-04 19:31:28 +02:00
László Monda
a84d184da4 Include stdio.h 2017-10-04 18:34:10 +02:00
László Monda
c965fe185b Enable semihosting for the "uhk-left debug jlink" build. 2017-10-04 18:21:02 +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
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
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
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
3e5767e141 Use KEYBOARD_MATRIX_ROWS_NUM and KEYBOARD_MATRIX_COLS_NUM to compute MODULE_KEY_COUNT. 2017-09-30 01:11:12 +02:00