porting of the touchscreen/MCU driver to ginput - not working yet
This commit is contained in:
parent
de85a1496e
commit
62dee0d351
2 changed files with 12 additions and 8 deletions
|
@ -31,13 +31,15 @@
|
|||
|
||||
#if (GFX_USE_GINPUT && GINPUT_NEED_MOUSE) /*|| defined(__DOXYGEN__)*/
|
||||
|
||||
#include "lld/ginput/touch.h"
|
||||
#include "gdisp.h" /* for coord_t */
|
||||
#include "gevent.h"
|
||||
#include "ginput/ginput_mouse.h" /* for GINPUT_TOUCH_PRESSED */
|
||||
#include "lld/ginput/mouse.h"
|
||||
|
||||
#if defined(GINPUT_MOUSE_USE_CUSTOM_BOARD) && GINPUT_MOUSE_USE_CUSTOM_BOARD
|
||||
/* Include the user supplied board definitions */
|
||||
#include "ginput_lld_mouse_board.h"
|
||||
//#elif defined(BOARD_OLIMEX_SAM7_EX256)
|
||||
// #include "ginput_lld_mouse_board_olimexsam7ex256.h"
|
||||
#elif defined(BOARD_OLIMEX_STM32_LCD)
|
||||
#include "ginput_lld_mouse_board_olimex_stm32_lcd.h"
|
||||
#else
|
||||
#include "ginput_lld_mouse_board.h"
|
||||
#endif
|
||||
|
@ -92,6 +94,8 @@ void ginput_lld_mouse_init(void) {
|
|||
* @notapi
|
||||
*/
|
||||
void ginput_lld_mouse_get_reading(MouseReading *pt) {
|
||||
uint16_t i;
|
||||
|
||||
// If touch-off return the previous results
|
||||
if (!getpin_pressed()) {
|
||||
pt->x = lastx;
|
||||
|
|
|
@ -28,13 +28,13 @@
|
|||
#define _LLD_GINPUT_MOUSE_CONFIG_H
|
||||
|
||||
#define GINPUT_MOUSE_EVENT_TYPE GEVENT_TOUCH
|
||||
#define GINPUT_MOUSE_NEED_CALIBRATION TRUE
|
||||
#define GINPUT_MOUSE_NEED_CALIBRATION FALSE
|
||||
#define GINPUT_MOUSE_LLD_CALIBRATION_LOADSAVE FALSE
|
||||
#define GINPUT_MOUSE_MAX_CALIBRATION_ERROR 2
|
||||
#define GINPUT_MOUSE_MAX_CALIBRATION_ERROR -1
|
||||
#define GINPUT_MOUSE_READ_CYCLES 4
|
||||
#define GINPUT_MOUSE_POLL_PERIOD 100
|
||||
#define GINPUT_MOUSE_MAX_CLICK_JITTER 2
|
||||
#define GINPUT_MOUSE_MAX_MOVE_JITTER 2
|
||||
#define GINPUT_MOUSE_MAX_CLICK_JITTER 4
|
||||
#define GINPUT_MOUSE_MAX_MOVE_JITTER 4
|
||||
#define GINPUT_MOUSE_CLICK_TIME 700
|
||||
|
||||
#endif /* _LLD_GINPUT_MOUSE_CONFIG_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue