Extract ReinitI2cMainBus()

This commit is contained in:
László Monda
2018-01-13 03:14:42 +01:00
parent 96c7ccd758
commit fa4a3abf84
3 changed files with 9 additions and 3 deletions
+1 -3
View File
@@ -22,9 +22,7 @@ void PIT_I2C_WATCHDOG_HANDLER(void)
if (I2C_Watchdog == prevWatchdogCounter) { // Restart I2C if there haven't been any interrupts recently
I2cWatchdog_RecoveryCounter++;
I2C_MasterDeinit(I2C_MAIN_BUS_BASEADDR);
InitI2cMainBus();
InitSlaveScheduler();
ReinitI2cMainBus();
}
prevWatchdogCounter = I2C_Watchdog;