lpc176x: Pass gpio id to gpio_peripheral()
Pass the gpio id instead of the bank/pin to gpio_peripheral(). This is in keeping with other ARM ports. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -44,7 +44,7 @@ gpio_adc_setup(uint8_t pin)
|
||||
LPC_ADC->ADCR = adcr;
|
||||
}
|
||||
|
||||
gpio_peripheral(GPIO2PORT(pin), pin % 32, adc_pin_funcs[chan], 0);
|
||||
gpio_peripheral(pin, adc_pin_funcs[chan], 0);
|
||||
|
||||
return (struct gpio_adc){ .cmd = adcr | (1 << chan) | (1 << 24) };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user