summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/mphal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/mphal.h b/py/mphal.h
index 66d80705a..6d11f6ddc 100644
--- a/py/mphal.h
+++ b/py/mphal.h
@@ -26,6 +26,7 @@
#ifndef MICROPY_INCLUDED_PY_MPHAL_H
#define MICROPY_INCLUDED_PY_MPHAL_H
+#include <stdint.h>
#include "py/mpconfig.h"
#ifdef MICROPY_MPHALPORT_H
@@ -74,6 +75,11 @@ mp_uint_t mp_hal_ticks_us(void);
mp_uint_t mp_hal_ticks_cpu(void);
#endif
+#ifndef mp_hal_time_ns
+// Nanoseconds since 1970/1/1.
+uint64_t mp_hal_time_ns(void);
+#endif
+
// If port HAL didn't define its own pin API, use generic
// "virtual pin" API from the core.
#ifndef mp_hal_pin_obj_t