6666//| connection = _bleio.adapter.connect(my_entry.address, timeout=10)
6767//|
6868
69- STATIC void ensure_connected (bleio_connection_obj_t * self ) {
69+ void bleio_connection_ensure_connected (bleio_connection_obj_t * self ) {
7070 if (!common_hal_bleio_connection_get_connected (self )) {
7171 mp_raise_bleio_ConnectionError (translate ("Connection has been disconnected and can no longer be used. Create a new connection." ));
7272 }
@@ -106,7 +106,7 @@ STATIC mp_obj_t bleio_connection_pair(mp_uint_t n_args, const mp_obj_t *pos_args
106106 mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
107107 mp_arg_parse_all (n_args - 1 , pos_args + 1 , kw_args , MP_ARRAY_SIZE (allowed_args ), allowed_args , args );
108108
109- ensure_connected (self );
109+ bleio_connection_ensure_connected (self );
110110
111111 common_hal_bleio_connection_pair (self -> connection , args [ARG_bond ].u_bool );
112112 return mp_const_none ;
@@ -148,7 +148,7 @@ STATIC mp_obj_t bleio_connection_discover_remote_services(mp_uint_t n_args, cons
148148 mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
149149 mp_arg_parse_all (n_args - 1 , pos_args + 1 , kw_args , MP_ARRAY_SIZE (allowed_args ), allowed_args , args );
150150
151- ensure_connected (self );
151+ bleio_connection_ensure_connected (self );
152152
153153 return MP_OBJ_FROM_PTR (common_hal_bleio_connection_discover_remote_services (
154154 self ,
@@ -209,7 +209,7 @@ const mp_obj_property_t bleio_connection_paired_obj = {
209209STATIC mp_obj_t bleio_connection_get_connection_interval (mp_obj_t self_in ) {
210210 bleio_connection_obj_t * self = MP_OBJ_TO_PTR (self_in );
211211
212- ensure_connected (self );
212+ bleio_connection_ensure_connected (self );
213213 return mp_obj_new_float (common_hal_bleio_connection_get_connection_interval (self -> connection ));
214214}
215215STATIC MP_DEFINE_CONST_FUN_OBJ_1 (bleio_connection_get_connection_interval_obj , bleio_connection_get_connection_interval );
@@ -219,7 +219,7 @@ STATIC mp_obj_t bleio_connection_set_connection_interval(mp_obj_t self_in, mp_ob
219219
220220 mp_float_t interval = mp_obj_get_float (interval_in );
221221
222- ensure_connected (self );
222+ bleio_connection_ensure_connected (self );
223223 common_hal_bleio_connection_set_connection_interval (self -> connection , interval );
224224
225225 return mp_const_none ;
0 commit comments