71
71
//| ...
72
72
//|
73
73
74
- //| enabled: bool = ...
74
+ //| enabled: bool
75
75
//| """State of the BLE adapter."""
76
76
//|
77
77
STATIC mp_obj_t bleio_adapter_get_enabled (mp_obj_t self ) {
@@ -95,7 +95,7 @@ const mp_obj_property_t bleio_adapter_enabled_obj = {
95
95
(mp_obj_t )& mp_const_none_obj },
96
96
};
97
97
98
- //| address: Address = ...
98
+ //| address: Address
99
99
//| """MAC address of the BLE adapter. (read-only)"""
100
100
//|
101
101
STATIC mp_obj_t bleio_adapter_get_address (mp_obj_t self ) {
@@ -111,7 +111,7 @@ const mp_obj_property_t bleio_adapter_address_obj = {
111
111
(mp_obj_t )& mp_const_none_obj },
112
112
};
113
113
114
- //| name: str = ...
114
+ //| name: str
115
115
//| """name of the BLE adapter used once connected.
116
116
//| The name is "CIRCUITPY" + the last four hex digits of ``adapter.address``,
117
117
//| to make it easy to distinguish multiple CircuitPython boards."""
@@ -135,7 +135,7 @@ const mp_obj_property_t bleio_adapter_name_obj = {
135
135
(mp_obj_t )& mp_const_none_obj },
136
136
};
137
137
138
- //| def start_advertising(self, data: buf , *, scan_response: buf = None, connectable: bool = True, anonymous: bool = False, timeout: int = 0, interval: float = 0.1) -> None:
138
+ //| def start_advertising(self, data: ReadableBuffer , *, scan_response: Optional[ReadableBuffer] = None, connectable: bool = True, anonymous: bool = False, timeout: int = 0, interval: float = 0.1) -> None:
139
139
//| """Starts advertising until `stop_advertising` is called or if connectable, another device
140
140
//| connects to us.
141
141
//|
@@ -215,7 +215,7 @@ STATIC mp_obj_t bleio_adapter_stop_advertising(mp_obj_t self_in) {
215
215
}
216
216
STATIC MP_DEFINE_CONST_FUN_OBJ_1 (bleio_adapter_stop_advertising_obj , bleio_adapter_stop_advertising );
217
217
218
- //| def start_scan(self, prefixes: sequence = b"", *, buffer_size: int = 512, extended: bool = False, timeout: float = None, interval: float = 0.1, window: float = 0.1, minimum_rssi: int = -80, active: bool = True) -> iterable :
218
+ //| def start_scan(self, prefixes: ReadableBuffer = b"", *, buffer_size: int = 512, extended: bool = False, timeout: Optional[ float] = None, interval: float = 0.1, window: float = 0.1, minimum_rssi: int = -80, active: bool = True) -> Iterable[ScanEntry] :
219
219
//| """Starts a BLE scan and returns an iterator of results. Advertisements and scan responses are
220
220
//| filtered and returned separately.
221
221
//|
@@ -301,7 +301,7 @@ STATIC mp_obj_t bleio_adapter_stop_scan(mp_obj_t self_in) {
301
301
}
302
302
STATIC MP_DEFINE_CONST_FUN_OBJ_1 (bleio_adapter_stop_scan_obj , bleio_adapter_stop_scan );
303
303
304
- //| advertising: bool = ...
304
+ //| advertising: bool
305
305
//| """True when the adapter is currently advertising. (read-only)"""
306
306
//|
307
307
STATIC mp_obj_t bleio_adapter_get_advertising (mp_obj_t self ) {
@@ -317,7 +317,7 @@ const mp_obj_property_t bleio_adapter_advertising_obj = {
317
317
(mp_obj_t )& mp_const_none_obj },
318
318
};
319
319
320
- //| connected: bool = ...
320
+ //| connected: bool
321
321
//| """True when the adapter is connected to another device regardless of who initiated the
322
322
//| connection. (read-only)"""
323
323
//|
@@ -334,7 +334,7 @@ const mp_obj_property_t bleio_adapter_connected_obj = {
334
334
(mp_obj_t )& mp_const_none_obj },
335
335
};
336
336
337
- //| connections: tuple = ...
337
+ //| connections: tuple
338
338
//| """Tuple of active connections including those initiated through
339
339
//| :py:meth:`_bleio.Adapter.connect`. (read-only)"""
340
340
//|
@@ -350,11 +350,11 @@ const mp_obj_property_t bleio_adapter_connections_obj = {
350
350
(mp_obj_t )& mp_const_none_obj },
351
351
};
352
352
353
- //| def connect(self, address: Address, *, timeout: float/int ) -> Connection:
353
+ //| def connect(self, address: Address, *, timeout: float) -> Connection:
354
354
//| """Attempts a connection to the device with the given address.
355
355
//|
356
356
//| :param Address address: The address of the peripheral to connect to
357
- //| :param float/int timeout: Try to connect for timeout seconds."""
357
+ //| :param float timeout: Try to connect for timeout seconds."""
358
358
//| ...
359
359
//|
360
360
STATIC mp_obj_t bleio_adapter_connect (mp_uint_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
0 commit comments