diff options
Diffstat (limited to 'shared-bindings/_bleio/Characteristic.c')
| -rw-r--r-- | shared-bindings/_bleio/Characteristic.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/shared-bindings/_bleio/Characteristic.c b/shared-bindings/_bleio/Characteristic.c index 785b677d6..593d8edcb 100644 --- a/shared-bindings/_bleio/Characteristic.c +++ b/shared-bindings/_bleio/Characteristic.c @@ -37,7 +37,7 @@ //| """Stores information about a BLE service characteristic and allows reading //| and writing of the characteristic's value.""" //| -//| def __init__(self, ): +//| def __init__(self) -> None: //| """There is no regular constructor for a Characteristic. A new local Characteristic can be created //| and attached to a Service by calling `add_to_service()`. //| Remote Characteristic objects are created by `Connection.discover_remote_services()` @@ -45,7 +45,7 @@ //| ... //| -//| def add_to_service(self, service: Service, uuid: UUID, *, properties: int = 0, read_perm: int = Attribute.OPEN, write_perm: int = Attribute.OPEN, max_length: int = 20, fixed_length: bool = False, initial_value: buf = None) -> Any: +//| def add_to_service(self, service: Service, uuid: UUID, *, properties: int = 0, read_perm: int = Attribute.OPEN, write_perm: int = Attribute.OPEN, max_length: int = 20, fixed_length: bool = False, initial_value: buf = None) -> Characteristic: //| """Create a new Characteristic object, and add it to this Service. //| //| :param Service service: The service that will provide this characteristic @@ -141,7 +141,7 @@ STATIC MP_DEFINE_CONST_CLASSMETHOD_OBJ(bleio_characteristic_add_to_service_obj, -//| properties: Any = ... +//| properties: int = ... //| """An int bitmask representing which properties are set, specified as bitwise or'ing of //| of these possible values. //| `BROADCAST`, `INDICATE`, `NOTIFY`, `READ`, `WRITE`, `WRITE_NO_RESPONSE`.""" @@ -160,7 +160,7 @@ const mp_obj_property_t bleio_characteristic_properties_obj = { (mp_obj_t)&mp_const_none_obj }, }; -//| uuid: Any = ... +//| uuid: Optional[UUID] = ... //| """The UUID of this characteristic. (read-only) //| //| Will be ``None`` if the 128-bit UUID for this characteristic is not known.""" @@ -180,7 +180,7 @@ const mp_obj_property_t bleio_characteristic_uuid_obj = { (mp_obj_t)&mp_const_none_obj }, }; -//| value: Any = ... +//| value: bytearray = ... //| """The value of this characteristic.""" //| STATIC mp_obj_t bleio_characteristic_get_value(mp_obj_t self_in) { @@ -211,7 +211,7 @@ const mp_obj_property_t bleio_characteristic_value_obj = { (mp_obj_t)&mp_const_none_obj }, }; -//| descriptors: Any = ... +//| descriptors: Descriptor = ... //| """A tuple of :py:class:`Descriptor` that describe this characteristic. (read-only)""" //| STATIC mp_obj_t bleio_characteristic_get_descriptors(mp_obj_t self_in) { @@ -241,7 +241,7 @@ const mp_obj_property_t bleio_characteristic_descriptors_obj = { (mp_obj_t)&mp_const_none_obj }, }; -//| service: Any = ... +//| service: Service = ... //| """The Service this Characteristic is a part of.""" //| STATIC mp_obj_t bleio_characteristic_get_service(mp_obj_t self_in) { @@ -258,7 +258,7 @@ const mp_obj_property_t bleio_characteristic_service_obj = { (mp_obj_t)&mp_const_none_obj }, }; -//| def set_cccd(self, *, notify: bool = False, indicate: float = False) -> Any: +//| def set_cccd(self, *, notify: bool = False, indicate: float = False) -> None: //| """Set the remote characteristic's CCCD to enable or disable notification and indication. //| //| :param bool notify: True if Characteristic should receive notifications of remote writes @@ -291,22 +291,22 @@ STATIC const mp_rom_map_elem_t bleio_characteristic_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_cccd), MP_ROM_PTR(&bleio_characteristic_set_cccd_obj) }, // Bitmask constants to represent properties -//| BROADCAST: Any = ... +//| BROADCAST: int = ... //| """property: allowed in advertising packets""" //| -//| INDICATE: Any = ... +//| INDICATE: int = ... //| """property: server will indicate to the client when the value is set and wait for a response""" //| -//| NOTIFY: Any = ... +//| NOTIFY: int = ... //| """property: server will notify the client when the value is set""" //| -//| READ: Any = ... +//| READ: int = ... //| """property: clients may read this characteristic""" //| -//| WRITE: Any = ... +//| WRITE: int = ... //| """property: clients may write this characteristic; a response will be sent back""" //| -//| WRITE_NO_RESPONSE: Any = ... +//| WRITE_NO_RESPONSE: int = ... //| """property: clients may write this characteristic; no response will be sent back""" //| { MP_ROM_QSTR(MP_QSTR_BROADCAST), MP_ROM_INT(CHAR_PROP_BROADCAST) }, |
