summaryrefslogtreecommitdiff
path: root/shared-bindings/_bleio/Connection.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-07-22 13:48:45 -0700
committerGitHub <noreply@github.com>2020-07-22 13:48:45 -0700
commit02b71e013adda29cd67172a3782fda8fa5da0bba (patch)
tree4a0230aa6e19e9392908e1b23e83f5e9a4d93128 /shared-bindings/_bleio/Connection.c
parent05a10f7905bfb77f3d5dff2525c9d10375801329 (diff)
parent9e3fa863f1d0dcf8eae54554ffc7016eaa6de157 (diff)
Merge pull request #3107 from dherrada/type_hints
Adding type hints
Diffstat (limited to 'shared-bindings/_bleio/Connection.c')
-rw-r--r--shared-bindings/_bleio/Connection.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/shared-bindings/_bleio/Connection.c b/shared-bindings/_bleio/Connection.c
index 0a96d8a11..5dfbc5a36 100644
--- a/shared-bindings/_bleio/Connection.c
+++ b/shared-bindings/_bleio/Connection.c
@@ -68,13 +68,13 @@ void bleio_connection_ensure_connected(bleio_connection_obj_t *self) {
}
}
-//| def __init__(self, ):
+//| def __init__(self) -> None:
//| """Connections cannot be made directly. Instead, to initiate a connection use `Adapter.connect`.
//| Connections may also be made when another device initiates a connection. To use a Connection
//| created by a peer, read the `Adapter.connections` property.
//| ...
//|
-//| def disconnect(self, ) -> Any:
+//| def disconnect(self) -> Any:
//| ""Disconnects from the remote peripheral. Does nothing if already disconnected."""
//| ...
//|
@@ -87,7 +87,7 @@ STATIC mp_obj_t bleio_connection_disconnect(mp_obj_t self_in) {
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_connection_disconnect_obj, bleio_connection_disconnect);
-//| def pair(self, *, bond: Any = True) -> Any:
+//| def pair(self, *, bond: bool = True) -> None:
//| """Pair to the peer to improve security."""
//| ...
//|
@@ -109,7 +109,7 @@ STATIC mp_obj_t bleio_connection_pair(mp_uint_t n_args, const mp_obj_t *pos_args
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_connection_pair_obj, 1, bleio_connection_pair);
-//| def discover_remote_services(self, service_uuids_whitelist: iterable = None) -> Any:
+//| def discover_remote_services(self, service_uuids_whitelist: iterable = None) -> Service:
//| """Do BLE discovery for all services or for the given service UUIDS,
//| to find their handles and characteristics, and return the discovered services.
//| `Connection.connected` must be True.
@@ -152,7 +152,7 @@ STATIC mp_obj_t bleio_connection_discover_remote_services(mp_uint_t n_args, cons
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_connection_discover_remote_services_obj, 1, bleio_connection_discover_remote_services);
-//| connected: Any = ...
+//| connected: bool = ...
//| """True if connected to the remote peer."""
//|
STATIC mp_obj_t bleio_connection_get_connected(mp_obj_t self_in) {
@@ -170,7 +170,7 @@ const mp_obj_property_t bleio_connection_connected_obj = {
};
-//| paired: Any = ...
+//| paired: bool = ...
//| """True if paired to the remote peer."""
//|
STATIC mp_obj_t bleio_connection_get_paired(mp_obj_t self_in) {
@@ -188,7 +188,7 @@ const mp_obj_property_t bleio_connection_paired_obj = {
};
-//| connection_interval: Any = ...
+//| connection_interval: float = ...
//| """Time between transmissions in milliseconds. Will be multiple of 1.25ms. Lower numbers
//| increase speed and decrease latency but increase power consumption.
//|
@@ -206,7 +206,7 @@ STATIC mp_obj_t bleio_connection_get_connection_interval(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_connection_get_connection_interval_obj, bleio_connection_get_connection_interval);
-//| attribute: Any = ...
+//| attribute: int = ...
//| """The maximum number of data bytes that can be sent in a single transmission,
//| not including overhead bytes.
//|