File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
ports/broadcom/common-hal/neopixel_write Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -141,22 +141,22 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout,
141
141
}
142
142
if (channel == 1 ) {
143
143
icnt = 0 ;
144
- while ((pwm -> STA_b .FULL1 == 1 ) & (icnt ++ < 150 )) {
144
+ while ((pwm -> STA_b .FULL1 == 1 ) && (icnt ++ < 150 )) {
145
145
RUN_BACKGROUND_TASKS ;
146
146
COMPLETE_MEMORY_READS ;
147
147
}
148
148
// Dummy value for the first channel.
149
149
pwm -> FIF1 = 0x000000 ;
150
150
}
151
151
icnt = 0 ;
152
- while ((pwm -> STA_b .FULL1 == 1 ) & (icnt ++ < 150 )) {
152
+ while ((pwm -> STA_b .FULL1 == 1 ) && (icnt ++ < 150 )) {
153
153
RUN_BACKGROUND_TASKS ;
154
154
COMPLETE_MEMORY_READS ;
155
155
}
156
156
pwm -> FIF1 = expanded ;
157
157
if (channel == 0 ) {
158
158
icnt = 0 ;
159
- while ((pwm -> STA_b .FULL1 == 1 ) & (icnt ++ < 150 )) {
159
+ while ((pwm -> STA_b .FULL1 == 1 ) && (icnt ++ < 150 )) {
160
160
RUN_BACKGROUND_TASKS ;
161
161
COMPLETE_MEMORY_READS ;
162
162
}
@@ -166,19 +166,19 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout,
166
166
}
167
167
168
168
icnt = 0 ;
169
- while ((pwm -> STA_b .EMPT1 == 0 ) & (icnt ++ < 2500 )) {
169
+ while ((pwm -> STA_b .EMPT1 == 0 ) && (icnt ++ < 2500 )) {
170
170
RUN_BACKGROUND_TASKS ;
171
171
COMPLETE_MEMORY_READS ;
172
172
}
173
173
// Wait for transmission to start.
174
174
icnt = 0 ;
175
- while (((pwm -> STA_b .STA1 == 0 ) & (pwm -> STA_b .STA2 == 0 )) & (icnt ++ < 150 )) {
175
+ while (((pwm -> STA_b .STA1 == 0 ) && (pwm -> STA_b .STA2 == 0 )) & & (icnt ++ < 150 )) {
176
176
RUN_BACKGROUND_TASKS ;
177
177
COMPLETE_MEMORY_READS ;
178
178
}
179
179
// Wait for transmission to complete.
180
180
icnt = 0 ;
181
- while (((pwm -> STA_b .STA1 == 1 ) | (pwm -> STA_b .STA2 == 1 )) & (icnt ++ < 150 )) {
181
+ while (((pwm -> STA_b .STA1 == 1 ) | (pwm -> STA_b .STA2 == 1 )) && (icnt ++ < 150 )) {
182
182
RUN_BACKGROUND_TASKS ;
183
183
COMPLETE_MEMORY_READS ;
184
184
}
You can’t perform that action at this time.
0 commit comments