diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-01-04 10:58:50 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-01-04 11:00:09 -0500 |
commit | a40df4b6f7913271be3dcfac79ba05e5bb13ec27 (patch) | |
tree | 2fed875b3401ca9790282eff691194c9628ccf3c /src/lpc176x/gpio.c | |
parent | 8f7fc4e6a9ed6b5df39ede47c2accea000db86f9 (diff) | |
download | kutter-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/gpio.c')
-rw-r--r-- | src/lpc176x/gpio.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/lpc176x/gpio.c b/src/lpc176x/gpio.c index e48feb01..66b657d8 100644 --- a/src/lpc176x/gpio.c +++ b/src/lpc176x/gpio.c @@ -26,20 +26,6 @@ static LPC_GPIO_TypeDef * const digital_regs[] = { * General Purpose Input Output (GPIO) pins ****************************************************************/ -// Enable a peripheral clock -void -enable_peripheral_clock(uint32_t pclk) -{ - LPC_SC->PCONP |= 1<<pclk; - if (pclk < 16) { - uint32_t shift = pclk * 2; - LPC_SC->PCLKSEL0 = (LPC_SC->PCLKSEL0 & ~(0x3<<shift)) | (0x1<<shift); - } else { - uint32_t shift = (pclk - 16) * 2; - LPC_SC->PCLKSEL1 = (LPC_SC->PCLKSEL1 & ~(0x3<<shift)) | (0x1<<shift); - } -} - // Set the mode and extended function of a pin void gpio_peripheral(int bank, int pin, int func, int pullup) |