/*
 *
 * Copyright (C) 2012-2021, Samsung Electronics Co., Ltd.
 *
 * Goodix Touch header file
 */

#pragma once

#include <tee_internal_api.h>
#include "tuiHal.h"
#include "touch_queue.h"

#define GOODIX_I2C_ADDR     0x5D

struct goodix_ts_info {
    unsigned int max_x;
    unsigned int max_y;
    unsigned int width;
    unsigned int height;
    int initialized;
    uint32_t touch_data_addr;
    bool tools_ctrl_sync;
};

extern struct goodix_ts_info ts_data;

TEE_Result goodix_process(void);
TEE_Result goodix_close(void);
TEE_Result goodix_open(uint32_t width, uint32_t height);
TEE_Result goodix_get_info(drTouchInfo_ptr touchSize);
