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

Commit89bb84d

Browse files
committed
Big update
Adds bounce buffer support to the RGBBus driver.Hopefully this will fix the tearing issuesChanges SPI bus driver to improve performance when using a single buffer.The driver that was built into the ESP-IDF always used queuing when sending data. This causes ISR's to happen and when using a single buffer the number of ISR's that take place are HUGE. This impacts performance big time. This change should double the speed of the transfers when using only a single buffer.
1 parent15b8983 commit89bb84d

File tree

18 files changed

+808
-137
lines changed

18 files changed

+808
-137
lines changed

‎api_drivers/py_api_drivers/frozen/display/display_driver_framework.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
importmicropython
1+
importmicropython# NOQA
22
importtime
33
importgc
4-
importmachine
5-
frommicropythonimportconst
4+
importmachine# NOQA
5+
frommicropythonimportconst# NOQA
66

77
importlvglaslv# NOQA
88
importlcd_bus
@@ -620,7 +620,7 @@ def _flush_cb(self, _, area, color_p):
620620
# gets emptied. Everything is handeled internally in the bus driver if
621621
# using DMA and double buffer or a single buffer.
622622

623-
def_flush_ready_cb(self):
623+
def_flush_ready_cb(self,*_):
624624
self._disp_drv.flush_ready()
625625

626626
def_madctl(self,colormode,rotations,rotation=None):

‎ext_mod/lcd_bus/common_include/i2c_bus.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
void*buf1;
1818
void*buf2;
19+
uint32_tbuffer_flags;
1920

2021
booltrans_done;
2122
boolrgb565_byte_swap;

‎ext_mod/lcd_bus/common_include/i80_bus.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
void*buf1;
2323
void*buf2;
24+
uint32_tbuffer_flags;
2425

2526
booltrans_done;
2627
boolrgb565_byte_swap;

‎ext_mod/lcd_bus/common_include/rgb_bus.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
void*buf1;
1818
void*buf2;
19+
uint32_tbuffer_flags;
1920

2021
booltrans_done;
2122
boolrgb565_byte_swap;

‎ext_mod/lcd_bus/common_include/spi_bus.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
void*buf1;
2222
void*buf2;
23+
uint32_tbuffer_flags;
2324

2425
booltrans_done;
2526
boolrgb565_byte_swap;

‎ext_mod/lcd_bus/esp32_include/i2c_bus.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
void*buf1;
2222
void*buf2;
23+
uint32_tbuffer_flags;
2324

2425
booltrans_done;
2526
boolrgb565_byte_swap;

‎ext_mod/lcd_bus/esp32_include/i80_bus.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
void*buf1;
2424
void*buf2;
25+
uint32_tbuffer_flags;
2526

2627
booltrans_done;
2728
boolrgb565_byte_swap;

‎ext_mod/lcd_bus/esp32_include/rgb_bus.h‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@
77
//local_includes
88
#include"lcd_types.h"
99

10-
1110
// esp-idf includes
1211
#include"esp_lcd_panel_io.h"
1312
#include"esp_lcd_panel_rgb.h"
1413

15-
#include"freertos/FreeRTOS.h"
16-
#include"freertos/task.h"
17-
#include"freertos/semphr.h"
18-
1914
// micropython includes
2015
#include"mphalport.h"
2116
#include"py/obj.h"
@@ -30,6 +25,7 @@
3025

3126
void*buf1;
3227
void*buf2;
28+
uint32_tbuffer_flags;
3329

3430
booltrans_done;
3531
boolrgb565_byte_swap;
@@ -43,8 +39,6 @@
4339
uint32_tbuffer_size;
4440
mp_obj_array_t*view1;
4541
mp_obj_array_t*view2;
46-
SemaphoreHandle_tsem_vsync_end;
47-
SemaphoreHandle_tsem_gui_ready;
4842
}mp_lcd_rgb_bus_obj_t;
4943

5044

‎ext_mod/lcd_bus/esp32_include/spi_bus.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
void*buf1;
2424
void*buf2;
25+
uint32_tbuffer_flags;
2526

2627
booltrans_done;
2728
boolrgb565_byte_swap;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
3+
#ifndef_SPI_PANEL_BUS_H_
4+
#define_SPI_PANEL_BUS_H_
5+
#include<stdbool.h>
6+
#include"esp_err.h"
7+
#include"soc/soc_caps.h"
8+
#include"hal/lcd_types.h"
9+
10+
#include"esp_lcd_types.h"
11+
#include"esp_lcd_panel_io_interface.h"
12+
#include"esp_lcd_panel_io.h"
13+
#include"../../../lib/esp-idf/components/esp_lcd/src/esp_lcd_common.h"
14+
15+
esp_err_tlcdbus_new_panel_io_spi(esp_lcd_spi_bus_handle_tbus,constesp_lcd_panel_io_spi_config_t*io_config,esp_lcd_panel_io_handle_t*ret_io,uint8_tdouble_buffer);
16+
17+
#endif/* _SPI_PANEL_BUS_H_ */
18+
19+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp