Skip to content

Commit e700481

Browse files
DavePutzdhalbert
authored andcommitted
Update PulseOut.c
reorder the tests for zero-length
1 parent f9e1fc1 commit e700481

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/nrf/common-hal/pulseio/PulseOut.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ static void pulseout_event_handler(nrf_timer_event_t event_type, void *p_context
7575

7676
pulse_array_index++;
7777
// Ignore a zero-length pulse
78-
while (pulse_array[pulse_array_index] == 0 &&
79-
pulse_array_index < pulse_array_length) {
78+
while (pulse_array_index < pulse_array_length &&
79+
pulse_array[pulse_array_index] == 0) {
8080
pulse_array_index++;
8181
}
8282

0 commit comments

Comments
 (0)