Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4330733

Browse files
committed
adds more debugging code.
1 parent6477ec2 commit4330733

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

‎ext_mod/lcd_bus/src/common/sw_rotate_task_common.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ void mp_lcd_sw_rotate_task(void *self_in)
2020
mp_lcd_sw_rotation_handles_t*handles=&sw_rot->handles;
2121
mp_lcd_sw_rotate_tx_params_t*tx_params=&sw_rot->tx_params;
2222
mp_lcd_sw_rotation_init_t*init=&sw_rot->init;
23-
LCD_DEBUG_PRINT("mp_lcd_sw_rotate_task - starting bus init\n")
2423

2524

25+
LCD_DEBUG_PRINT("mp_lcd_sw_rotate_task - starting bus init\n")
2626
if (!init->cb(self_in)) {
27+
LCD_DEBUG_PRINT("mp_lcd_sw_rotate_task - bus init FAILURE\n")
2728
mp_lcd_lock_release(&handles->init_lock);
2829
return;
2930
}

‎ext_mod/lcd_bus/src/esp32/rgb_bus.c‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171

7272
staticboolrgb_init_cb(void*self_in)
7373
{
74+
LCD_DEBUG_PRINT("rgb_init_cb\n")
75+
7476
mp_lcd_rgb_bus_obj_t*self= (mp_lcd_rgb_bus_obj_t*)self_in;
7577
mp_lcd_sw_rotation_init_t*init=&self->sw_rot.init;
7678

@@ -81,7 +83,6 @@
8183
esp_lcd_rgb_panel_event_callbacks_tcallbacks= { .on_vsync=rgb_trans_done_cb };
8284

8385
LCD_DEBUG_PRINT("esp_lcd_new_rgb_panel\n")
84-
8586
init->err=esp_lcd_new_rgb_panel(self->panel_io_config,&self->panel_handle);
8687
if (init->err!=0) {
8788
init->err_msg=MP_ERROR_TEXT("%d(esp_lcd_new_rgb_panel)");
@@ -366,13 +367,14 @@
366367
LCD_UNUSED(cmd_bits);
367368
LCD_UNUSED(param_bits);
368369

369-
mp_lcd_rgb_bus_obj_t*self= (mp_lcd_rgb_bus_obj_t*)obj;
370+
mp_lcd_rgb_bus_obj_t*self= (mp_lcd_rgb_bus_obj_t*)MP_OBJ_TO_PTR(obj);
371+
mp_lcd_sw_rotation_data_t*data=&self->sw_rot.data;
370372

371373
self->sw_rotate=1;
372374

373-
if (self->sw_rot.data.bytes_per_pixel!=2)self->sw_rot.data.rgb565_swap=0;
375+
if (data->bytes_per_pixel!=2)data->rgb565_swap=0;
374376

375-
if (self->sw_rot.data.rgb565_swap&&self->panel_io_config->data_width==16) {
377+
if (data->rgb565_swap&&self->panel_io_config->data_width==16) {
376378
/*
377379
We change the pins aound when the bus width is 16 and wanting to
378380
swap bytes. This does the same thing as moving the bytes around in
@@ -389,12 +391,12 @@
389391
self->panel_io_config->data_gpio_nums[i+8]=temp_pin;
390392
}
391393

392-
self->sw_rot.data.rgb565_swap=0;
394+
data->rgb565_swap=0;
393395
}
394396

395-
self->panel_io_config->timings.h_res=self->sw_rot.data.dst_width;
396-
self->panel_io_config->timings.v_res=self->sw_rot.data.dst_height;
397-
self->panel_io_config->bits_per_pixel=self->sw_rot.data.bytes_per_pixel*8;
397+
self->panel_io_config->timings.h_res=data->dst_width;
398+
self->panel_io_config->timings.v_res=data->dst_height;
399+
self->panel_io_config->bits_per_pixel=data->bytes_per_pixel*8;
398400
self->panel_io_config->flags.fb_in_psram=1;
399401
self->panel_io_config->flags.double_fb=1;
400402

@@ -408,7 +410,7 @@
408410
LCD_DEBUG_PRINT("h_res=%lu\n",self->panel_io_config->timings.h_res)
409411
LCD_DEBUG_PRINT("v_res=%lu\n",self->panel_io_config->timings.v_res)
410412
LCD_DEBUG_PRINT("bits_per_pixel=%d\n",self->panel_io_config->bits_per_pixel)
411-
LCD_DEBUG_PRINT("rgb565_byte_swap=%d\n",self->sw_rot.data.rgb565_swap)
413+
LCD_DEBUG_PRINT("rgb565_byte_swap=%d\n",data->rgb565_swap)
412414

413415
returnLCD_OK;
414416
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp