Commit Graph

1307 Commits

Author SHA1 Message Date
László Monda
e7362a057c Rename bootloader.c to bootloader_config.c 2017-09-22 01:14:14 +02:00
László Monda
97ee339827 Don't reference bootloader.h anymore because it has been removed. 2017-09-22 01:13:07 +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
36be965db9 Use I2C_ADDRESS_LEFT_KEYBOARD_HALF_BOOTLOADER and remove redundant comments. 2017-09-22 00:56:48 +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
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
e3d407e14d Assign the I2C and USB interrupts a lower interrupt priority than the PIT interrupt. This should make the I2C watchdog always recover within the PIT interrupt. 2017-09-18 04:05:41 +02:00
László Monda
2f90e40c92 Set chip type, so that EmbSys Register View can show the content of MCU-specific registers in debug mode. 2017-09-14 10:44:31 +02:00
László Monda
aea07f8605 Merge branch 'master' of github.com:UltimateHackingKeyboard/firmware 2017-09-14 09:58:36 +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
Erich Styger
399847510e added configuration and launch configuration to debug the right half keyboard without the need for the bootloader 2017-09-06 16:09:22 +02:00
László Monda
3c40b21ced Add release script. v1.0.0 1.0.0 2017-08-30 19:32:42 +02:00
László Monda
6190c4d67b Rename slaveCallback to masterCallback. 2017-08-20 17:30:55 +02:00
László Monda
caf630204d Update watchdog function comment and timeout comment. 2017-08-20 16:43:58 +02:00
László Monda
894172bd50 Reduce I2C watchdog interval from 1000 ms to 100 ms. 2017-08-20 16:32:02 +02:00
László Monda
f36c3f24e8 Reduce left bootloader timeout from 3000 to 300 ms. 2017-08-20 16:25:53 +02:00
László Monda
cc1ba715bc Regarding isTransferScheduled check for != kStatus_Uhk_IdleSlave which restores I2C fairly reliably upon disconnect instead of == kStatus_Success which for some reason doesn't. 2017-08-20 03:36:08 +02:00
László Monda
8e50712f75 Remove deleted slave protocol command clauses. 2017-08-19 18:29:26 +02:00
László Monda
73239cd4f1 Rename bridgeProtocolCallback to slaveCallback. 2017-08-19 18:12:42 +02:00
László Monda
121299da29 Explicitly reinitialize previousSlaveId, currentSlaveId, Slaves[].isConnected in InitSlaveScheduler() but don't call Slaves[].init() because it'll be called by bridgeProtocolCallback() upon initialization. 2017-08-19 18:07:34 +02:00
László Monda
946d3c1451 Add kStatus_Uhk_IdleSlave and ditch the global IsI2cTransferScheduled. Make slave drivers return status_t and utilize that value instead. 2017-08-19 17:47:56 +02:00
László Monda
430c02f0ed Remove test actions and related code. 2017-08-19 13:32:02 +02:00
László Monda
a954c63f62 Rename LedDriverPhase_Initialized to LedDriverPhase_UpdateChangedLedValues 2017-08-19 13:07:21 +02:00
László Monda
67a402ed59 Make I2cAsync{Read,Write} return with status_t 2017-08-19 13:03:41 +02:00
László Monda
d22cb079b4 Rename Slave .initializer to .init and .updater to .update 2017-08-19 13:00:17 +02:00
László Monda
992fea28ad Split LED_DRIVER_STRESS_TEST as I2C_WATCHDOG and LED_DRIVER_FORCE_UPDATE 2017-08-19 12:31:49 +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
35102918b2 Only set IsI2cTransferScheduled to true if the previous I2C operation returned with kStatus_Success 2017-08-19 12:09:08 +02:00
László Monda
0751d4075a Uncomment microseconds_init() for the time being because it interferes with the PIT channel of the watchdog. 2017-08-19 12:07:20 +02:00
László Monda
f7bc6a8f82 Don't memcpy source LED values to target values when LED_DRIVER_STRESS_TEST is set because it's redundant. 2017-08-19 11:58:39 +02:00
László Monda
024c2d5cff Merge branch 'master' into macro-engine 2017-08-11 10:05:32 +02:00
Eric Tang
324f9cdadc Zero all of the macro reports when starting to play a macro 2017-08-10 23:58:24 -07:00
Eric Tang
fa0200b5a9 Fix some guard clauses 2017-08-10 22:10:08 -07:00
Eric Tang
ce84ac3e14 Implement part of the macro engine 2017-08-10 15:09:20 -07: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
László Monda
04e3532961 Remove unneeded comments. 2017-08-10 19:09:57 +02:00
László Monda
58f17ba344 Remove microseconds_sysclk.c because we'll use the PIT instead for maintaining time. 2017-08-10 18:04:09 +02:00
László Monda
f56290aa62 Branch based on LED_DRIVER_STRESS_TEST in is31fl3731_driver.c 2017-08-10 15:42:02 +02:00
László Monda
31b01864eb Make sure to send no more than LED_DRIVER_LED_COUNT LED values to the LED driver IC even if LED_DRIVER_LED_COUNT is not an exact multiple of PMW_REGISTER_UPDATE_CHUNK_SIZE. 2017-08-10 15:07:03 +02:00
László Monda
f9583eb4f4 Copy source LED values to target LED values after LedDriverPhase_InitLedValues finished executing. 2017-08-10 13:25:15 +02:00
László Monda
9c5e86df11 Place curly in the same line as LedDriverPhase_Initialized. 2017-08-10 13:20:35 +02:00
László Monda
e9976f6888 Explicitly initialize all LED values in LedDriverPhase_InitLedValues before moving on to LedDriverPhase_Initialized. 2017-08-10 13:16:37 +02:00
László Monda
c81291346f Initialize target LED values with zeros, so that they'll be explicitly set to non-zero values by the LED updater algorithm. This makes the desired LEDs light up. 2017-08-10 01:13:04 +02:00
Eric Tang
968a9b13a4 Move the opening braces of the macro parser functions onto their own lines 2017-08-09 13:31:13 -07:00