summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2021-08-10 01:09:31 +1000
committerDamien George <damien@micropython.org>2021-08-19 22:50:32 +1000
commite64cda529521feb41cda3cc80d1074217816ee6c (patch)
tree351f6d172adfb395885ce0a3d18ed6eeef899566 /py
parent870000f35b2d278bd759c54ac59e2f97fcdc7dfd (diff)
stm32: Add implementation of machine.bitstream.
Hand-written version for M0, and cycle-counter version for everything else. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'py')
-rw-r--r--py/misc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/misc.h b/py/misc.h
index 953809838..e1d27dc7b 100644
--- a/py/misc.h
+++ b/py/misc.h
@@ -55,6 +55,7 @@ typedef unsigned int uint;
// Round-up integer division
#define MP_CEIL_DIVIDE(a, b) (((a) + (b) - 1) / (b))
+#define MP_ROUND_DIVIDE(a, b) (((a) + (b) / 2) / (b))
/** memory allocation ******************************************/