summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-01-29 11:44:40 -0800
committerGitHub <noreply@github.com>2020-01-29 11:44:40 -0800
commit7d4f9fc99f07e050b028a2acaeb329ee3931f3b5 (patch)
treee47aa586fff244295fd2a3d9d45efb757853c188
parentac55143c64bf3e6bf76f45ea6986652d04397583 (diff)
parente21580b67fb476ac89955407af01cf6406b3b388 (diff)
Merge pull request #2554 from dhalbert/packetbuffer-packet_size
PacketBuffer.packet_size was returning bool instead of int
-rw-r--r--shared-bindings/_bleio/Characteristic.c2
-rw-r--r--shared-bindings/_bleio/PacketBuffer.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/shared-bindings/_bleio/Characteristic.c b/shared-bindings/_bleio/Characteristic.c
index 2b1dc1f78..e55191f7c 100644
--- a/shared-bindings/_bleio/Characteristic.c
+++ b/shared-bindings/_bleio/Characteristic.c
@@ -49,7 +49,7 @@
//| as part of remote Services.
//|
-//| .. method:: add_to_service(service, uuid, *, properties=0, read_perm=`Attribute.OPEN`, write_perm=`Attribute.OPEN`, max_length=20, fixed_length=False, initial_value=None)
+//| .. method:: add_to_service(service, uuid, *, properties=0, read_perm=Attribute.OPEN, write_perm=Attribute.OPEN, max_length=20, fixed_length=False, initial_value=None)
//|
//| Create a new Characteristic object, and add it to this Service.
//|
diff --git a/shared-bindings/_bleio/PacketBuffer.c b/shared-bindings/_bleio/PacketBuffer.c
index f9f171870..3ed295f01 100644
--- a/shared-bindings/_bleio/PacketBuffer.c
+++ b/shared-bindings/_bleio/PacketBuffer.c
@@ -163,13 +163,13 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_deinit_obj, bleio_packet_bu
//| .. attribute:: packet_size
//|
-//| Maximum size of each packet in bytes. This is the minimum of the Characterstic length and
+//| Maximum size of each packet in bytes. This is the minimum of the Characteristic length and
//| the negotiated Maximum Transfer Unit (MTU).
//|
STATIC mp_obj_t bleio_packet_buffer_get_packet_size(mp_obj_t self_in) {
bleio_packet_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in);
- return mp_obj_new_bool(common_hal_bleio_packet_buffer_get_packet_size(self));
+ return MP_OBJ_NEW_SMALL_INT(common_hal_bleio_packet_buffer_get_packet_size(self));
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_get_packet_size_obj, bleio_packet_buffer_get_packet_size);