mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-07 00:59:00 +08:00
port calibration from stm32 radio, complete touch panel driver
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@708 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -11,7 +11,7 @@ group['CPPPATH'] = [RTT_ROOT + '/bsp/mini2440']
|
||||
group['CPPDEFINES'] = []
|
||||
group['LINKFLAGS'] = ''
|
||||
|
||||
src_bsp = ['application.c', 'startup.c', 'board.c', 'rtc_calendar.c', 'info.c', 'today.c', 'picture.c', 'osc.c', 'device_info.c', 'run_module.c']
|
||||
src_bsp = ['application.c', 'startup.c', 'board.c', 'rtc_calendar.c', 'calibration.c', 'info.c', 'today.c', 'picture.c', 'osc.c', 'device_info.c', 'run_module.c']
|
||||
src_drv = ['console.c', 'led.c']
|
||||
|
||||
if rtconfig.RT_USING_DFS:
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <board.h>
|
||||
#include <rtthread.h>
|
||||
#include "touch.h"
|
||||
#include "led.h"
|
||||
|
||||
#ifdef RT_USING_DFS
|
||||
@@ -63,6 +64,14 @@ void rt_init_thread_entry(void* parameter)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_RTGUI
|
||||
{
|
||||
rtgui_touch_hw_init();
|
||||
|
||||
rtgui_startup();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* LwIP Initialization */
|
||||
#ifdef RT_USING_LWIP
|
||||
{
|
||||
@@ -81,12 +90,6 @@ void rt_init_thread_entry(void* parameter)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_RTGUI
|
||||
{
|
||||
rt_hw_touch_init();
|
||||
rtgui_startup();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void rt_led_thread_entry(void* parameter)
|
||||
@@ -106,7 +109,6 @@ void rt_led_thread_entry(void* parameter)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int rt_application_init()
|
||||
{
|
||||
rt_thread_t init_thread;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+182
-69
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
#ifndef __TOUCH_H__
|
||||
#define __TOUCH_H__
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
#define RT_TOUCH_NORMAL 0
|
||||
#define RT_TOUCH_CALIBRATION_DATA 1
|
||||
#define RT_TOUCH_CALIBRATION 2
|
||||
|
||||
struct calibration_data
|
||||
{
|
||||
rt_uint16_t min_x, max_x;
|
||||
rt_uint16_t min_y, max_y;
|
||||
};
|
||||
|
||||
typedef void (*rt_touch_calibration_func_t)(rt_uint16_t x, rt_uint16_t y);
|
||||
|
||||
void rtgui_touch_hw_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user