1
0
mirror of https://github.com/CTCaer/hekate.git synced 2024-12-24 12:14:11 +00:00

touch: Reinitialize up to 3 times if failed

This commit is contained in:
CTCaer 2020-04-14 17:52:22 +03:00
parent 9af4c717a8
commit da149c296f

View File

@ -373,7 +373,16 @@ int touch_power_on()
return touch_execute_autotune();
}
return touch_init();
// Initialize touchscreen.
u32 retries = 3;
while (retries)
{
if (touch_init())
return 1;
retries--;
}
return 0;
}
void touch_power_off()