aboutsummaryrefslogtreecommitdiffstats
path: root/src/lpc176x/adc.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-01-04 10:58:50 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-01-04 11:00:09 -0500
commita40df4b6f7913271be3dcfac79ba05e5bb13ec27 (patch)
tree2fed875b3401ca9790282eff691194c9628ccf3c /src/lpc176x/adc.c
parent8f7fc4e6a9ed6b5df39ede47c2accea000db86f9 (diff)
downloadkutter-a40df4b6f7913271be3dcfac79ba05e5bb13ec27.tar.gz
kutter-a40df4b6f7913271be3dcfac79ba05e5bb13ec27.tar.xz
kutter-a40df4b6f7913271be3dcfac79ba05e5bb13ec27.zip
lpc176x: Move enable_peripheral_clock to main.c
Move and rename function to enable_pclock() - 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lpc176x/adc.c b/src/lpc176x/adc.c
index d7071896..c9d2ccae 100644
--- a/src/lpc176x/adc.c
+++ b/src/lpc176x/adc.c
@@ -38,9 +38,9 @@ gpio_adc_setup(uint8_t pin)
uint32_t prescal = DIV_ROUND_UP(CONFIG_CLOCK_FREQ*4, ADC_FREQ_MAX) - 1;
uint32_t adcr = (1<<21) | ((prescal & 0xff) << 8);
- if (!(LPC_SC->PCONP & (1<<PCLK_ADC))) {
+ if (!is_enabled_pclock(PCLK_ADC)) {
// Power up ADC
- enable_peripheral_clock(PCLK_ADC);
+ enable_pclock(PCLK_ADC);
LPC_ADC->ADCR = adcr;
}