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__)*/
|
#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
|
#if defined(GINPUT_MOUSE_USE_CUSTOM_BOARD) && GINPUT_MOUSE_USE_CUSTOM_BOARD
|
||||||
/* Include the user supplied board definitions */
|
|
||||||
#include "ginput_lld_mouse_board.h"
|
#include "ginput_lld_mouse_board.h"
|
||||||
//#elif defined(BOARD_OLIMEX_SAM7_EX256)
|
#elif defined(BOARD_OLIMEX_STM32_LCD)
|
||||||
// #include "ginput_lld_mouse_board_olimexsam7ex256.h"
|
#include "ginput_lld_mouse_board_olimex_stm32_lcd.h"
|
||||||
#else
|
#else
|
||||||
#include "ginput_lld_mouse_board.h"
|
#include "ginput_lld_mouse_board.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -92,6 +94,8 @@ void ginput_lld_mouse_init(void) {
|
||||||
* @notapi
|
* @notapi
|
||||||
*/
|
*/
|
||||||
void ginput_lld_mouse_get_reading(MouseReading *pt) {
|
void ginput_lld_mouse_get_reading(MouseReading *pt) {
|
||||||
|
uint16_t i;
|
||||||
|
|
||||||
// If touch-off return the previous results
|
// If touch-off return the previous results
|
||||||
if (!getpin_pressed()) {
|
if (!getpin_pressed()) {
|
||||||
pt->x = lastx;
|
pt->x = lastx;
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
#define _LLD_GINPUT_MOUSE_CONFIG_H
|
#define _LLD_GINPUT_MOUSE_CONFIG_H
|
||||||
|
|
||||||
#define GINPUT_MOUSE_EVENT_TYPE GEVENT_TOUCH
|
#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_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_READ_CYCLES 4
|
||||||
#define GINPUT_MOUSE_POLL_PERIOD 100
|
#define GINPUT_MOUSE_POLL_PERIOD 100
|
||||||
#define GINPUT_MOUSE_MAX_CLICK_JITTER 2
|
#define GINPUT_MOUSE_MAX_CLICK_JITTER 4
|
||||||
#define GINPUT_MOUSE_MAX_MOVE_JITTER 2
|
#define GINPUT_MOUSE_MAX_MOVE_JITTER 4
|
||||||
#define GINPUT_MOUSE_CLICK_TIME 700
|
#define GINPUT_MOUSE_CLICK_TIME 700
|
||||||
|
|
||||||
#endif /* _LLD_GINPUT_MOUSE_CONFIG_H */
|
#endif /* _LLD_GINPUT_MOUSE_CONFIG_H */
|
||||||
|
|
Loading…
Add table
Reference in a new issue