summaryrefslogtreecommitdiff
path: root/shared-module/bitbangio
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2018-05-16 13:19:51 -0500
committerGitHub <noreply@github.com>2018-05-16 13:19:51 -0500
commit9a2cda7fd3917c3e4f57b4a8510bc7690945774a (patch)
tree3a0e6af6c866c10fff7b11d1a1076a097ceb8425 /shared-module/bitbangio
parentd9f1b1f5b786a1e11e41da10bddb404e0285987c (diff)
Reformat the error message
Diffstat (limited to 'shared-module/bitbangio')
-rw-r--r--shared-module/bitbangio/I2C.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared-module/bitbangio/I2C.c b/shared-module/bitbangio/I2C.c
index 7bf8292db..47529748a 100644
--- a/shared-module/bitbangio/I2C.c
+++ b/shared-module/bitbangio/I2C.c
@@ -53,9 +53,9 @@ STATIC void scl_release(bitbangio_i2c_obj_t *self) {
for (; !common_hal_digitalio_digitalinout_get_value(&self->scl) && count; --count) {
common_hal_mcu_delay_us(1);
}
- if(count==0) { /// raise exception on timeout
- mp_raise_msg(&mp_type_TimeoutError,
- "Clock Stretching Timeout.");
+ // raise exception on timeout
+ if (count == 0) {
+ mp_raise_msg(&mp_type_TimeoutError, "Clock stretch too long");
}
}