summaryrefslogtreecommitdiff
path: root/shared-bindings/nativeio/PWMOut.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2016-12-01 10:33:50 -0800
committerScott Shawcroft <scott.shawcroft@gmail.com>2016-12-01 10:33:50 -0800
commit8ef0dd095a5178babb75e48779a359abbf759ffa (patch)
tree8b94f886af82ea354c593ec2ff365b5fc1feda8c /shared-bindings/nativeio/PWMOut.c
parent915e1e5603f40286b3411ab9a8ceb71878132079 (diff)
Fix two bugs found by clang:
* PWMOut enter and exit weren't hooked up. * end couldn't be negative in I2C.
Diffstat (limited to 'shared-bindings/nativeio/PWMOut.c')
-rw-r--r--shared-bindings/nativeio/PWMOut.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shared-bindings/nativeio/PWMOut.c b/shared-bindings/nativeio/PWMOut.c
index 33084be0c..b60d75fef 100644
--- a/shared-bindings/nativeio/PWMOut.c
+++ b/shared-bindings/nativeio/PWMOut.c
@@ -100,7 +100,7 @@ STATIC mp_obj_t nativeio_pwmout_obj___exit__(size_t n_args, const mp_obj_t *args
common_hal_nativeio_pwmout_deinit(args[0]);
return mp_const_none;
}
-STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(nativeio_pwmout_obj___exit___obj, 4, 4, nativeio_pwmout_obj___exit__);
+STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(nativeio_pwmout___exit___obj, 4, 4, nativeio_pwmout_obj___exit__);
//| .. attribute:: duty_cycle
//|
@@ -135,6 +135,8 @@ mp_obj_property_t nativeio_pwmout_duty_cycle_obj = {
STATIC const mp_rom_map_elem_t nativeio_pwmout_locals_dict_table[] = {
// Methods
+ { MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&nativeio_pwmout___enter___obj) },
+ { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&nativeio_pwmout___exit___obj) },
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&nativeio_pwmout_deinit_obj) },
// Properties