aboutsummaryrefslogtreecommitdiff
path: root/extmod/modbluetooth.c
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2020-07-20 11:46:55 +1000
committerDamien George <damien@micropython.org>2020-07-20 23:25:56 +1000
commit3c7ca2004c78ec386e136b947ed5e05a39b61aaf (patch)
tree38ff8c43242beccbaf8cbe620a2003d62b83d5b4 /extmod/modbluetooth.c
parent43ceadac5503ac6854dd0d400bd13b93f36dd6a6 (diff)
extmod/modbluetooth: Fix so it builds in peripheral-only mode.
Diffstat (limited to 'extmod/modbluetooth.c')
-rw-r--r--extmod/modbluetooth.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/extmod/modbluetooth.c b/extmod/modbluetooth.c
index ced67365a..fb5c6ac8c 100644
--- a/extmod/modbluetooth.c
+++ b/extmod/modbluetooth.c
@@ -836,10 +836,12 @@ STATIC void ringbuf_extract(ringbuf_t *ringbuf, mp_obj_tuple_t *data_tuple, size
// Note the int8_t got packed into the ringbuf as a uint8_t.
data_tuple->items[j++] = MP_OBJ_NEW_SMALL_INT((int8_t)ringbuf_get(ringbuf));
}
+ #if MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE
if (uuid) {
ringbuf_get_uuid(ringbuf, uuid);
data_tuple->items[j++] = MP_OBJ_FROM_PTR(uuid);
}
+ #endif
// The code that enqueues into the ringbuf should ensure that it doesn't
// put more than bt->irq_data_data_alloc bytes into the ringbuf, because
// that's what's available here in bt->irq_data_bytes.