atsam: Add get_pclock_frequency() helper function
Add get_pclock_frequency() and use it to calculate peripheral clocks. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -56,6 +56,13 @@ enable_pclock(uint32_t id)
|
||||
PMC->PMC_PCER1 = 1 << (id - 32);
|
||||
}
|
||||
|
||||
// Return the frequency of the given peripheral clock
|
||||
uint32_t
|
||||
get_pclock_frequency(uint32_t id)
|
||||
{
|
||||
return CONFIG_CLOCK_FREQ;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* Resets
|
||||
|
||||
Reference in New Issue
Block a user