We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e03991 commit e85c372Copy full SHA for e85c372
picoRTOS.h
@@ -84,6 +84,15 @@ picoRTOS_pid_t picoRTOS_self(void); /* gets the
84
*/
85
#define PICORTOS_DELAY_USEC(x) (picoRTOS_tick_t)(((x) * CONFIG_TICK_HZ) / 1000000)
86
87
+/* Macro: PICORTOS_DELAY_ELAPSED(ref, x)
88
+ * Checks if a specific delay has passed since ref
89
+ *
90
+ * Parameters:
91
+ * ref - the reference time/tick
92
+ * x - a delay in ticks
93
+ */
94
+#define PICORTOS_DELAY_ELAPSED(ref, x) !((picoRTOS_get_tick() - (ref)) < (x))
95
+
96
/* INTERRUPT MANAGEMENT */
97
98
typedef void (*picoRTOS_isr_fn)(/*@null@*/ void*);
0 commit comments