File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
ports/broadcom/common-hal/neopixel_write Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout,
96
96
// Wait for the clock to start up.
97
97
COMPLETE_MEMORY_READS ;
98
98
icnt = 0 ;
99
- while ((CM_PWM -> CS_b .BUSY == 0 ) && (icnt ++ < 1000 )) {
100
- COMPLETE_MEMORY_READS ;
101
- }
99
+ while ((CM_PWM -> CS_b .BUSY == 0 ) && (icnt ++ < 1000 )) {}
102
100
}
103
101
104
102
PWM0_Type * pwm = PWM0 ;
@@ -143,22 +141,19 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout,
143
141
icnt = 0 ;
144
142
while ((pwm -> STA_b .FULL1 == 1 ) && (icnt ++ < 150 )) {
145
143
RUN_BACKGROUND_TASKS ;
146
- COMPLETE_MEMORY_READS ;
147
144
}
148
145
// Dummy value for the first channel.
149
146
pwm -> FIF1 = 0x000000 ;
150
147
}
151
148
icnt = 0 ;
152
149
while ((pwm -> STA_b .FULL1 == 1 ) && (icnt ++ < 150 )) {
153
150
RUN_BACKGROUND_TASKS ;
154
- COMPLETE_MEMORY_READS ;
155
151
}
156
152
pwm -> FIF1 = expanded ;
157
153
if (channel == 0 ) {
158
154
icnt = 0 ;
159
155
while ((pwm -> STA_b .FULL1 == 1 ) && (icnt ++ < 150 )) {
160
156
RUN_BACKGROUND_TASKS ;
161
- COMPLETE_MEMORY_READS ;
162
157
}
163
158
// Dummy value for the second channel.
164
159
pwm -> FIF1 = 0x000000 ;
@@ -168,23 +163,19 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout,
168
163
icnt = 0 ;
169
164
while ((pwm -> STA_b .EMPT1 == 0 ) && (icnt ++ < 2500 )) {
170
165
RUN_BACKGROUND_TASKS ;
171
- COMPLETE_MEMORY_READS ;
172
166
}
173
167
// Wait for transmission to start.
174
168
icnt = 0 ;
175
169
while (((pwm -> STA_b .STA1 == 0 ) && (pwm -> STA_b .STA2 == 0 )) && (icnt ++ < 150 )) {
176
170
RUN_BACKGROUND_TASKS ;
177
- COMPLETE_MEMORY_READS ;
178
171
}
179
172
// Wait for transmission to complete.
180
173
icnt = 0 ;
181
174
while (((pwm -> STA_b .STA1 == 1 ) | (pwm -> STA_b .STA2 == 1 )) && (icnt ++ < 150 )) {
182
175
RUN_BACKGROUND_TASKS ;
183
- COMPLETE_MEMORY_READS ;
184
176
}
185
177
// Shouldn't be anything left in queue but clear it so the clock doesn't crash if there is
186
178
pwm -> CTL = PWM0_CTL_CLRF1_Msk ;
187
- COMPLETE_MEMORY_READS ;
188
179
189
180
gpio_set_function (digitalinout -> pin -> number , GPIO_FUNCTION_OUTPUT );
190
181
You can’t perform that action at this time.
0 commit comments