cc3200/mods/pybi2c: Raise OSError if readfrom_mem fails to write addr.

This commit is contained in:
Damien George 2017-03-29 16:09:46 +11:00
parent 22e2f4a0e8
commit 6bfb344a80
1 changed files with 2 additions and 0 deletions

View File

@ -278,6 +278,8 @@ STATIC void pyb_i2c_readmem_into (mp_arg_val_t *args, vstr_t *vstr) {
if (!pyb_i2c_read (i2c_addr, (byte *)vstr->buf, vstr->len)) {
mp_raise_OSError(MP_EIO);
}
} else {
mp_raise_OSError(MP_EIO);
}
}