Skip to content

Commit e8e810a

Browse files
committed
ugfx: update CUBE0414 driver
1 parent a1d8045 commit e8e810a

File tree

2 files changed

+22
-24
lines changed

2 files changed

+22
-24
lines changed

components/ugfx/drivers/gdisp/CUBE0414/gdisp_lld_CUBE0414.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,10 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
8686
gfxSleepMilliseconds(120);
8787

8888
write_cmd(g, CUBE0414_CONF_WR); // 1: Set write reg conf, 6 args, no delay:
89-
write_data(g, CONFIG_CUBE0414_LED_T0H / 10); // T0H Time: val * 10 ns
90-
write_data(g, CONFIG_CUBE0414_LED_T0L / 10); // T0L Time: val * 10 ns
91-
write_data(g, CONFIG_CUBE0414_LED_T1H / 10); // T1H Time: val * 10 ns
92-
write_data(g, CONFIG_CUBE0414_LED_T1L / 10); // T1L Time: val * 10 ns
93-
write_data(g, CONFIG_CUBE0414_LED_RST * 100 >> 8); // RST Time H: val * 10 ns
94-
write_data(g, CONFIG_CUBE0414_LED_RST * 100 & 0xff); // RST Time L: val * 10 ns
89+
write_data(g, CONFIG_CUBE0414_LED_T0H); // T0H Time: val * 10 ns
90+
write_data(g, CONFIG_CUBE0414_LED_T0L); // T0L Time: val * 10 ns
91+
write_data(g, CONFIG_CUBE0414_LED_T1H); // T1H Time: val * 10 ns
92+
write_data(g, CONFIG_CUBE0414_LED_T1L); // T1L Time: val * 10 ns
9593
write_cmd(g, CUBE0414_ADDR_WR); // 2: Set write ram addr, 64 args, no delay:
9694
write_buff(g, (uint8_t *)ram_addr_table, sizeof(ram_addr_table));
9795
write_cmd(g, CUBE0414_DATA_WR); // 3: Set write ram data, N args, no delay:

main/Kconfig.projbuild

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -242,34 +242,34 @@ config CUBE0414_LINE_S_CURVE
242242
bool "S Curve"
243243
endchoice
244244

245+
comment "Limit: T0H + T0L <= 257"
246+
depends on ENABLE_VFX && VFX_OUTPUT_CUBE0414
247+
245248
config CUBE0414_LED_T0H
246-
int "CUBE0414 LED T0H Time (ns)"
247-
default 350
248-
range 10 2500
249+
int "CUBE0414 LED T0H Time (10 ns)"
250+
default 35
251+
range 1 255
249252
depends on ENABLE_VFX && VFX_OUTPUT_CUBE0414
250253

251254
config CUBE0414_LED_T0L
252-
int "CUBE0414 LED T0L Time (ns)"
253-
default 1360
254-
range 10 2500
255+
int "CUBE0414 LED T0L Time (10 ns)"
256+
default 136
257+
range 1 255
255258
depends on ENABLE_VFX && VFX_OUTPUT_CUBE0414
256259

257-
config CUBE0414_LED_T1H
258-
int "CUBE0414 LED T1H Time (ns)"
259-
default 1360
260-
range 10 2500
260+
comment "Limit: T1H + T1L <= 257"
261261
depends on ENABLE_VFX && VFX_OUTPUT_CUBE0414
262262

263-
config CUBE0414_LED_T1L
264-
int "CUBE0414 LED T1L Time (ns)"
265-
default 350
266-
range 10 2500
263+
config CUBE0414_LED_T1H
264+
int "CUBE0414 LED T1H Time (10 ns)"
265+
default 136
266+
range 1 255
267267
depends on ENABLE_VFX && VFX_OUTPUT_CUBE0414
268268

269-
config CUBE0414_LED_RST
270-
int "CUBE0414 LED RST Time (us)"
271-
default 280
272-
range 10 650
269+
config CUBE0414_LED_T1L
270+
int "CUBE0414 LED T1L Time (10 ns)"
271+
default 35
272+
range 1 255
273273
depends on ENABLE_VFX && VFX_OUTPUT_CUBE0414
274274

275275
config DEVICE_RST_PIN

0 commit comments

Comments
 (0)