mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-22 00:56:50 +08:00
bsp/stm32f10x: remove the last calibration.c
This also provide an example to show how to use calibration feature in the RTGUI.
This commit is contained in:
@@ -15,7 +15,7 @@ if GetDepend('RT_USING_LWIP'):
|
||||
src_drv += ['enc28j60.c'] + ['dm9000a.c']
|
||||
|
||||
if GetDepend('RT_USING_RTGUI'):
|
||||
src_drv += ['touch.c', 'calibration.c']
|
||||
src_drv += ['touch.c']
|
||||
|
||||
if GetDepend('RT_USING_RTGUI'):
|
||||
if rtconfig.RT_USING_LCD_TYPE == 'FMT0371':
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <rtgui/rtgui_server.h>
|
||||
#include <rtgui/rtgui_system.h>
|
||||
#include <rtgui/driver.h>
|
||||
#include <rtgui/calibration.h>
|
||||
#endif
|
||||
|
||||
#include "led.h"
|
||||
@@ -73,6 +74,23 @@ static void led_thread_entry(void* parameter)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RT_USING_RTGUI
|
||||
rt_bool_t cali_setup(void)
|
||||
{
|
||||
rt_kprintf("cali setup entered\n");
|
||||
return RT_FALSE;
|
||||
}
|
||||
|
||||
void cali_store(struct calibration_data *data)
|
||||
{
|
||||
rt_kprintf("cali finished (%d, %d), (%d, %d)\n",
|
||||
data->min_x,
|
||||
data->max_x,
|
||||
data->min_y,
|
||||
data->max_y);
|
||||
}
|
||||
#endif
|
||||
|
||||
void rt_init_thread_entry(void* parameter)
|
||||
{
|
||||
/* Filesystem Initialization */
|
||||
@@ -149,6 +167,10 @@ void rt_init_thread_entry(void* parameter)
|
||||
|
||||
/* init rtgui system server */
|
||||
rtgui_system_server_init();
|
||||
|
||||
calibration_set_restore(cali_setup);
|
||||
calibration_set_after(cali_store);
|
||||
calibration_init();
|
||||
}
|
||||
#endif /* #ifdef RT_USING_RTGUI */
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user