kopia lustrzana https://github.com/micropython/micropython
mimxrt: Define the MICROPY_HW_ENABLE_USBDEV macro.
Previously USB was always enabled, but this created some conflicts when adding guards to other files on other ports. Note the configuration with USB disabled hasn't been tested and probably won't build or run without further work. Signed-off-by: Angus Gratton <angus@redyak.com.au>pull/9497/head
rodzic
47e84751fb
commit
43904acea8
|
@ -115,7 +115,9 @@ int main(void) {
|
||||||
// Execute user scripts.
|
// Execute user scripts.
|
||||||
int ret = pyexec_file_if_exists("boot.py");
|
int ret = pyexec_file_if_exists("boot.py");
|
||||||
|
|
||||||
|
#if MICROPY_HW_ENABLE_USBDEV
|
||||||
mp_usbd_init();
|
mp_usbd_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (ret & PYEXEC_FORCED_EXIT) {
|
if (ret & PYEXEC_FORCED_EXIT) {
|
||||||
goto soft_reset_exit;
|
goto soft_reset_exit;
|
||||||
|
|
|
@ -147,6 +147,8 @@ uint32_t trng_random_u32(void);
|
||||||
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-mimxrt"
|
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-mimxrt"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MICROPY_HW_ENABLE_USBDEV (1)
|
||||||
|
|
||||||
// Hooks to add builtins
|
// Hooks to add builtins
|
||||||
|
|
||||||
#if defined(IOMUX_TABLE_ENET)
|
#if defined(IOMUX_TABLE_ENET)
|
||||||
|
|
Ładowanie…
Reference in New Issue