summaryrefslogtreecommitdiff
path: root/shared-bindings/bleio/UUID.c
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-06-13 21:55:07 -0400
committerDan Halbert <halbert@halwitz.org>2019-06-13 21:55:07 -0400
commitbed6d43a768838fd3bc5d2048bf7acdc6e9b0a33 (patch)
tree814683e585940b502d4e47f8556a69045729c77a /shared-bindings/bleio/UUID.c
parent6fed24e1b6fce58f2c06328b9bc8b8f9d9512b42 (diff)
parent6be7cf7440acb827d4b0f767b6083a859499b045 (diff)
merge from upstream; WIP redo Address; no more AddressType
Diffstat (limited to 'shared-bindings/bleio/UUID.c')
-rw-r--r--shared-bindings/bleio/UUID.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/shared-bindings/bleio/UUID.c b/shared-bindings/bleio/UUID.c
index d054ea719..f79dfa675 100644
--- a/shared-bindings/bleio/UUID.c
+++ b/shared-bindings/bleio/UUID.c
@@ -47,10 +47,11 @@
//| The value can be one of:
//|
//| - an `int` value in range 0 to 0xFFFF (Bluetooth SIG 16-bit UUID)
-//| - a buffer object (bytearray, bytes) of 16 bytes in little-endian order (128-bit UUID)
+//| - a buffer object (bytearray, bytes) of 16 bytes in little-endian order (128-bit UUID)
//| - a string of hex digits of the form 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
//|
//| :param value: The uuid value to encapsulate
+//| :type value: int or typing.ByteString
//|
STATIC mp_obj_t bleio_uuid_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
mp_arg_check_num(n_args, kw_args, 1, 1, false);
@@ -125,6 +126,8 @@ STATIC mp_obj_t bleio_uuid_make_new(const mp_obj_type_t *type, size_t n_args, co
//|
//| The 16-bit part of the UUID. (read-only)
//|
+//| :type: int
+//|
STATIC mp_obj_t bleio_uuid_get_uuid16(mp_obj_t self_in) {
bleio_uuid_obj_t *self = MP_OBJ_TO_PTR(self_in);
return MP_OBJ_NEW_SMALL_INT(common_hal_bleio_uuid_get_uuid16(self));
@@ -141,9 +144,11 @@ const mp_obj_property_t bleio_uuid_uuid16_obj = {
//| .. attribute:: uuid128
//|
-//| The 128-bit value of the UUID, returned as bytes.
+//| The 128-bit value of the UUID
//| Raises AttributeError if this is a 16-bit UUID. (read-only)
//|
+//| :type: bytes
+//|
STATIC mp_obj_t bleio_uuid_get_uuid128(mp_obj_t self_in) {
bleio_uuid_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -165,9 +170,10 @@ const mp_obj_property_t bleio_uuid_uuid128_obj = {
//| .. attribute:: size
//|
-//| Returns 128 if this UUID represents a 128-bit vendor-specific UUID.
-//| Returns 16 if this UUID represents a 16-bit Bluetooth SIG assigned UUID. (read-only)
-//| 32-bit UUIDs are not currently supported.
+//| 128 if this UUID represents a 128-bit vendor-specific UUID. 16 if this UUID represents a
+//| 16-bit Bluetooth SIG assigned UUID. (read-only) 32-bit UUIDs are not currently supported.
+//|
+//| :type: int
//|
STATIC mp_obj_t bleio_uuid_get_size(mp_obj_t self_in) {
bleio_uuid_obj_t *self = MP_OBJ_TO_PTR(self_in);