|
51 | 51 | }rgb_panel_t; |
52 | 52 |
|
53 | 53 |
|
54 | | -staticboolrgb_bus_trans_done_cb(esp_lcd_panel_handle_tpanel,constesp_lcd_rgb_panel_event_data_t*event_data,void*user_data) |
| 54 | +staticboolrgb_bus_trans_done_cb(esp_lcd_panel_handle_tpanel,constesp_lcd_rgb_panel_event_data_t*event_data,void*user_data); |
55 | 55 | esp_lcd_rgb_panel_event_callbacks_tcallbacks= { .on_vsync=rgb_bus_trans_done_cb }; |
56 | 56 |
|
57 | 57 | mp_lcd_err_trgb_del(mp_obj_tobj); |
|
165 | 165 |
|
166 | 166 | self->panel_io_config.clk_src=LCD_CLK_SRC_PLL160M; |
167 | 167 | self->panel_io_config.timings=self->bus_config; |
168 | | -// self->panel_io_config.bounce_buffer_size_px = (size_t)args[ARG_bounce_buffer_size_px].u_int; |
169 | 168 | self->panel_io_config.hsync_gpio_num= (int)args[ARG_hsync].u_int; |
170 | 169 | self->panel_io_config.vsync_gpio_num= (int)args[ARG_vsync].u_int; |
171 | 170 | self->panel_io_config.de_gpio_num= (int)args[ARG_de].u_int; |
|
187 | 186 | self->panel_io_config.data_gpio_nums[14]=args[ARG_data14].u_int; |
188 | 187 | self->panel_io_config.data_gpio_nums[15]=args[ARG_data15].u_int; |
189 | 188 | self->panel_io_config.disp_gpio_num= (int)args[ARG_disp].u_int; |
190 | | -self->panel_io_config.sram_trans_align=64; |
| 189 | +self->panel_io_config.sram_trans_align=8; |
191 | 190 | self->panel_io_config.psram_trans_align=64; |
192 | 191 | self->panel_io_config.flags.disp_active_low= (uint32_t)args[ARG_disp_active_low].u_bool; |
193 | 192 | self->panel_io_config.flags.refresh_on_demand= (uint32_t)args[ARG_refresh_on_demand].u_bool; |
194 | 193 | self->panel_io_config.flags.fb_in_psram=0; |
195 | 194 | self->panel_io_config.flags.double_fb=0; |
196 | | -// self->panel_io_config.flags.no_fb = true; |
197 | | -// self->panel_io_config.flags.bb_invalidate_cache = (uint32_t)args[ARG_bb_invalidate_cache].u_bool; |
198 | 195 |
|
199 | 196 | inti=0; |
200 | 197 | for (;i<16;i++) { |
|
215 | 212 | self->panel_io_handle.init=&rgb_init; |
216 | 213 |
|
217 | 214 | self->sem_vsync_end=xSemaphoreCreateBinary(); |
218 | | -assert(self->sem_vsync_end); |
219 | 215 | self->sem_gui_ready=xSemaphoreCreateBinary(); |
220 | | -assert(self->sem_gui_ready); |
221 | 216 |
|
222 | 217 | returnMP_OBJ_FROM_PTR(self); |
223 | 218 | } |
|
466 | 461 | returnLCD_OK; |
467 | 462 | } |
468 | 463 |
|
469 | | -/* |
470 | | - if (self->callback != mp_const_none && mp_obj_is_callable(self->callback)) { |
471 | | - mp_call_function_n_kw(self->callback, 0, 0, NULL); |
472 | | - } |
473 | | - */ |
474 | | - |
475 | 464 | if (self->callback!=mp_const_none&&mp_obj_is_callable(self->callback)) { |
476 | 465 | mp_call_function_n_kw(self->callback,0,0,NULL); |
477 | 466 | } |
|