Fix the I2C dead-lock of the Master

When some slave is unplugged suddenly this can lead to unresponsiveness of the driver. restart_I2C will continuously check this and assure that the driver will be reconfigured in case of a dead-lock.
This commit is contained in:
Santiago
2017-02-18 13:11:45 +01:00
committed by GitHub
parent 880981ac14
commit 226bc31385
3 changed files with 29 additions and 1 deletions

View File

@@ -8,6 +8,7 @@
#include "bridge_protocol_scheduler.h"
#include "test_led.h"
key_matrix_t KeyMatrix = {
.colNum = KEYBOARD_MATRIX_COLS_NUM,
.rowNum = KEYBOARD_MATRIX_ROWS_NUM,
@@ -80,6 +81,8 @@ void UpdateUsbReports()
}
void main() {
InitPeripherials();
InitClock();
LedDriver_InitAllLeds(1);
@@ -92,6 +95,7 @@ void main() {
while (1) {
//UpdateUsbReports();
restartI2C();
asm("wfi");
}
}