Commit Graph
40 Commits
Author SHA1 Message Date
László Monda 96eeb97a04 Remove commented out code. The scheduler checks previousStatus and acts accordingly, so things should work out fine. 2017-09-28 23:03:40 +02:00
László Monda 5eb82c262a Fix the scheduler by making it maintain previousSlaveId correctly. 2017-09-28 21:44:51 +02:00
László Monda 8136acf63c Add the left add-on and right add-on to the list of slaves to be scheduled. 2017-09-28 21:15:01 +02:00
László Monda 8d57968575 Also commit slave_scheduler.c regarding the kStatus_Uhk_NoOp -> kStatus_Uhk_NoTransfer rename that I forgot to commit. 2017-09-28 03:35:28 +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 5769f66994 Introduce currentSlave when initializing the slaves. 2017-09-27 00:27:14 +02:00
László Monda 8f830f7d9f Make sure that all slaves are initialized upon startup. 2017-09-27 00:22:28 +02:00
László Monda ef9d9ee9a7 Add kStatus_Uhk_NoOp and make the scheduler handle it. 2017-09-22 14:32:43 +02:00
László Monda 6190c4d67b Rename slaveCallback to masterCallback. 2017-08-20 17:30:55 +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 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 d22cb079b4 Rename Slave .initializer to .init and .updater to .update 2017-08-19 13:00:17 +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 7a45fd7e6c Add uhk_module_id_t. Use UhkModuleId_LeftKeyboardHalf in the Slaves array. Set UHK_MODULE_MAX_COUNT to 3. 2017-08-09 00:02:44 +02:00
László Monda c53f3a1c3f Use LedDriverId_* enum values for the Slaves array. 2017-08-08 23:58:24 +02:00
László Monda f817a5cbb9 Kickstart the slave scheduler with the value of currentSlaveId 2017-08-06 17:53:53 +02:00
László Monda 01baa31241 Rename slave_driver_led_driver.[ch] to is31fl3731_driver.[ch] 2017-08-06 16:09:33 +02:00
László Monda fef35bf68e Rename slave_driver_uhk_module.[ch] to uhk_module_driver.[ch] 2017-08-06 16:06:40 +02:00
László Monda 7092e1acf9 Update the isConnected status of the correct slaves. 2017-08-03 01:22:45 +02:00
László Monda f8883e416d Rename slaves to Slaves now that it's extern. 2017-06-01 11:01:49 +02:00
László Monda 0f51700ea9 Keep the slave scheduler going even if a slave driver failed to trigger an I2C callback. 2017-06-01 03:03:20 +02:00
László Monda 420097dddc Keep uhk_slave_t.isConnected updated. 2017-06-01 02:31:04 +02:00
László Monda 7be20e34c2 Reinitialize slaves after reconnecting them. 2017-06-01 01:32:57 +02:00
László Monda 909c6196b2 Add slave driver initializers to the slaves array. 2017-06-01 01:21:04 +02:00
László Monda abd894e906 Rename bridgeSlave to slave 2017-05-05 02:35:01 +02:00
László Monda 387652faaa Rename uhk_slave_t.moduleId to uhk_slave_t.perDriverId 2017-05-05 02:32:45 +02:00
László Monda 588596662a Rename currentBridgeSlaveId to currentSlaveId 2017-05-05 02:28:34 +02:00
László Monda 32e1b8e17f Rename slave_handler_t to slave_updater_t and uhk_slave_t.slaveHandler to uhk_slave_t.updater 2017-05-05 02:26:48 +02:00
László Monda bbf937ff07 Fix indentation. 2017-05-05 02:25:06 +02:00
László Monda 58f295638b Rename InitUhkModules() to UhkModuleSlaveDriver_Init() and UhkSlaveUhkModuleHandler() to UhkModuleSlaveDriver_Update() 2017-05-05 02:21:59 +02:00
László Monda 3853adc02c Rename InitLedSlaveDriver() to LedSlaveDriver_Init() and UhkSlaveLedDriverHandler() to LedSlaveDriver_Update() 2017-05-05 02:18:39 +02:00
László Monda 107a771a4c Add slave_driver_initializer_t, slaveDriverInitializers, and initialize slaves in a more organized fashion. 2017-05-05 02:06:13 +02:00
László Monda 5371a3c17f Rename bridgeSlaves to slaves. 2017-05-05 01:25:57 +02:00
László Monda a13a458683 Rename BridgeSlave*Handler() to UhkSlave*Handler() 2017-05-05 01:16:12 +02:00
László Monda f9a9ebb1d9 Rename InitBridgeProtocolScheduler() to InitSlaveScheduler() 2017-05-05 01:13:36 +02:00
László Monda b21cd8b493 Make the slave scheduler always jump to the next slave by disallowing slave drivers to lock the scheduler. 2017-05-05 01:08:39 +02:00
László Monda d2eed48418 Rename bridge_protocol_scheduler.[ch] to slave_scheduler.[ch] 2017-05-05 00:17:27 +02:00