/**
 * @file lcd_panel_mgmt.h
 * @author June6 (https://github.com/Junedoubling6)
 * @brief
 * @version 0.1
 * @date 2023-08-16
 *
 * @copyright Copyright (c) 2022 - , All rights reserved.
 *
 */
#ifndef LCD_PANEL_MGMT_H__
#define LCD_PANEL_MGMT_H__

#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>

#include "err_code.h"
#include "lvgl.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Initialize LCD panel display.
 *
 */
void lcd_panel_display_init(void);

/**
 * @brief On off lcd panel display.
 *
 * @param cmd
 */
void lcd_panel_display_on_off(bool cmd);

/**
 * @brief Retime Reset Touch
 *
 * @param cmd
 * @details 亮屏后一段时间, 固定重置一次触摸, 避免硬件有问题,
 *          导致一直处于误触状态
 */
void retime_reset_touch(bool cmd);

/**
 * @brief Initialize LCD panel and ui server.
 *
 * @param core_num
 * @return lv_disp_t*
 */
lv_disp_t *lcd_panel_ui_server_init(uint8_t core_num);

/**
 * @brief LCD panel ui task
 *
 * @param pvParameters
 */
void lcd_panel_ui_task(void *pvParameters);

#if CONFIG_LCD_CONTROLLER_SLEEP_WAKEUP
/**
 * @brief LCD panel restart task.
 *
 * @param pvParameters
 */
void lcd_panel_restart_task(void *pvParameters);
#endif

#ifdef __cplusplus
}
#endif

#endif  // LCD_PANEL_MGMT_H__
