MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_lcd_init

Function rt_lcd_init

bsp/allwinner/libraries/drivers/drv_lcd.c:386–424  ·  view source on GitHub ↗

Add the first layer, then enable the interrupt */

Source from the content-addressed store, hash-verified

384
385/* Add the first layer, then enable the interrupt */
386static rt_err_t rt_lcd_init(rt_device_t dev)
387{
388 lcd_device_t lcd_drv = (lcd_device_t)dev;
389
390 RT_ASSERT(lcd_drv != RT_NULL);
391
392 static int lcd_init = 0;
393
394 if (lcd_init)
395 {
396 return RT_EOK;
397 }
398 lcd_init = 1;
399
400 _panel = load_lcd_config_from_xml();
401 lcd_drv->panel = _panel;
402
403 if (disp_probe() != 0)
404 {
405 rt_kprintf("lcd disp probe failure\n");
406 return -RT_ERROR;
407 }
408
409 lcd_gpio_config();
410
411 if (_lcd_drv_init(lcd_drv) != RT_EOK)
412 {
413 rt_kprintf("lcd drv init failure\n");
414 return -RT_ERROR;
415 }
416
417 if (_lcd_layer_init(lcd_drv) != RT_EOK)
418 {
419 rt_kprintf("disp layer init failure\n");
420 return -RT_ERROR;
421 }
422
423 return RT_EOK;
424}
425
426void turn_on_lcd_backlight(void)
427{

Callers 1

rt_hw_lcd_initFunction · 0.70

Calls 6

load_lcd_config_from_xmlFunction · 0.85
disp_probeFunction · 0.85
rt_kprintfFunction · 0.85
lcd_gpio_configFunction · 0.85
_lcd_drv_initFunction · 0.85
_lcd_layer_initFunction · 0.85

Tested by

no test coverage detected