Files
luban-lite-t3e-pro/packages/artinchip/lvgl-ui/aic_ui.c

51 lines
1.2 KiB
C
Raw Normal View History

2023-08-30 16:21:18 +08:00
/*
2024-09-03 11:16:08 +08:00
* Copyright (C) 2022-2024 ArtInChip Technology Co., Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*
2023-08-30 16:21:18 +08:00
* Authors: Ning Fang <ning.fang@artinchip.com>
*/
#include "lvgl.h"
#include "aic_ui.h"
#include "aic_osal.h"
2024-09-03 11:16:08 +08:00
#include "lvgl/demos/lv_demos.h"
#ifdef AIC_USE_TOUCH_MONKEY_TEST
2024-09-30 17:06:01 +08:00
#if LV_USE_MONKEY
2024-09-03 11:16:08 +08:00
static void use_touch_monkey_test(void)
{
/*Create encoder monkey test*/
lv_monkey_config_t config;
lv_monkey_config_init(&config);
config.type = LV_INDEV_TYPE_POINTER;
config.period_range.min = AIC_USE_TOUCH_MONKEY_TEST_PERIOD_RANG_MIN;
config.period_range.max = AIC_USE_TOUCH_MONKEY_TEST_PERIOD_RANG_MAX;
config.input_range.min = AIC_USE_TOUCH_MONKEY_TEST_INPUT_RANG_MAX;
config.input_range.max = AIC_USE_TOUCH_MONKEY_TEST_PERIOD_RANG_MAX;
lv_monkey_t * monkey = lv_monkey_create(&config);
/*Set the default group*/
lv_group_t * group = lv_group_create();
lv_indev_set_group(lv_monkey_get_indev(monkey), group);
lv_group_set_default(group);
/*Start monkey test*/
lv_monkey_set_enable(monkey, true);
}
#endif
2024-09-30 17:06:01 +08:00
#endif
2023-08-30 16:21:18 +08:00
2025-01-08 19:12:06 +08:00
#ifdef AIC_LVGL_DEMO
2023-08-30 16:21:18 +08:00
void aic_ui_init()
{
2024-11-26 13:23:39 +08:00
extern void ui_init(void);
ui_init();
2024-09-03 11:16:08 +08:00
#ifdef AIC_USE_TOUCH_MONKEY_TEST
use_touch_monkey_test();
#endif
2023-08-30 16:21:18 +08:00
return;
}
2025-01-08 19:12:06 +08:00
#endif