exo: add usb3 force enable support

Like the other configs, it can be read from system_settings.ini and be set.

Additionally a new `usb3force` key was added to allow user to override and enable/disable that setting via a boot entry.
This allows for fast (re)boot into an entry that disables that (important because of the huge interference that USB3 creates to Bluetooth and WiFi 2.4GHz).
This commit is contained in:
CTCaer
2021-03-17 09:31:06 +02:00
parent 4958bd6a52
commit c01b8aa89c
4 changed files with 69 additions and 7 deletions

View File

@@ -220,6 +220,19 @@ static int _config_exo_user_pmu_access(launch_ctxt_t *ctxt, const char *value)
return 1;
}
static int _config_exo_usb3_force(launch_ctxt_t *ctxt, const char *value)
{
// Override key found.
ctxt->exo_ctx.usb3_force = calloc(sizeof(bool), 1);
if (*value == '1')
{
DPRINTF("Enabled USB 3.0\n");
*ctxt->exo_ctx.usb3_force = true;
}
return 1;
}
static int _config_exo_cal0_blanking(launch_ctxt_t *ctxt, const char *value)
{
// Override key found.
@@ -291,6 +304,7 @@ static const cfg_handler_t _config_handlers[] = {
{ "emummcforce", _config_emummc_forced },
{ "nouserexceptions", _config_dis_exo_user_exceptions },
{ "userpmu", _config_exo_user_pmu_access },
{ "usb3force", _config_exo_usb3_force },
{ "cal0blank", _config_exo_cal0_blanking },
{ "cal0writesys", _config_exo_cal0_writes_enable },
{ NULL, NULL },