Extern the queue handle and add definition in source file. Add macro condition for dependencies.

This commit is contained in:
Rashed Talukder 2021-10-27 09:20:57 -07:00 committed by C47D
parent ac6cde35c9
commit 2dad083264
2 changed files with 8 additions and 2 deletions

View file

@ -36,6 +36,10 @@ static uint8_t current_dev_addr;
/* -1 coordinates to designate it was never touched */
static ft6x36_touch_t touch_inputs = { -1, -1, LV_INDEV_STATE_REL };
#if CONFIG_LV_FT6X36_COORDINATES_QUEUE
QueueHandle_t ft6x36_touch_queue_handle;
#endif
static esp_err_t ft6x06_i2c_read8(uint8_t slave_addr, uint8_t register_addr, uint8_t *data_buf) {
return lvgl_i2c_read(CONFIG_LV_I2C_TOUCH_PORT, slave_addr, register_addr, data_buf, 1);
}
@ -87,7 +91,7 @@ void ft6x06_init(uint16_t dev_addr) {
LV_LOG_INFO("\tRelease code: 0x%02x", data_buf);
#if CONFIG_LV_FT6X36_COORDINATES_QUEUE
ft6x36_touch_queue_handle = xQueueCreate( FT6X36_TOUCH_QUEUE_ELEMENTS, sizeof( ft6x36_touch_t ));
ft6x36_touch_queue_handle = xQueueCreate( FT6X36_TOUCH_QUEUE_ELEMENTS, sizeof( ft6x36_touch_t ) );
if( ft6x36_touch_queue_handle == NULL )
{
LV_LOG_ERROR("\tError creating touch input FreeRTOS queue" );