lpc176x: Introduce get_pclock_frequency()
Add get_pclock_frequency() - a standard way of obtaining the peripheral clock frequency. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
// Main starting point for LPC176x boards.
|
||||
//
|
||||
// Copyright (C) 2018 Kevin O'Connor <kevin@koconnor.net>
|
||||
// Copyright (C) 2018-2021 Kevin O'Connor <kevin@koconnor.net>
|
||||
//
|
||||
// This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
|
||||
#include "autoconf.h" // CONFIG_CLOCK_FREQ
|
||||
#include "board/armcm_boot.h" // armcm_main
|
||||
#include "internal.h" // enable_pclock
|
||||
#include "sched.h" // sched_main
|
||||
@@ -57,6 +58,13 @@ enable_pclock(uint32_t pclk)
|
||||
}
|
||||
}
|
||||
|
||||
// Return the frequency of the given peripheral clock
|
||||
uint32_t
|
||||
get_pclock_frequency(uint32_t pclk)
|
||||
{
|
||||
return CONFIG_CLOCK_FREQ;
|
||||
}
|
||||
|
||||
// Main entry point - called from armcm_boot.c:ResetHandler()
|
||||
void
|
||||
armcm_main(void)
|
||||
|
||||
Reference in New Issue
Block a user