diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-12 16:15:47 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-12 22:04:21 +0200 |
commit | c260bc58e66f5fefc03b59c80c91a550282fb47c (patch) | |
tree | 0e2b33b04d874aaa0c0d67a6df669ca7afe085c3 /py | |
parent | fc5aac82cb9dd2aeb1dd6bc53301d70e9002afa5 (diff) | |
download | micropython-c260bc58e66f5fefc03b59c80c91a550282fb47c.tar.gz micropython-c260bc58e66f5fefc03b59c80c91a550282fb47c.zip |
Add WORD_MSBIT_HIGH define - machine_int_t with the highest bit set.
Diffstat (limited to 'py')
-rw-r--r-- | py/mpconfig.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index d1f4840cfb..6deb442b8d 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -78,6 +78,8 @@ #define BITS_PER_BYTE (8) #define BITS_PER_WORD (BITS_PER_BYTE * BYTES_PER_WORD) +// machine_int_t value with most significant bit set +#define WORD_MSBIT_HIGH (1 << (BYTES_PER_WORD * 8 - 1)) // printf format spec to use for machine_int_t and friends #ifndef INT_FMT |