summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/mimxrt/main.c2
-rw-r--r--ports/mimxrt/mpconfigport.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/ports/mimxrt/main.c b/ports/mimxrt/main.c
index 761c49174..dddf44e60 100644
--- a/ports/mimxrt/main.c
+++ b/ports/mimxrt/main.c
@@ -115,7 +115,9 @@ int main(void) {
// Execute user scripts.
int ret = pyexec_file_if_exists("boot.py");
+ #if MICROPY_HW_ENABLE_USBDEV
mp_usbd_init();
+ #endif
if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit;
diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h
index 637c38f43..a4c6d6e20 100644
--- a/ports/mimxrt/mpconfigport.h
+++ b/ports/mimxrt/mpconfigport.h
@@ -147,6 +147,8 @@ uint32_t trng_random_u32(void);
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-mimxrt"
#endif
+#define MICROPY_HW_ENABLE_USBDEV (1)
+
// Hooks to add builtins
#if defined(IOMUX_TABLE_ENET)