Skip to content

Commit 968fca8

Browse files
committed
fixes lock not stalling copy task before copying frame buffers.
1 parent b9bc637 commit 968fca8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ext_mod/lcd_bus/esp32_src/rgb_bus_rotation.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
}
190190

191191
rgb_bus_lock_acquire(&self->copy_lock, -1);
192-
192+
rgb_bus_lock_acquire(&self->swap_lock, -1);
193193
bool exit = rgb_bus_event_isset(&self->copy_task_exit);
194194

195195
while (!exit) {
@@ -348,8 +348,7 @@
348348
uint32_t index;
349349
for (int y = y_start; y < y_end; y++) {
350350
index = ((v_res - 1 - y) * h_res + (h_res - 1 - x_start)) * bytes_per_pixel;
351-
for (size_t x = x_start; x < x_end; x++)
352-
{
351+
for (size_t x = x_start; x < x_end; x++) {
353352
func(to + index, from);
354353
index -= bytes_per_pixel;
355354
from += bytes_per_pixel;

0 commit comments

Comments
 (0)