summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanicampora <danicampora@gmail.com>2024-08-12 12:46:12 +0100
committerDamien George <damien@micropython.org>2024-09-06 20:42:56 +1000
commit7009c75f237ad0397ac2009c9ff89a30a23b286c (patch)
tree7591fce766ba92c37fffb34e63ed796d673c87f6
parentd68d8fcf9089373a7edd6f743645b0f3ce24d0ad (diff)
zephyr: Enable some core features to get more thread tests passing.
All these features are enabled at the `MICROPY_CONFIG_ROM_LEVEL_CORE_FEATURES` level, and are required to get more of the thread tests passing. Signed-off-by: danicampora <danicampora@gmail.com>
-rw-r--r--ports/zephyr/mpconfigport.h4
-rw-r--r--ports/zephyr/mphalport.h3
2 files changed, 1 insertions, 6 deletions
diff --git a/ports/zephyr/mpconfigport.h b/ports/zephyr/mpconfigport.h
index 024731025..e963e0d85 100644
--- a/ports/zephyr/mpconfigport.h
+++ b/ports/zephyr/mpconfigport.h
@@ -43,17 +43,13 @@
#define MICROPY_HELPER_REPL (1)
#define MICROPY_REPL_AUTO_INDENT (1)
#define MICROPY_KBD_EXCEPTION (1)
-#define MICROPY_CPYTHON_COMPAT (0)
#define MICROPY_PY_ASYNC_AWAIT (0)
-#define MICROPY_PY_ATTRTUPLE (0)
#define MICROPY_PY_BUILTINS_BYTES_HEX (1)
-#define MICROPY_PY_BUILTINS_ENUMERATE (0)
#define MICROPY_PY_BUILTINS_FILTER (0)
#define MICROPY_PY_BUILTINS_MIN_MAX (0)
#define MICROPY_PY_BUILTINS_PROPERTY (0)
#define MICROPY_PY_BUILTINS_RANGE_ATTRS (0)
#define MICROPY_PY_BUILTINS_REVERSED (0)
-#define MICROPY_PY_BUILTINS_SET (0)
#define MICROPY_PY_BUILTINS_STR_COUNT (0)
#define MICROPY_PY_BUILTINS_MEMORYVIEW (1)
#define MICROPY_PY_BUILTINS_HELP (1)
diff --git a/ports/zephyr/mphalport.h b/ports/zephyr/mphalport.h
index 0d086ac29..e1f402cb3 100644
--- a/ports/zephyr/mphalport.h
+++ b/ports/zephyr/mphalport.h
@@ -31,8 +31,7 @@ static inline void mp_hal_delay_ms(mp_uint_t delay) {
}
static inline uint64_t mp_hal_time_ns(void) {
- // Not currently implemented.
- return 0;
+ return k_ticks_to_ns_near64(k_uptime_ticks());
}
#define mp_hal_delay_us_fast(us) (mp_hal_delay_us(us))