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:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user