Mercurial > ~darius > hgwebdir.cgi > stm32test
view touch.h @ 11:ca48036c82ef
Add _usleep16 prototype.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 06 Feb 2012 23:55:11 +1030 |
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);