2020-06-21 18:26:14 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 Inria
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup sys_auto_init
|
|
|
|
* @{
|
|
|
|
* @file
|
|
|
|
* @brief automatically initializes screen display and touch devices
|
|
|
|
*
|
|
|
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2022-01-06 16:13:32 +01:00
|
|
|
#define ENABLE_DEBUG 0
|
2020-06-21 18:26:14 +02:00
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
void auto_init_screen(void)
|
|
|
|
{
|
|
|
|
if (IS_USED(MODULE_DISP_DEV)) {
|
|
|
|
DEBUG("auto_init_screen: init display drivers\n");
|
|
|
|
if (IS_USED(MODULE_ILI9341)) {
|
|
|
|
extern void auto_init_ili9341(void);
|
|
|
|
auto_init_ili9341();
|
|
|
|
}
|
2021-12-22 16:06:39 +01:00
|
|
|
if (IS_USED(MODULE_PERIPH_LTDC)) {
|
|
|
|
extern void auto_init_periph_ltdc(void);
|
|
|
|
auto_init_periph_ltdc();
|
|
|
|
}
|
2023-07-13 14:11:55 +02:00
|
|
|
if (IS_USED(MODULE_ST77XX)) {
|
|
|
|
extern void auto_init_st77xx(void);
|
|
|
|
auto_init_st77xx();
|
2021-03-15 15:14:46 +01:00
|
|
|
}
|
2020-06-21 18:26:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (IS_USED(MODULE_TOUCH_DEV)) {
|
|
|
|
DEBUG("auto_init_screen: init touch drivers\n");
|
2022-01-02 08:01:31 +01:00
|
|
|
if (IS_USED(MODULE_CST816S)) {
|
|
|
|
extern void auto_init_cst816s(void);
|
|
|
|
auto_init_cst816s();
|
|
|
|
}
|
2020-06-21 18:26:14 +02:00
|
|
|
if (IS_USED(MODULE_STMPE811)) {
|
|
|
|
extern void auto_init_stmpe811(void);
|
|
|
|
auto_init_stmpe811();
|
|
|
|
}
|
2021-12-27 11:28:05 +01:00
|
|
|
if (IS_USED(MODULE_FT5X06)) {
|
|
|
|
extern void auto_init_ft5x06(void);
|
|
|
|
auto_init_ft5x06();
|
|
|
|
}
|
2020-06-21 18:26:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (IS_USED(MODULE_LVGL)) {
|
|
|
|
extern void auto_init_lvgl(void);
|
|
|
|
auto_init_lvgl();
|
|
|
|
}
|
|
|
|
}
|