diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2020-07-21 15:12:04 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2020-07-21 15:12:04 -0700 |
| commit | 1b3bc980683664876c17862762fdbdd5f378ba7d (patch) | |
| tree | bfb734cb54095d56451e1516c34044cfc38f5f91 /py | |
| parent | 900edb2b8e118ff36b708afe65363e5929f00ad8 (diff) | |
| parent | cb7df2e1ed7c9866b43994e4013497702d8da727 (diff) | |
Merge remote-tracking branch 'adafruit/main' into bytearray_find
Diffstat (limited to 'py')
| -rw-r--r-- | py/circuitpy_mpconfig.h | 5 | ||||
| -rw-r--r-- | py/mpz.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index d05a246fc..a7853fabd 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -119,6 +119,7 @@ #define MICROPY_QSTR_BYTES_IN_HASH (1) #define MICROPY_REPL_AUTO_INDENT (1) #define MICROPY_REPL_EVENT_DRIVEN (0) +#define MICROPY_ENABLE_PYSTACK (1) #define MICROPY_STACK_CHECK (1) #define MICROPY_STREAMS_NON_BLOCK (1) #ifndef MICROPY_USE_INTERNAL_PRINTF @@ -785,6 +786,10 @@ void supervisor_run_background_tasks_if_tick(void); #define CIRCUITPY_FILESYSTEM_FLUSH_INTERVAL_MS 1000 #endif +#ifndef CIRCUITPY_PYSTACK_SIZE +#define CIRCUITPY_PYSTACK_SIZE 1024 +#endif + #define CIRCUITPY_BOOT_OUTPUT_FILE "/boot_out.txt" #define CIRCUITPY_VERBOSE_BLE 0 @@ -444,6 +444,10 @@ STATIC size_t mpn_mul(mpz_dig_t *idig, mpz_dig_t *jdig, size_t jlen, mpz_dig_t * } ilen = id - oidig; + // check to prevent usb starvation + #ifdef RUN_BACKGROUND_TASKS + RUN_BACKGROUND_TASKS; + #endif } return ilen; |
