diff options
author | Damien George <damien.p.george@gmail.com> | 2016-10-07 13:52:14 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-10-07 13:52:14 +1100 |
commit | 75af908c0ec2a0d47e6aded15b35cd630f93d48b (patch) | |
tree | c953c0fb450b3a6e14c64affdea90299c300ca99 /extmod/machine_pulse.c | |
parent | 06d0083468dc5bb30ba65f0fb10892ef5fe54296 (diff) | |
download | micropython-75af908c0ec2a0d47e6aded15b35cd630f93d48b.tar.gz micropython-75af908c0ec2a0d47e6aded15b35cd630f93d48b.zip |
extmod: Use mp_raise_OSError helper function.
Diffstat (limited to 'extmod/machine_pulse.c')
-rw-r--r-- | extmod/machine_pulse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/machine_pulse.c b/extmod/machine_pulse.c index 8c8bff510c..b2a78d72ee 100644 --- a/extmod/machine_pulse.c +++ b/extmod/machine_pulse.c @@ -58,7 +58,7 @@ STATIC mp_obj_t machine_time_pulse_us_(size_t n_args, const mp_obj_t *args) { } mp_uint_t us = machine_time_pulse_us(pin, level, timeout_us); if (us == (mp_uint_t)-1) { - nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(MP_ETIMEDOUT))); + mp_raise_OSError(MP_ETIMEDOUT); } return mp_obj_new_int(us); } |