Skip to content

Commit 692c7c2

Browse files
committed
cleanup
1 parent 0b517c0 commit 692c7c2

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

src/databus/Arduino_ESP32RGBPanel.cpp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ uint16_t *Arduino_ESP32RGBPanel::getFrameBuffer(int16_t w, int16_t h)
132132
return (uint16_t *)_rgb_panel->fb;
133133
}
134134

135-
136135
#else
137136

138137
// Implementation for ESP32 board version 3.x
@@ -153,7 +152,7 @@ Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(
153152
_b0(b0), _b1(b1), _b2(b2), _b3(b3), _b4(b4),
154153
_hsync_polarity(hsync_polarity), _hsync_front_porch(hsync_front_porch), _hsync_pulse_width(hsync_pulse_width), _hsync_back_porch(hsync_back_porch),
155154
_vsync_polarity(vsync_polarity), _vsync_front_porch(vsync_front_porch), _vsync_pulse_width(vsync_pulse_width), _vsync_back_porch(vsync_back_porch),
156-
_pclk_active_neg(pclk_active_neg), _prefer_speed(prefer_speed), _useBigEndian(useBigEndian),
155+
_pclk_active_neg(pclk_active_neg), _prefer_speed(prefer_speed),
157156
_de_idle_high(de_idle_high), _pclk_idle_high(pclk_idle_high)
158157
{
159158
}
@@ -193,15 +192,13 @@ uint16_t *Arduino_ESP32RGBPanel::getFrameBuffer(int16_t w, int16_t h)
193192
.vsync_pulse_width = _vsync_pulse_width,
194193
.vsync_back_porch = _vsync_back_porch,
195194
.vsync_front_porch = _vsync_front_porch,
196-
// struct {
197-
// uint32_t hsync_idle_low: 1; /*!< The hsync signal is low in IDLE state */
198-
// uint32_t vsync_idle_low: 1; /*!< The vsync signal is low in IDLE state */
199-
// uint32_t de_idle_high: 1; /*!< The de signal is high in IDLE state */
200-
// uint32_t pclk_active_neg: 1; /*!< Whether the display data is clocked out on the falling edge of PCLK */
201-
// uint32_t pclk_idle_high: 1; /*!< The PCLK stays at high level in IDLE phase */
202-
// } flags; /*!< LCD RGB timing flags */
203-
204-
},
195+
.flags = {
196+
.hsync_idle_low = (_hsync_polarity == 0) ? 1 : 0,
197+
.vsync_idle_low = (_vsync_polarity == 0) ? 1 : 0,
198+
.de_idle_high = _de_idle_high,
199+
.pclk_active_neg = _pclk_active_neg,
200+
.pclk_idle_high = _pclk_idle_high,
201+
}},
205202
.data_width = 16, // RGB565 in parallel mode, thus 16 bits in width
206203
.bits_per_pixel = 16,
207204
.num_fbs = 1,
@@ -212,7 +209,7 @@ uint16_t *Arduino_ESP32RGBPanel::getFrameBuffer(int16_t w, int16_t h)
212209
.vsync_gpio_num = _vsync,
213210
.de_gpio_num = _de,
214211
.pclk_gpio_num = _pclk,
215-
.disp_gpio_num = GPIO_NUM_NC, // -1
212+
.disp_gpio_num = GPIO_NUM_NC, // -1
216213
.data_gpio_nums = {_b0, _b1, _b2, _b3, _b4, _g0, _g1, _g2, _g3, _g4, _g5, _r0, _r1, _r2, _r3, _r4},
217214

218215
.flags = {

src/databus/Arduino_ESP32RGBPanel.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,10 @@ class Arduino_ESP32RGBPanel
156156
uint16_t _vsync_back_porch;
157157
uint16_t _pclk_active_neg;
158158
int32_t _prefer_speed;
159-
bool _useBigEndian;
160159
uint16_t _de_idle_high;
161160
uint16_t _pclk_idle_high;
162161

163162
esp_lcd_panel_handle_t _panel_handle = NULL;
164-
esp_lcd_rgb_panel_config_t *_rgb_panel;
165163
};
166164

167165
#endif // #if (!defined(ESP_ARDUINO_VERSION_MAJOR)) || (ESP_ARDUINO_VERSION_MAJOR < 3)

0 commit comments

Comments
 (0)