view touch.h @ 74:3f1c101f89bc

Tell make the resulting binary dependent is dependent on the linker script.
author Daniel O'Connor <darius@dons.net.au>
date Mon, 15 Apr 2013 22:37:46 +0930
parents 58d76cf522ff
children
line wrap: on
line source

/* Touch controller (TSC2046N) defines */
/* Mode/channel select defines */
#define TP_READ_SEL(chan, mode, ref, pd) (0x80 | (((chan) & 0x07) << 4) | (((mode) & 0x01) << 3) | (((ref) & 0x01) << 2) | ((pd) & 0x03))

/* Channel select */
#define TP_CHAN_TEMP0	0
#define TP_CHAN_Y	1	
#define TP_CHAN_VBAT	2
#define TP_CHAN_Z1	3
#define TP_CHAN_Z2	4
#define TP_CHAN_X	5
#define TP_CHAN_AUX	6
#define TP_CHAN_TEMP1	7

/* Mode select */
#define TP_MODE_12	0
#define TP_MODE_8	1

/* Reference type */
#define TP_REF_DIFF	0
#define TP_REF_SER	1

/* Power down mode */
#define TP_PD_AUTO	0
#define TP_PD_REF_OFF	1
#define TP_PD_REF_ON	2
#define TP_PD_ON	3

uint16_t	tp_read(uint8_t type);
void		tp_getcoords(uint16_t *x, uint16_t *y, uint16_t *z1, uint16_t *z2, float *t, float *t2);