summaryrefslogtreecommitdiff
path: root/stmhal/machine_i2c.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-06-15 12:02:14 +1000
committerDamien George <damien.p.george@gmail.com>2017-06-15 12:02:14 +1000
commit2bf5a947b2b01f2be6c7b05707391dd09b240ad0 (patch)
treeb877cdfe14d17ff129d7e60a587b92aed39023e7 /stmhal/machine_i2c.c
parent48d867b4a68e53901aac87c2ff0f2a7e65f735c7 (diff)
stmhal: Make error messages more consistent across peripherals.
Diffstat (limited to 'stmhal/machine_i2c.c')
-rw-r--r--stmhal/machine_i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/machine_i2c.c b/stmhal/machine_i2c.c
index aec53205f..1be2151e3 100644
--- a/stmhal/machine_i2c.c
+++ b/stmhal/machine_i2c.c
@@ -510,14 +510,14 @@ mp_obj_t machine_hard_i2c_make_new(const mp_obj_type_t *type, size_t n_args, siz
#endif
} else {
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError,
- "I2C(%s) does not exist", port));
+ "I2C(%s) doesn't exist", port));
}
} else {
i2c_id = mp_obj_get_int(args[ARG_id].u_obj);
if (i2c_id < 1 || i2c_id > MP_ARRAY_SIZE(machine_hard_i2c_obj)
|| machine_hard_i2c_obj[i2c_id - 1].base.type == NULL) {
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError,
- "I2C(%d) does not exist", i2c_id));
+ "I2C(%d) doesn't exist", i2c_id));
}
}