aboutsummaryrefslogtreecommitdiffstats
path: root/src/lpc176x/adc.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-01-04 11:07:22 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-01-04 11:07:22 -0500
commit277a8185e1550b55f634c40923db155771736063 (patch)
tree686ae298cb37118bcf0e72e611bf262943b8e9d6 /src/lpc176x/adc.c
parenta40df4b6f7913271be3dcfac79ba05e5bb13ec27 (diff)
downloadkutter-277a8185e1550b55f634c40923db155771736063.tar.gz
kutter-277a8185e1550b55f634c40923db155771736063.tar.xz
kutter-277a8185e1550b55f634c40923db155771736063.zip
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>
Diffstat (limited to 'src/lpc176x/adc.c')
-rw-r--r--src/lpc176x/adc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lpc176x/adc.c b/src/lpc176x/adc.c
index c9d2ccae..4484b59d 100644
--- a/src/lpc176x/adc.c
+++ b/src/lpc176x/adc.c
@@ -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) };
}