mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-20 21:27:53 -06:00
avr: Remove F_CPU compile time definition
Directly use the Kconfig defined CONFIG_CLOCK_FREQ in the code and avoid defining F_CPU. Also, remove the unnecessary O2 option - that is already the default from the main makefile. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
31e78c90e2
commit
18f4d343f5
3 changed files with 7 additions and 5 deletions
|
@ -16,13 +16,13 @@
|
|||
* Low level timer code
|
||||
****************************************************************/
|
||||
|
||||
DECL_CONSTANT(CLOCK_FREQ, F_CPU);
|
||||
DECL_CONSTANT(CLOCK_FREQ, CONFIG_CLOCK_FREQ);
|
||||
|
||||
// Return the number of clock ticks for a given number of microseconds
|
||||
uint32_t
|
||||
timer_from_us(uint32_t us)
|
||||
{
|
||||
return us * (F_CPU / 1000000);
|
||||
return us * (CONFIG_CLOCK_FREQ / 1000000);
|
||||
}
|
||||
|
||||
union u32_u {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue