From 91c9d519ae74923eec7f95dd606f83555a21f751 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 22 Oct 2019 23:09:56 -0700 Subject: Refine comments and switch prefix_len to size_t --- shared-bindings/_bleio/Adapter.c | 6 +++--- shared-bindings/_bleio/Adapter.h | 2 +- shared-bindings/_bleio/Service.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'shared-bindings') diff --git a/shared-bindings/_bleio/Adapter.c b/shared-bindings/_bleio/Adapter.c index 01dba0491..a64167e5a 100644 --- a/shared-bindings/_bleio/Adapter.c +++ b/shared-bindings/_bleio/Adapter.c @@ -61,8 +61,8 @@ //| additional functionality available after the devices establish a connection. For example, a //| BLE keyboard may advertise that it can provide key information, but not what the key info is. //| -//| The built-in BLE adapter can do both parts of this process, it can scan for other device -//| advertisements and it can advertise it's own data. Furthermore, Adapters can accept incoming +//| The built-in BLE adapter can do both parts of this process: it can scan for other device +//| advertisements and it can advertise its own data. Furthermore, Adapters can accept incoming //| connections and also initiate connections. //| @@ -207,7 +207,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_stop_advertising_obj, bleio_adapt //| filtered and returned separately. //| //| :param sequence prefixes: Sequence of byte string prefixes to filter advertising packets -//| with. A packets without an advertising structure that matches one of the prefixes are +//| with. A packet without an advertising structure that matches one of the prefixes is //| ignored. Format is one byte for length (n) and n bytes of prefix and can be repeated. //| :param int buffer_size: the maximum number of advertising bytes to buffer. //| :param bool extended: When True, support extended advertising packets. Increasing buffer_size is recommended when this is set. diff --git a/shared-bindings/_bleio/Adapter.h b/shared-bindings/_bleio/Adapter.h index 95d19cb31..2ff77f755 100644 --- a/shared-bindings/_bleio/Adapter.h +++ b/shared-bindings/_bleio/Adapter.h @@ -50,7 +50,7 @@ extern uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t extern void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo); void common_hal_bleio_adapter_stop_advertising(bleio_adapter_obj_t *self); -mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t* prefixes, uint8_t prefix_length, bool extended, mp_int_t buffer_size, mp_float_t timeout, mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active); +mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t* prefixes, size_t prefix_length, bool extended, mp_int_t buffer_size, mp_float_t timeout, mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active); void common_hal_bleio_adapter_stop_scan(bleio_adapter_obj_t *self); bool common_hal_bleio_adapter_get_connected(bleio_adapter_obj_t *self); diff --git a/shared-bindings/_bleio/Service.c b/shared-bindings/_bleio/Service.c index 68605cec0..52dea592e 100644 --- a/shared-bindings/_bleio/Service.c +++ b/shared-bindings/_bleio/Service.c @@ -45,10 +45,10 @@ //| connections. This is known as a Service server. Client Service objects are created via //| `Connection.discover_remote_services`. //| -//| To mark the Server as secondary, pass `True` as :py:data:`secondary`. +//| To mark the Service as secondary, pass `True` as :py:data:`secondary`. //| -//| :param UUID uuid: The uuid of the server -//| :param bool secondary: If the server is a secondary one +//| :param UUID uuid: The uuid of the service +//| :param bool secondary: If the service is a secondary one // //| :return: the new Service //| -- cgit v1.2.3