Skip to content

Commit abd0228

Browse files
authored
Merge pull request #6985 from PaulskPt/i2ctarget_doc_text_mod
I2ctarget doc function request: a) mods to doc text & function signature. b) small mod of the code
2 parents e3054b3 + b1106b8 commit abd0228

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared-bindings/i2ctarget/I2CTarget.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ STATIC mp_obj_t i2ctarget_i2c_target_obj___exit__(size_t n_args, const mp_obj_t
130130
}
131131
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(i2ctarget_i2c_target___exit___obj, 4, 4, i2ctarget_i2c_target_obj___exit__);
132132

133-
//| def request(self, timeout: float = -1) -> I2CTargetRequest:
133+
//| def request(self, *, timeout: float = -1) -> I2CTargetRequest:
134134
//| """Wait for an I2C request.
135135
//|
136136
//| :param float timeout: Timeout in seconds. Zero means wait forever, a negative value means check once
@@ -159,7 +159,7 @@ STATIC mp_obj_t i2ctarget_i2c_target_request(size_t n_args, const mp_obj_t *pos_
159159

160160
bool forever = false;
161161
uint64_t timeout_end = 0;
162-
if (timeout_ms == 0) {
162+
if (timeout_ms <= 0) {
163163
forever = true;
164164
} else if (timeout_ms > 0) {
165165
timeout_end = common_hal_time_monotonic_ms() + timeout_ms;

0 commit comments

Comments
 (0)