Change pin handling part 6

This commit is contained in:
Theo Arends 2020-04-27 17:28:05 +02:00
parent ae4ec4325d
commit 3fef91d6ca
2 changed files with 7 additions and 3 deletions

View File

@ -1109,6 +1109,12 @@ void SetPin(uint32_t lpin, uint32_t gpio) {
*/
}
void InitAllPins(void) {
for (uint32_t i = 0; i < ARRAY_SIZE(pin); i++) {
SetPin(99, i);
}
}
void DigitalWrite(uint32_t gpio_pin, uint32_t index, uint32_t state)
{
if (PinUsed(gpio_pin, index)) {

View File

@ -1383,9 +1383,7 @@ void GpioInit(void)
my_adc0 = template_adc0; // Force Template override
}
for (uint32_t i = 0; i < GPIO_MAX; i++) {
SetPin(99, i);
}
InitAllPins();
for (uint32_t i = 0; i < ARRAY_SIZE(my_module.io); i++) {
uint32_t mpin = ValidPin(i, my_module.io[i]);