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:
László Monda
2017-10-01 23:54:46 +02:00
parent 724d72132a
commit f921753b63

View File

@@ -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);
}