Skip to content

Commit

Permalink
Don't block in I2CTarget.request(-1)
Browse files Browse the repository at this point in the history
Partially reverts adafruit#6985
Closes adafruit#7241
  • Loading branch information
s-ol committed Nov 20, 2022
1 parent d4834cb commit 40d35e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared-bindings/i2ctarget/I2CTarget.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ STATIC mp_obj_t i2ctarget_i2c_target_request(size_t n_args, const mp_obj_t *pos_

bool forever = false;
uint64_t timeout_end = 0;
if (timeout_ms <= 0) {
if (timeout_ms == 0) {
forever = true;
} else if (timeout_ms > 0) {
timeout_end = common_hal_time_monotonic_ms() + timeout_ms;
Expand Down

0 comments on commit 40d35e9

Please sign in to comment.