summaryrefslogtreecommitdiff
path: root/shared-bindings/countio/Counter.c
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2021-03-16 12:21:50 -0500
committerJeff Epler <jepler@gmail.com>2021-03-16 12:21:50 -0500
commit58679dc038e475d7cd00ee45256b7f906ecc2240 (patch)
tree30cbc3f9e7e4efc81a43f364d554f33c1df34169 /shared-bindings/countio/Counter.c
parent97b6664201de2530c9b92957a5e8d2a68524fa7e (diff)
parentbc690d4070c69e21d9070badc9f56a15d62ffb5d (diff)
Merge remote-tracking branch 'origin/main' into bitmap-read-2
Diffstat (limited to 'shared-bindings/countio/Counter.c')
-rw-r--r--shared-bindings/countio/Counter.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/shared-bindings/countio/Counter.c b/shared-bindings/countio/Counter.c
index 820db5ea9..e03665d63 100644
--- a/shared-bindings/countio/Counter.c
+++ b/shared-bindings/countio/Counter.c
@@ -41,7 +41,7 @@ STATIC mp_obj_t countio_counter_make_new(const mp_obj_type_t *type, size_t n_arg
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
- const mcu_pin_obj_t* pin_a = validate_obj_is_free_pin(args[ARG_pin_a].u_obj);
+ const mcu_pin_obj_t *pin_a = validate_obj_is_free_pin(args[ARG_pin_a].u_obj);
countio_counter_obj_t *self = m_new_obj(countio_counter_obj_t);
@@ -115,12 +115,12 @@ const mp_obj_property_t countio_counter_count_obj = {
//| def reset(self) -> None:
//| """Resets the count back to 0."""
//|
-STATIC mp_obj_t countio_counter_reset(mp_obj_t self_in){
- countio_counter_obj_t *self = MP_OBJ_TO_PTR(self_in);
- check_for_deinit(self);
- //set the position to zero for reset
- common_hal_countio_counter_reset(self);
- return mp_const_none;
+STATIC mp_obj_t countio_counter_reset(mp_obj_t self_in) {
+ countio_counter_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ check_for_deinit(self);
+ // set the position to zero for reset
+ common_hal_countio_counter_reset(self);
+ return mp_const_none;
}
@@ -140,5 +140,5 @@ const mp_obj_type_t countio_counter_type = {
{ &mp_type_type },
.name = MP_QSTR_Counter,
.make_new = countio_counter_make_new,
- .locals_dict = (mp_obj_dict_t*)&countio_counter_locals_dict,
+ .locals_dict = (mp_obj_dict_t *)&countio_counter_locals_dict,
};