Extern the queue handle and add definition in source file. Add macro condition for dependencies.
This commit is contained in:
parent
ac6cde35c9
commit
2dad083264
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#if CONFIG_LV_FT6X36_COORDINATES_QUEUE
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/queue.h"
|
||||
#endif
|
||||
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
|
@ -155,7 +157,7 @@ typedef struct
|
|||
} ft6x36_touch_t;
|
||||
|
||||
#if CONFIG_LV_FT6X36_COORDINATES_QUEUE
|
||||
QueueHandle_t ft6x36_touch_queue_handle;
|
||||
extern QueueHandle_t ft6x36_touch_queue_handle;
|
||||
#endif
|
||||
/**
|
||||
* @brief Initialize for FT6x36 communication via I2C
|
||||
|
|
Loading…
Reference in a new issue