stm32f4: Encode mode/func into single parameter of gpio_peripheral

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-07-28 11:32:56 -04:00
parent 7d4c475e52
commit ef0784afe6
5 changed files with 13 additions and 12 deletions

View file

@ -44,7 +44,7 @@ gpio_adc_setup(uint32_t pin)
| (aticks << 21) | (aticks << 24) | (aticks << 27));
ADC1->CR2 = ADC_CR2_ADON;
gpio_peripheral(pin, GPIO_ANALOG, 0, 0);
gpio_peripheral(pin, GPIO_ANALOG, 0);
return (struct gpio_adc){ .chan = chan };
}