diff options
author | Joel Bodenmann <joel@unormal.org> | 2014-11-09 21:55:15 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2014-11-09 21:55:15 +0100 |
commit | f65b1896733e3f8cfa2e0f074585e5c5d7657331 (patch) | |
tree | 001f473d186f4c7178f2b56620fa1b216cae44f3 /drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802_board_template.h | |
parent | baebbad6237f657762523624016cd7d6d5926999 (diff) | |
download | uGFX-f65b1896733e3f8cfa2e0f074585e5c5d7657331.tar.gz uGFX-f65b1896733e3f8cfa2e0f074585e5c5d7657331.tar.bz2 uGFX-f65b1896733e3f8cfa2e0f074585e5c5d7657331.zip |
Added MAX11802 driver - NOT WORKING YET - read_xyz() not ported yet
Diffstat (limited to 'drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802_board_template.h')
-rw-r--r-- | drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802_board_template.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802_board_template.h b/drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802_board_template.h new file mode 100644 index 00000000..113b2a01 --- /dev/null +++ b/drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802_board_template.h @@ -0,0 +1,71 @@ +/* + * This file is subject to the terms of the GFX License. If a copy of + * the license was not distributed with this file, you can obtain one at: + * + * http://ugfx.org/license.html + */ + +#ifndef _GINPUT_LLD_MOUSE_BOARD_H +#define _GINPUT_LLD_MOUSE_BOARD_H + +// Experimental to read pressure on Z1 as well +#define MAX11802_READ_Z_VALUE FALSE + +// Resolution and Accuracy Settings +#define GMOUSE_MAX11802_PEN_CALIBRATE_ERROR 8 +#define GMOUSE_MAX11802_PEN_CLICK_ERROR 6 +#define GMOUSE_MAX11802_PEN_MOVE_ERROR 4 +#define GMOUSE_MAX11802_FINGER_CALIBRATE_ERROR 14 +#define GMOUSE_MAX11802_FINGER_CLICK_ERROR 18 +#define GMOUSE_MAX11802_FINGER_MOVE_ERROR 14 + +// Register values to set +#define MAX11802_MODE 0x0E // Direct conversion with averaging +#define MAX11802_AVG 0x55 +#define MAX11802_TIMING 0x77 +#define MAX11802_DELAY 0x55 + +// How much extra data to allocate at the end of the GMouse structure for the board's use +#define GMOUSE_MAX11802_BOARD_DATA_SIZE 0 + +static inline void init_board(GMouse* m) { + +} + +static inline bool_t getpin_pressed(GMouse* m) { + +} + +static inline void aquire_bus(GMouse* m) { + +} + +static inline void release_bus(GMouse* m) { + +} + +/** + * Send command (with parameter) to the MAX11802 + * + * Return the second byte read in case of interest + */ +static inline uint8_t write_command(GMouse* m, uint8_t command, uint8_t value) { +} + +/** + * Send command (no parameter) to the MAX11802 + * + * Return the byte read in case of interest + */ +static inline uint8_t gfintWriteCommand(GMouse* m, uint8_t command) { +} + +/* + * Read 2 bytes as 16-bit value (command to read must have been sent previously) + * Note: Analog value is in bits 15..4, tags (reading status) in bits 3..0 +*/ +static inline uint16_t read_value(GMouse* m) { + +} + +#endif /* _GINPUT_LLD_MOUSE_BOARD_H */ |