From f9d5f0a10ccef59029a135779cbe3261224cbbb0 Mon Sep 17 00:00:00 2001 From: Jacques Germishuys Date: Fri, 4 Aug 2017 21:02:44 +0200 Subject: [PATCH] use F_CPU for the AVR CPU frequency (if available) --- ports/avr/atomport-private.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/avr/atomport-private.h b/ports/avr/atomport-private.h index 877535c..70f91d1 100644 --- a/ports/avr/atomport-private.h +++ b/ports/avr/atomport-private.h @@ -31,7 +31,11 @@ #define __ATOM_PORT_PRIVATE_H /* CPU Frequency */ +#ifdef F_CPU +#define AVR_CPU_HZ F_CPU +#else #define AVR_CPU_HZ 1000000 +#endif #ifdef __cplusplus extern "C" {