summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-12 16:15:47 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-12 22:04:21 +0200
commitc260bc58e66f5fefc03b59c80c91a550282fb47c (patch)
tree0e2b33b04d874aaa0c0d67a6df669ca7afe085c3 /py
parentfc5aac82cb9dd2aeb1dd6bc53301d70e9002afa5 (diff)
downloadmicropython-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.h2
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