diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-03-28 12:11:02 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-03-30 10:56:17 -0400 |
commit | 18f4d343f5c90ea241a04819e10708c6f1a4d0cc (patch) | |
tree | c895af049a489760d7663551c1a45767b1b01b93 /src/avr/timer.c | |
parent | 31e78c90e2f3c267779237e9cfaa3465e1571a87 (diff) | |
download | kutter-18f4d343f5c90ea241a04819e10708c6f1a4d0cc.tar.gz kutter-18f4d343f5c90ea241a04819e10708c6f1a4d0cc.tar.xz kutter-18f4d343f5c90ea241a04819e10708c6f1a4d0cc.zip |
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>
Diffstat (limited to 'src/avr/timer.c')
-rw-r--r-- | src/avr/timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/avr/timer.c b/src/avr/timer.c index c9c3ccca..588669c1 100644 --- a/src/avr/timer.c +++ b/src/avr/timer.c @@ -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 { |