extmod/modbluetooth: Implement config getter for BLE rxbuf size.

Knowing the buffer size can be important, to ensure that valid data will be
received.
This commit is contained in:
Thomas Friebel
2020-01-01 21:43:23 +01:00
committed by Damien George
parent 3bd2ae1a36
commit f4726735cf
2 changed files with 3 additions and 1 deletions

View File

@@ -293,6 +293,8 @@ STATIC mp_obj_t bluetooth_ble_config(size_t n_args, const mp_obj_t *args, mp_map
mp_bluetooth_get_device_addr(addr);
return mp_obj_new_bytes(addr, MP_ARRAY_SIZE(addr));
}
case MP_QSTR_rxbuf:
return mp_obj_new_int(self->ringbuf.size);
default:
mp_raise_ValueError("unknown config param");
}