diff --git a/STM32F1/cores/maple/wirish.h b/STM32F1/cores/maple/wirish.h index 8064246..c2ab4f3 100644 --- a/STM32F1/cores/maple/wirish.h +++ b/STM32F1/cores/maple/wirish.h @@ -98,5 +98,10 @@ typedef unsigned int word; #ifndef _BV #define _BV(bit) (1 << (bit)) #endif + +#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (F_CPU / 1000L) ) +#define microsecondsToClockCycles(a) ( (a) * (F_CPU / 1000000L) ) + #endif