Add touch input values to a FreeRTOS queue

This commit is contained in:
Rashed Talukder 2021-10-19 17:27:27 -07:00 committed by C47D
parent 3625deb36d
commit 919d644dc8
2 changed files with 59 additions and 17 deletions

View file

@ -23,6 +23,8 @@
#include <stdint.h>
#include <stdbool.h>
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
@ -145,6 +147,15 @@ typedef struct {
bool inited;
} ft6x36_status_t;
typedef struct
{
int16_t last_x;
int16_t last_y;
lv_indev_state_t current_state;
} ft6x36_touch_t;
QueueHandle_t ft6x36_touch_queue_handle;
/**
* @brief Initialize for FT6x36 communication via I2C
* @param dev_addr: Device address on communication Bus (I2C slave address of FT6X36).