diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2020-10-16 00:15:16 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2020-11-24 01:07:17 +1100 |
commit | 0e8af2b3708ab3e499491836d481b10e030408f8 (patch) | |
tree | ea916e958ac0099f197ce080d65c8e2f453266e9 /py | |
parent | 64180f0742a1926162b784c68bafa49b9b58596c (diff) |
extmod/modbluetooth: Add API for L2CAP channels.
Also known as L2CAP "connection oriented channels". This provides a
socket-like data transfer mechanism for BLE.
Currently only implemented for NimBLE on STM32 / Unix.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'py')
-rw-r--r-- | py/misc.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -53,6 +53,9 @@ typedef unsigned int uint; // Static assertion macro #define MP_STATIC_ASSERT(cond) ((void)sizeof(char[1 - 2 * !(cond)])) +// Round-up integer division +#define MP_CEIL_DIVIDE(a, b) (((a) + (b) - 1) / (b)) + /** memory allocation ******************************************/ // TODO make a lazy m_renew that can increase by a smaller amount than requested (but by at least 1 more element) |