From fbe6abaa4f3f21091701fa1aa9ec04b3fe5e4eca Mon Sep 17 00:00:00 2001 From: klassents Date: Fri, 20 Sep 2024 08:43:58 +0700 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B0=20=D0=B4=D0=B5=D1=84=D0=B0=D0=B9=D0=BD=D1=8B,=20=D0=BD?= =?UTF-8?q?=D0=B5=D0=BE=D0=B1=D1=85=D0=BE=D0=B4=D0=B8=D0=BC=D1=8B=D0=B5=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BD=D0=B5=D0=BA=D0=BE=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D1=8B=D1=85=20=D0=B1=D0=B8=D0=B1=D0=BB=D0=B8=D0=BE=D1=82=D0=B5?= =?UTF-8?q?=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/arduino/wiring_time.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cores/arduino/wiring_time.h b/cores/arduino/wiring_time.h index da9698b..9f1e690 100644 --- a/cores/arduino/wiring_time.h +++ b/cores/arduino/wiring_time.h @@ -24,6 +24,10 @@ extern "C" { #endif +#define clockCyclesPerMicrosecond() (F_CPU / 1000000L) +#define clockCyclesToMicroseconds(a) ((a) / clockCyclesPerMicrosecond()) +#define microsecondsToClockCycles(a) ((a) * clockCyclesPerMicrosecond()) + /** * \brief Initialize timer for creating delays *