Fix GPIO output

This commit is contained in:
Lee Lup Yuen 2021-11-24 16:45:48 +08:00 committed by Xiang Xiao
parent 41c3b42468
commit 6e68d55f8a
1 changed files with 8 additions and 0 deletions

View File

@ -129,6 +129,14 @@ int bl602_configgpio(gpio_pinset_t cfgset)
}
modifyreg32(regaddr, mask, cfg);
/* Enable pin output if requested */
if (!(cfgset & GPIO_INPUT))
{
modifyreg32(BL602_GPIO_CFGCTL34, 0, (1 << pin));
}
return OK;
}