Update ports/broadcom/common-hal/neopixel_write/__init__.c

Co-authored-by: Scott Shawcroft <scott@tannewt.org>
This commit is contained in:
RetiredWizard 2023-02-13 14:44:46 -05:00 committed by GitHub
parent 1679790481
commit 575f177dd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout,
// Wait for the clock to start up. // Wait for the clock to start up.
COMPLETE_MEMORY_READS; COMPLETE_MEMORY_READS;
icnt = 0; icnt = 0;
while ((CM_PWM->CS_b.BUSY == 0) & (icnt++ < 1000)) { while ((CM_PWM->CS_b.BUSY == 0) && (icnt++ < 1000)) {
COMPLETE_MEMORY_READS; COMPLETE_MEMORY_READS;
} }
} }