summaryrefslogtreecommitdiff
path: root/shared-bindings/_bleio/Descriptor.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-bindings/_bleio/Descriptor.c')
-rw-r--r--shared-bindings/_bleio/Descriptor.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/shared-bindings/_bleio/Descriptor.c b/shared-bindings/_bleio/Descriptor.c
index 60f0acf44..0eee9d704 100644
--- a/shared-bindings/_bleio/Descriptor.c
+++ b/shared-bindings/_bleio/Descriptor.c
@@ -74,11 +74,11 @@ STATIC mp_obj_t bleio_descriptor_add_to_characteristic(size_t n_args, const mp_o
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_characteristic, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_uuid, MP_ARG_REQUIRED | MP_ARG_OBJ },
- { MP_QSTR_read_perm, MP_ARG_KW_ONLY| MP_ARG_INT, {.u_int = SECURITY_MODE_OPEN} },
- { MP_QSTR_write_perm, MP_ARG_KW_ONLY| MP_ARG_INT, {.u_int = SECURITY_MODE_OPEN} },
- { MP_QSTR_max_length, MP_ARG_KW_ONLY| MP_ARG_INT, {.u_int = 20} },
- { MP_QSTR_fixed_length, MP_ARG_KW_ONLY| MP_ARG_BOOL, {.u_bool = false} },
- { MP_QSTR_initial_value, MP_ARG_KW_ONLY| MP_ARG_OBJ, {.u_obj = mp_const_empty_bytes} },
+ { MP_QSTR_read_perm, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = SECURITY_MODE_OPEN} },
+ { MP_QSTR_write_perm, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = SECURITY_MODE_OPEN} },
+ { MP_QSTR_max_length, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 20} },
+ { MP_QSTR_fixed_length, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} },
+ { MP_QSTR_initial_value, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_empty_bytes} },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
@@ -104,8 +104,8 @@ STATIC mp_obj_t bleio_descriptor_add_to_characteristic(size_t n_args, const mp_o
if (max_length_int < 0) {
mp_raise_ValueError(translate("max_length must be >= 0"));
}
- const size_t max_length = (size_t) max_length_int;
- const bool fixed_length = args[ARG_fixed_length].u_bool;
+ const size_t max_length = (size_t)max_length_int;
+ const bool fixed_length = args[ARG_fixed_length].u_bool;
mp_obj_t initial_value = args[ARG_initial_value].u_obj;
mp_buffer_info_t initial_value_bufinfo;
@@ -119,7 +119,7 @@ STATIC mp_obj_t bleio_descriptor_add_to_characteristic(size_t n_args, const mp_o
mp_get_buffer_raise(initial_value, &initial_value_bufinfo, MP_BUFFER_READ);
if (initial_value_bufinfo.len > max_length ||
(fixed_length && initial_value_bufinfo.len != max_length)) {
- mp_raise_ValueError(translate("initial_value length is wrong"));
+ mp_raise_ValueError(translate("initial_value length is wrong"));
}
bleio_descriptor_obj_t *descriptor = m_new_obj(bleio_descriptor_obj_t);
@@ -229,5 +229,5 @@ const mp_obj_type_t bleio_descriptor_type = {
{ &mp_type_type },
.name = MP_QSTR_Descriptor,
.print = bleio_descriptor_print,
- .locals_dict = (mp_obj_dict_t*)&bleio_descriptor_locals_dict
+ .locals_dict = (mp_obj_dict_t *)&bleio_descriptor_locals_dict
};