diff options
| author | Jerry Needell <jerryneedell@gmail.com> | 2018-05-13 22:21:05 -0400 |
|---|---|---|
| committer | Jerry Needell <jerryneedell@gmail.com> | 2018-05-13 22:21:05 -0400 |
| commit | aa9309704bb174c351034a866bb6b5b7073463db (patch) | |
| tree | 3270b47d8fd34d7a999ccaf2b3eb5fe99384dc45 /shared-module | |
| parent | d6c26942a5fadeb95305c86a604233257a7858db (diff) | |
revise to use mp_raise_msg insead of nlr_raise....
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/bitbangio/I2C.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shared-module/bitbangio/I2C.c b/shared-module/bitbangio/I2C.c index ac2f9aead..8381f051a 100644 --- a/shared-module/bitbangio/I2C.c +++ b/shared-module/bitbangio/I2C.c @@ -28,6 +28,7 @@ #include "py/mperrno.h" #include "py/nlr.h" #include "py/obj.h" +#include "py/runtime.h" #include "common-hal/microcontroller/Pin.h" #include "shared-bindings/microcontroller/__init__.h" @@ -54,8 +55,8 @@ STATIC void scl_release(bitbangio_i2c_obj_t *self) { common_hal_mcu_delay_us(1); } if(count==0) { /// raise exception on timeout - nlr_raise(mp_obj_new_exception_msg(&mp_type_TimeoutError, - "Clock Stretching Timeout.")); + mp_raise_msg(&mp_type_TimeoutError, + "Clock Stretching Timeout."); } } |
