我正在使用 TCS2007触摸驱动器 IC,它使用 i2c 协议与我的控制器(Renesas s5d9)进行通信 。基于已生成的触摸 IRQ,我能够读取 TSC2007_measure_TEMP0和 TSC2007_measure_TEMP1 ,但我无法从 屏幕读取 x、y 位置。
任何人都可以帮助我解决这个问题...
请参阅下面列出的命令字节
#define TSC2007_measure_TEMP0 (0x0 << 4)
#define TSC2007_measure_AUX (0x2 << 4)
#define TSC2007_measure_TEMP1 (0x4 << 4)
#define TSC2007_ACTIVE_XN (0x8 <<4)
#define TSC2007_ACTIVE_YN (0x9 <<4)
#define TSC2007_ACTIVE_YP_XN (0xA << 4)
#define TSC2007_Setup (0xb <<4)
#define TSC2007_measure_X (0xc << 4)
#define TSC2007_measure_Y (0xd << 4)
#define TSC2007_measure_Z1 (0xe << 4)
#define TSC2007_measure_Z2 (0xF << 4)
#define TSC2007_POWER_OFF_IRQ_EN (0x0 << 2)
#define TSC2007_ADC_ON_IRQ_DIS0 (0x1 << 2)
#define TSC2007_ADC_OFF_IRQ_EN (0x2 << 2)
#define TSC2007_ADC_ON_IRQ_DIS1 (0x3 << 2)
#define TSC2007_12位(0x0 <<1)
#define TSC2007_8位(0x1 <<1)
#define MAX_12位((1 << 12)- 1)
#define ADC_ON_12位(TSC2007_12位| TSC2007_ADC_ON_IRQ_DIS0)
#define READ_Y (ADC_ON_12位| TSC2007_measure_Y)
#define READ_Z1 (ADC_ON_12BIT | TSC2007_measure_Z1)
#define READ_Z2 (ADC_ON_12位| TSC2007_measure_Z2)
#define READ_X (ADC_ON_12位| TSC2007_measure_X)
#define PWRDOWN (TSC2007_12bit | TSC2007_POWER_OFF_IRQ_EN)