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>
This commit is contained in:
@@ -29,7 +29,7 @@ i2c_init(void)
|
||||
gpio_peripheral(0, 1, 3, 0);
|
||||
|
||||
// Set 100Khz frequency
|
||||
enable_peripheral_clock(PCLK_I2C1);
|
||||
enable_pclock(PCLK_I2C1);
|
||||
uint32_t pclk = SystemCoreClock, pulse = pclk / (100000 * 2);
|
||||
LPC_I2C1->I2SCLL = pulse;
|
||||
LPC_I2C1->I2SCLH = pulse;
|
||||
|
||||
Reference in New Issue
Block a user