diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-30 03:02:07 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-30 03:02:07 +0300 |
commit | 76146b3d9ab0ab88ce0f0d1cfa0235ec0758a4a9 (patch) | |
tree | 2cdb6fe084bd8e19831fd165f9fcbf49f7885b7c /py/mpconfig.h | |
parent | 1ba4db5685b0f5a0b06020a01cf47aa952a52588 (diff) | |
download | micropython-76146b3d9ab0ab88ce0f0d1cfa0235ec0758a4a9.tar.gz micropython-76146b3d9ab0ab88ce0f0d1cfa0235ec0758a4a9.zip |
extmod/utime_mphal: Allow ticks functions period be configurable by a port.
Using MICROPY_PY_UTIME_TICKS_PERIOD config var.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r-- | py/mpconfig.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index dcdaffe0f4..fce9976928 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -866,6 +866,16 @@ typedef double mp_float_t; #define MICROPY_PY_UTIME_MP_HAL (0) #endif +// Period of values returned by utime.ticks_ms(), ticks_us(), ticks_cpu() +// functions. Should be power of two. All functions above use the same +// period, so if underlying hardware/API has different periods, the +// minimum of them should be used. The value below is the maximum value +// this parameter can take (corresponding to 30 bit tick values on 32-bit +// system). +#ifndef MICROPY_PY_UTIME_TICKS_PERIOD +#define MICROPY_PY_UTIME_TICKS_PERIOD (MP_SMALL_INT_POSITIVE_MASK + 1) +#endif + // Whether to provide "_thread" module #ifndef MICROPY_PY_THREAD #define MICROPY_PY_THREAD (0) |