File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 29
29
30
30
#include <stdint.h>
31
31
32
+ /** @brief To be called once every ms
33
+ *
34
+ * The port must call supervisor_tick once per millisecond to perform regular tasks.
35
+ * This is called from the SysTick interrupt or similar, and is safe to call in an
36
+ * interrupt context.
37
+ */
32
38
extern void supervisor_tick (void );
39
+ /** @brief Get the lower 32 bits of the time in milliseconds
40
+ *
41
+ * This can be more efficient than supervisor_ticks_ms64, for sites where a wraparound
42
+ * of ~49.5 days is not harmful.
43
+ */
33
44
extern uint32_t supervisor_ticks_ms32 (void );
45
+ /** @brief Get the full time in milliseconds
46
+ *
47
+ * Because common ARM mcus cannot atomically work with 64-bit quantities, this
48
+ * function must briefly disable interrupts in order to return the value. If
49
+ * only relative durations of less than about ~49.5 days need to be considered,
50
+ * then it may be possible to use supervisor_ticks_ms64 instead.
51
+ */
34
52
extern uint64_t supervisor_ticks_ms64 (void );
53
+ /** @brief Run background ticks, but only about every millisecond.
54
+ *
55
+ * Normally, this is not called directly. Instead use the RUN_BACKGROUND_TASKS
56
+ * macro.
57
+ */
35
58
extern void supervisor_run_background_if_tick (void );
36
59
37
60
#endif
You can’t perform that action at this time.
0 commit comments