Call slaveSchedulerCallback() instead of the update callback of the first slave to trigger the slave protocol scheduler. Given that the callback is involved from the start this should result in a more reliable startup state.
This commit is contained in:
@@ -93,6 +93,6 @@ void InitSlaveScheduler(void)
|
||||
|
||||
I2C_MasterTransferCreateHandle(I2C_MAIN_BUS_BASEADDR, &I2cMasterHandle, slaveSchedulerCallback, NULL);
|
||||
|
||||
// Kickstart the scheduler by triggering the first callback.
|
||||
Slaves[currentSlaveId].update(Slaves[currentSlaveId].perDriverId);
|
||||
// Kickstart the scheduler by triggering the first transfer.
|
||||
slaveSchedulerCallback(I2C_MAIN_BUS_BASEADDR, &I2cMasterHandle, kStatus_Fail, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user