mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
Merge pull request #34 from grissiom/rtgui-cali
bsp/stm32f10x: remove the last calibration.c
This commit is contained in:
commit
4ba03b809d
3 files changed
+23
-285
No files matched your search
@@ -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