Tronk
This commit is contained in:
@@ -12,7 +12,8 @@ static bool is_cst3530 = false;
|
|||||||
volatile bool touch_isr = false;
|
volatile bool touch_isr = false;
|
||||||
#define CST3530_ADDR 0x1A
|
#define CST3530_ADDR 0x1A
|
||||||
|
|
||||||
bool read_cst3530_touch(int16_t *x, int16_t *y) {
|
bool read_cst3530_touch(int16_t *x, int16_t *y)
|
||||||
|
{
|
||||||
uint8_t buffer[9] = {0};
|
uint8_t buffer[9] = {0};
|
||||||
uint8_t r_cmd[] = {0xD0, 0x07, 0x00, 0x00};
|
uint8_t r_cmd[] = {0xD0, 0x07, 0x00, 0x00};
|
||||||
uint8_t clear_cmd[] = {0xD0, 0x00, 0x02, 0xAB};
|
uint8_t clear_cmd[] = {0xD0, 0x00, 0x02, 0xAB};
|
||||||
@@ -79,8 +80,8 @@ bool readTouch(int16_t *x, int16_t *y)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void IRAM_ATTR touchInterruptHandler()
|
||||||
static void IRAM_ATTR touchInterruptHandler(){
|
{
|
||||||
touch_isr = true;
|
touch_isr = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user