Touchpad API update to return coordinates as coord_t instead of uint16_t
This commit is contained in:
parent
9592a87826
commit
6105b88f89
@ -49,6 +49,9 @@
|
|||||||
/* Include the low level driver information */
|
/* Include the low level driver information */
|
||||||
#include "touchpad_lld.h"
|
#include "touchpad_lld.h"
|
||||||
|
|
||||||
|
/* For definitions of coord_t, we require gdisp.h */
|
||||||
|
#include "gdisp.h"
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Type definitions */
|
/* Type definitions */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
@ -57,10 +60,12 @@
|
|||||||
* @brief Struct used for calibration
|
* @brief Struct used for calibration
|
||||||
*/
|
*/
|
||||||
typedef struct cal_t {
|
typedef struct cal_t {
|
||||||
float xm;
|
float ax;
|
||||||
float ym;
|
float bx;
|
||||||
float xn;
|
float cx;
|
||||||
float yn;
|
float ay;
|
||||||
|
float by;
|
||||||
|
float cy;
|
||||||
} cal_t;
|
} cal_t;
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
@ -72,12 +77,12 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void tpInit(const TOUCHPADDriver *tp);
|
void tpInit(const TOUCHPADDriver *tp);
|
||||||
uint16_t tpReadX(void);
|
coord_t tpReadX(void);
|
||||||
uint16_t tpReadY(void);
|
coord_t tpReadY(void);
|
||||||
void tpCalibrate(void);
|
void tpCalibrate(void);
|
||||||
|
|
||||||
#if TOUCHPAD_HAS_IRQ
|
#if TOUCHPAD_HAS_IRQ
|
||||||
uint8_t tpIRQ(void);
|
bool_t tpIRQ(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TOUCHPAD_HAS_PRESSURE
|
#if TOUCHPAD_HAS_PRESSURE
|
||||||
|
Loading…
Reference in New Issue
Block a user