This commit is contained in:
Ben Meadors
2026-04-18 11:12:05 -05:00
parent a277108c84
commit e589de2d6e
2 changed files with 24 additions and 23 deletions
@@ -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;
} }