summaryrefslogtreecommitdiff
path: root/shared-bindings/pwmio
diff options
context:
space:
mode:
Diffstat (limited to 'shared-bindings/pwmio')
-rw-r--r--shared-bindings/pwmio/PWMOut.c10
-rw-r--r--shared-bindings/pwmio/PWMOut.h18
-rw-r--r--shared-bindings/pwmio/__init__.c2
3 files changed, 15 insertions, 15 deletions
diff --git a/shared-bindings/pwmio/PWMOut.c b/shared-bindings/pwmio/PWMOut.c
index da0755592..0f3111485 100644
--- a/shared-bindings/pwmio/PWMOut.c
+++ b/shared-bindings/pwmio/PWMOut.c
@@ -174,8 +174,8 @@ STATIC mp_obj_t pwmio_pwmout_obj_set_duty_cycle(mp_obj_t self_in, mp_obj_t duty_
if (duty < 0 || duty > 0xffff) {
mp_raise_ValueError(translate("PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"));
}
- common_hal_pwmio_pwmout_set_duty_cycle(self, duty);
- return mp_const_none;
+ common_hal_pwmio_pwmout_set_duty_cycle(self, duty);
+ return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(pwmio_pwmout_set_duty_cycle_obj, pwmio_pwmout_obj_set_duty_cycle);
@@ -211,8 +211,8 @@ STATIC mp_obj_t pwmio_pwmout_obj_set_frequency(mp_obj_t self_in, mp_obj_t freque
"PWM frequency not writable when variable_frequency is False on "
"construction."));
}
- common_hal_pwmio_pwmout_set_frequency(self, mp_obj_get_int(frequency));
- return mp_const_none;
+ common_hal_pwmio_pwmout_set_frequency(self, mp_obj_get_int(frequency));
+ return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_2(pwmio_pwmout_set_frequency_obj, pwmio_pwmout_obj_set_frequency);
@@ -241,5 +241,5 @@ const mp_obj_type_t pwmio_pwmout_type = {
{ &mp_type_type },
.name = MP_QSTR_PWMOut,
.make_new = pwmio_pwmout_make_new,
- .locals_dict = (mp_obj_dict_t*)&pwmio_pwmout_locals_dict,
+ .locals_dict = (mp_obj_dict_t *)&pwmio_pwmout_locals_dict,
};
diff --git a/shared-bindings/pwmio/PWMOut.h b/shared-bindings/pwmio/PWMOut.h
index de2ebd1cf..4155ba12d 100644
--- a/shared-bindings/pwmio/PWMOut.h
+++ b/shared-bindings/pwmio/PWMOut.h
@@ -40,16 +40,16 @@ typedef enum pwmout_result_t {
PWMOUT_ALL_TIMERS_IN_USE
} pwmout_result_t;
-extern pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self,
- const mcu_pin_obj_t* pin, uint16_t duty, uint32_t frequency,
+extern pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self,
+ const mcu_pin_obj_t *pin, uint16_t duty, uint32_t frequency,
bool variable_frequency);
-extern void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t* self);
-extern bool common_hal_pwmio_pwmout_deinited(pwmio_pwmout_obj_t* self);
-extern void common_hal_pwmio_pwmout_set_duty_cycle(pwmio_pwmout_obj_t* self, uint16_t duty);
-extern uint16_t common_hal_pwmio_pwmout_get_duty_cycle(pwmio_pwmout_obj_t* self);
-extern void common_hal_pwmio_pwmout_set_frequency(pwmio_pwmout_obj_t* self, uint32_t frequency);
-extern uint32_t common_hal_pwmio_pwmout_get_frequency(pwmio_pwmout_obj_t* self);
-extern bool common_hal_pwmio_pwmout_get_variable_frequency(pwmio_pwmout_obj_t* self);
+extern void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t *self);
+extern bool common_hal_pwmio_pwmout_deinited(pwmio_pwmout_obj_t *self);
+extern void common_hal_pwmio_pwmout_set_duty_cycle(pwmio_pwmout_obj_t *self, uint16_t duty);
+extern uint16_t common_hal_pwmio_pwmout_get_duty_cycle(pwmio_pwmout_obj_t *self);
+extern void common_hal_pwmio_pwmout_set_frequency(pwmio_pwmout_obj_t *self, uint32_t frequency);
+extern uint32_t common_hal_pwmio_pwmout_get_frequency(pwmio_pwmout_obj_t *self);
+extern bool common_hal_pwmio_pwmout_get_variable_frequency(pwmio_pwmout_obj_t *self);
// This is used by the supervisor to claim PWMOut devices indefinitely.
extern void common_hal_pwmio_pwmout_never_reset(pwmio_pwmout_obj_t *self);
diff --git a/shared-bindings/pwmio/__init__.c b/shared-bindings/pwmio/__init__.c
index a51383703..bf4ba31dd 100644
--- a/shared-bindings/pwmio/__init__.c
+++ b/shared-bindings/pwmio/__init__.c
@@ -69,5 +69,5 @@ STATIC MP_DEFINE_CONST_DICT(pwmio_module_globals, pwmio_module_globals_table);
const mp_obj_module_t pwmio_module = {
.base = { &mp_type_module },
- .globals = (mp_obj_dict_t*)&pwmio_module_globals,
+ .globals = (mp_obj_dict_t *)&pwmio_module_globals,
};