DLKM: Update base code for novatek

Change code base for keep consistency.
- Add comments for code readability.
- Remove redundant code.
- Set initial value for global variables.
- Move memory map and trim id table to one file. (nt36xxx_mem_map.h)
- Refine gesture part to fit latest FW protocol.
- Refine ESD function.
- Refine trim ID and product id part.
- Add CRC support function.
- Refine FW update routine.
- Refine selftest function and add support for notch panel.

Change-Id: Id7dfd3d5d29d44deaccb8f7666094c0ff5e1f8d3
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1220466
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wengjun1 2018-08-03 16:27:12 +08:00 • committed by Jun Weng
commit 09e1d33c18
7 changed files with 1750 additions and 797 deletions

View file

@ -23,9 +23,7 @@
#include <linux/platform_device.h>
#include <linux/gfp.h>
#include <linux/slab.h>
#include <linux/miscdevice.h>
#include <linux/list.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/module.h>
@ -59,11 +57,11 @@
static struct delayed_work nvt_esd_check_work;
static struct workqueue_struct *nvt_esd_check_wq;
static unsigned long irq_timer;
uint8_t esd_check;
uint8_t esd_retry;
static unsigned long irq_timer = 0;
uint8_t esd_check = false;
uint8_t esd_retry = 0;
uint8_t esd_retry_max = 5;
#endif
#endif /* #if NVT_TOUCH_ESD_PROTECT */
#if NVT_TOUCH_EXT_PROC
extern int32_t nvt_extra_proc_init(void);
@ -94,171 +92,6 @@ static void nvt_ts_early_suspend(struct early_suspend *h);
static void nvt_ts_late_resume(struct early_suspend *h);
#endif
static const struct nvt_ts_mem_map NT36672A_memory_map = {
.EVENT_BUF_ADDR = 0x21C00,
.RAW_PIPE0_ADDR = 0x20000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x23000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x20BFC,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x23BFC,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x206DC,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x236DC,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x20510,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x23510,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x20BF0,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x23BF0,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x24000,
.RW_FLASH_DATA_ADDR = 0x24002,
};
static const struct nvt_ts_mem_map NT36772_memory_map = {
.EVENT_BUF_ADDR = 0x11E00,
.RAW_PIPE0_ADDR = 0x10000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x12000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x10E70,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x12E70,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x10830,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x12830,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x10E60,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x12E60,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x10E68,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x12E68,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x14000,
.RW_FLASH_DATA_ADDR = 0x14002,
};
static const struct nvt_ts_mem_map NT36525_memory_map = {
.EVENT_BUF_ADDR = 0x11A00,
.RAW_PIPE0_ADDR = 0x10000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x12000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x10B08,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x12B08,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x1064C,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x1264C,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x10634,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x12634,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x10AFC,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x12AFC,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x14000,
.RW_FLASH_DATA_ADDR = 0x14002,
};
static const struct nvt_ts_mem_map NT36870_memory_map = {
.EVENT_BUF_ADDR = 0x25000,
.RAW_PIPE0_ADDR = 0x20000,
.RAW_PIPE0_Q_ADDR = 0x204C8,
.RAW_PIPE1_ADDR = 0x23000,
.RAW_PIPE1_Q_ADDR = 0x234C8,
.BASELINE_ADDR = 0x21350,
.BASELINE_Q_ADDR = 0x21818,
.BASELINE_BTN_ADDR = 0x24350,
.BASELINE_BTN_Q_ADDR = 0x24358,
.DIFF_PIPE0_ADDR = 0x209B0,
.DIFF_PIPE0_Q_ADDR = 0x20E78,
.DIFF_PIPE1_ADDR = 0x239B0,
.DIFF_PIPE1_Q_ADDR = 0x23E78,
.RAW_BTN_PIPE0_ADDR = 0x20990,
.RAW_BTN_PIPE0_Q_ADDR = 0x20998,
.RAW_BTN_PIPE1_ADDR = 0x23990,
.RAW_BTN_PIPE1_Q_ADDR = 0x23998,
.DIFF_BTN_PIPE0_ADDR = 0x21340,
.DIFF_BTN_PIPE0_Q_ADDR = 0x21348,
.DIFF_BTN_PIPE1_ADDR = 0x24340,
.DIFF_BTN_PIPE1_Q_ADDR = 0x24348,
.READ_FLASH_CHECKSUM_ADDR = 0x24000,
.RW_FLASH_DATA_ADDR = 0x24002,
};
static const struct nvt_ts_mem_map NT36676F_memory_map = {
.EVENT_BUF_ADDR = 0x11A00,
.RAW_PIPE0_ADDR = 0x10000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x12000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x10B08,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x12B08,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x1064C,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x1264C,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x10634,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x12634,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x10AFC,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x12AFC,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x14000,
.RW_FLASH_DATA_ADDR = 0x14002,
};
#define NVT_ID_BYTE_MAX 6
struct nvt_ts_trim_id_table {
uint8_t id[NVT_ID_BYTE_MAX];
uint8_t mask[NVT_ID_BYTE_MAX];
const struct nvt_ts_mem_map *mmap;
uint8_t carrier_system;
};
static const struct nvt_ts_trim_id_table trim_id_table[] = {
{.id = {0x0A, 0xFF, 0xFF, 0x72, 0x66, 0x03}, .mask = {1, 0, 0, 1, 1, 1},
.mmap = &NT36672A_memory_map, .carrier_system = 0},
{.id = {0x55, 0x00, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0x55, 0x72, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xAA, 0x00, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xAA, 0x72, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x72, 0x67, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x70, 0x66, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x70, 0x67, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x72, 0x66, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x25, 0x65, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36525_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x70, 0x68, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36870_memory_map, .carrier_system = 1},
{.id = {0xFF, 0xFF, 0xFF, 0x76, 0x66, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36676F_memory_map, .carrier_system = 0}
};
#if TOUCH_KEY_NUM > 0
const uint16_t touch_key_array[TOUCH_KEY_NUM] = {
KEY_BACK,
@ -269,23 +102,23 @@ const uint16_t touch_key_array[TOUCH_KEY_NUM] = {
#if WAKEUP_GESTURE
const uint16_t gesture_key_array[] = {
KEY_POWER,
KEY_POWER,
KEY_POWER,
KEY_POWER,
KEY_POWER,
KEY_POWER,
KEY_POWER,
KEY_POWER,
KEY_POWER,
KEY_POWER,
KEY_POWER,
KEY_POWER,
KEY_POWER,
KEY_POWER, /*GESTURE_WORD_C*/
KEY_POWER, /*GESTURE_WORD_W*/
KEY_POWER, /*GESTURE_WORD_V*/
KEY_POWER, /*GESTURE_DOUBLE_CLICK*/
KEY_POWER, /*GESTURE_WORD_Z*/
KEY_POWER, /*GESTURE_WORD_M*/
KEY_POWER, /*GESTURE_WORD_O*/
KEY_POWER, /*GESTURE_WORD_e*/
KEY_POWER, /*GESTURE_WORD_S*/
KEY_POWER, /*GESTURE_SLIDE_UP*/
KEY_POWER, /*GESTURE_SLIDE_DOWN*/
KEY_POWER, /*GESTURE_SLIDE_LEFT*/
KEY_POWER, /*GESTURE_SLIDE_RIGHT*/
};
#endif
static uint8_t bTouchIsAwake;
static uint8_t bTouchIsAwake = 0;
/*******************************************************
Description:
@ -324,25 +157,6 @@ int32_t CTP_I2C_READ(struct i2c_client *client, uint16_t address, uint8_t *buf,
return ret;
}
/*******************************************************
Description:
Novatek touchscreen i2c dummy read function.
return:
Executive outcomes. 1---succeed. -5---I/O error
*******************************************************/
int32_t CTP_I2C_READ_DUMMY(struct i2c_client *client, uint16_t address)
{
uint8_t buf[8] = {0};
int32_t ret = -1;
ret = CTP_I2C_READ(client, address, buf, 2);
if (ret < 0)
NVT_ERR("CTP_I2C_READ_DUMMY failed.(%d)\n", ret);
return ret;
}
/*******************************************************
Description:
Novatek touchscreen i2c write function.
@ -390,8 +204,8 @@ void nvt_sw_reset_idle(void)
uint8_t buf[4] = {0};
/* ---write i2c cmds to reset idle--- */
buf[0] = 0x00;
buf[1] = 0xA5;
buf[0]=0x00;
buf[1]=0xA5;
CTP_I2C_WRITE(ts->client, I2C_HW_Address, buf, 2);
msleep(15);
@ -407,11 +221,13 @@ return:
void nvt_bootloader_reset(void)
{
uint8_t buf[8] = {0};
NVT_ERR("xlixiang---enter-%s\n", __func__);
NVT_LOG("enter-%s\n", __func__);
/*---write i2c cmds to reset---*/
buf[0] = 0x00;
buf[1] = 0x69;
CTP_I2C_WRITE(ts->client, I2C_HW_Address, buf, 2);
/* need 35ms delay after bootloader reset*/
msleep(35);
}
@ -429,15 +245,18 @@ int32_t nvt_clear_fw_status(void)
const int32_t retry = 20;
for (i = 0; i < retry; i++) {
/*---set xdata index to EVENT BUF ADDR---*/
buf[0] = 0xFF;
buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
/*---clear fw status---*/
buf[0] = EVENT_MAP_HANDSHAKING_or_SUB_CMD_BYTE;
buf[1] = 0x00;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 2);
/*---read fw status---*/
buf[0] = EVENT_MAP_HANDSHAKING_or_SUB_CMD_BYTE;
buf[1] = 0xFF;
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, 2);
@ -470,11 +289,13 @@ int32_t nvt_check_fw_status(void)
const int32_t retry = 50;
for (i = 0; i < retry; i++) {
/*---set xdata index to EVENT BUF ADDR---*/
buf[0] = 0xFF;
buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
/*---read fw status---*/
buf[0] = EVENT_MAP_HANDSHAKING_or_SUB_CMD_BYTE;
buf[1] = 0x00;
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, 2);
@ -505,10 +326,11 @@ int32_t nvt_check_fw_reset_state(RST_COMPLETE_STATE check_reset_state)
uint8_t buf[8] = {0};
int32_t ret = 0;
int32_t retry = 0;
NVT_ERR("xlixiang---enter-%s\n", __func__);
NVT_LOG("enter-%s\n", __func__);
while (1) {
msleep(10);
/*---read reset state---*/
buf[0] = EVENT_MAP_RESET_COMPLETE;
buf[1] = 0x00;
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, 6);
@ -542,11 +364,13 @@ int32_t nvt_read_pid(void)
uint8_t buf[3] = {0};
int32_t ret = 0;
/*---set xdata index to EVENT BUF ADDR---*/
buf[0] = 0xFF;
buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
/*---read project id---*/
buf[0] = EVENT_MAP_PROJECTID;
buf[1] = 0x00;
buf[2] = 0x00;
@ -574,11 +398,13 @@ int32_t nvt_get_fw_info(void)
int32_t ret = 0;
info_retry:
/*---set xdata index to EVENT BUF ADDR---*/
buf[0] = 0xFF;
buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
/*---read fw info---*/
buf[0] = EVENT_MAP_FWINFO;
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, 17);
ts->fw_ver = buf[1];
@ -588,6 +414,7 @@ info_retry:
ts->abs_y_max = (uint16_t)((buf[7] << 8) | buf[8]);
ts->max_button_num = buf[11];
/*---clear x_num, y_num if fw info is broken---*/
if ((buf[1] + buf[2]) != 0xFF) {
NVT_ERR("FW info is broken! fw_ver=0x%02X, ~fw_ver=0x%02X\n", buf[1], buf[2]);
ts->fw_ver = 0;
@ -597,7 +424,7 @@ info_retry:
ts->abs_y_max = TOUCH_DEFAULT_MAX_HEIGHT;
ts->max_button_num = TOUCH_KEY_NUM;
if (retry_count < 3) {
if(retry_count < 3) {
retry_count++;
NVT_ERR("retry_count=%d\n", retry_count);
goto info_retry;
@ -612,6 +439,7 @@ info_retry:
ret = 0;
}
/*---Get Novatek PID---*/
nvt_read_pid();
return ret;
@ -647,14 +475,19 @@ static ssize_t nvt_flash_read(struct file *file, char __user *buff, size_t count
NVT_ERR("copy from user error\n");
return -EFAULT;
}
#if NVT_TOUCH_ESD_PROTECT
/*
* stop esd check work to avoid case that 0x77 report righ after here to enable esd check again
* finally lead to trigger esd recovery bootloader reset
*/
cancel_delayed_work_sync(&nvt_esd_check_work);
nvt_esd_check_enable(false);
#endif
i2c_wr = str[0] >> 7;
if (i2c_wr == 0) {
if (i2c_wr == 0) { /*I2C write*/
while (retries < 20) {
ret = CTP_I2C_WRITE(ts->client, (str[0] & 0x7F), &str[2], str[1]);
if (ret == 1)
@ -671,7 +504,7 @@ static ssize_t nvt_flash_read(struct file *file, char __user *buff, size_t count
}
return ret;
} else if (i2c_wr == 1) {
} else if (i2c_wr == 1) { /*I2C read*/
while (retries < 20) {
ret = CTP_I2C_READ(ts->client, (str[0] & 0x7F), &str[2], str[1]);
if (ret == 2)
@ -682,6 +515,7 @@ static ssize_t nvt_flash_read(struct file *file, char __user *buff, size_t count
retries++;
}
/* copy buff to user if i2c transfer*/
if (retries < 20) {
if (copy_to_user(buff, str, count))
return -EFAULT;
@ -772,19 +606,24 @@ static int32_t nvt_flash_proc_init(void)
#endif
#if WAKEUP_GESTURE
#define GESTURE_WORD_C 12
#define GESTURE_WORD_W 13
#define GESTURE_WORD_V 14
#define GESTURE_DOUBLE_CLICK 15
#define GESTURE_WORD_Z 16
#define GESTURE_WORD_M 17
#define GESTURE_WORD_O 18
#define GESTURE_WORD_e 19
#define GESTURE_WORD_S 20
#define GESTURE_SLIDE_UP 21
#define GESTURE_SLIDE_DOWN 22
#define GESTURE_SLIDE_LEFT 23
#define GESTURE_SLIDE_RIGHT 24
#define GESTURE_WORD_C 12
#define GESTURE_WORD_W 13
#define GESTURE_WORD_V 14
#define GESTURE_DOUBLE_CLICK 15
#define GESTURE_WORD_Z 16
#define GESTURE_WORD_M 17
#define GESTURE_WORD_O 18
#define GESTURE_WORD_e 19
#define GESTURE_WORD_S 20
#define GESTURE_SLIDE_UP 21
#define GESTURE_SLIDE_DOWN 22
#define GESTURE_SLIDE_LEFT 23
#define GESTURE_SLIDE_RIGHT 24
/* customized gesture id */
#define DATA_PROTOCOL 30
/* function page definition */
#define FUNCPAGE_GESTURE 1
static struct wake_lock gestrue_wakelock;
@ -795,9 +634,19 @@ Description:
return:
n.a.
*******************************************************/
void nvt_ts_wakeup_gesture_report(uint8_t gesture_id)
void nvt_ts_wakeup_gesture_report(uint8_t gesture_id, uint8_t *data)
{
uint32_t keycode = 0;
uint8_t func_type = data[2];
uint8_t func_id = data[3];
/* support fw specifal data protocol */
if ((gesture_id == DATA_PROTOCOL) && (func_type == FUNCPAGE_GESTURE)) {
gesture_id = func_id;
} else if (gesture_id > DATA_PROTOCOL) {
NVT_ERR("gesture_id %d is invalid, func_type=%d, func_id=%d\n", gesture_id, func_type, func_id);
return;
}
NVT_LOG("gesture_id = %d\n", gesture_id);
@ -919,12 +768,12 @@ err_request_irq_gpio:
#if NVT_TOUCH_ESD_PROTECT
void nvt_esd_check_enable(uint8_t enable)
{
/* enable/disable esd check flag */
esd_check = enable;
/* update interrupt timer */
irq_timer = jiffies;
/* clear esd_retry counter, if protect function is enabled */
esd_retry = enable ? 0 : esd_retry;
/* enable/disable esd check flag */
esd_check = enable;
}
static uint8_t nvt_fw_recovery(uint8_t *point_data)
@ -947,7 +796,6 @@ static void nvt_esd_check_func(struct work_struct *work)
{
unsigned int timer = jiffies_to_msecs(jiffies - irq_timer);
if (esd_retry >= esd_retry_max)
nvt_esd_check_enable(false);
@ -965,7 +813,7 @@ static void nvt_esd_check_func(struct work_struct *work)
queue_delayed_work(nvt_esd_check_wq, &nvt_esd_check_work,
msecs_to_jiffies(NVT_TOUCH_ESD_CHECK_PERIOD));
}
#endif
#endif /* #if NVT_TOUCH_ESD_PROTECT */
#define POINT_DATA_LEN 65
/*******************************************************
@ -1000,7 +848,6 @@ static void nvt_ts_work_func(struct work_struct *work)
}
#if NVT_TOUCH_ESD_PROTECT
if (nvt_fw_recovery(point_data)) {
nvt_esd_check_enable(true);
goto XFER_ERROR;
@ -1010,7 +857,7 @@ static void nvt_ts_work_func(struct work_struct *work)
#if WAKEUP_GESTURE
if (bTouchIsAwake == 0) {
input_id = (uint8_t)(point_data[1] >> 3);
nvt_ts_wakeup_gesture_report(input_id);
nvt_ts_wakeup_gesture_report(input_id, point_data);
enable_irq(ts->client->irq);
mutex_unlock(&ts->lock);
return;
@ -1027,8 +874,8 @@ static void nvt_ts_work_func(struct work_struct *work)
if (((point_data[position] & 0x07) == 0x01) || ((point_data[position] & 0x07) == 0x02)) {
#if NVT_TOUCH_ESD_PROTECT
/* update interrupt timer */
irq_timer = jiffies;
/* update interrupt timer */
irq_timer = jiffies;
#endif
input_x = (uint32_t)(point_data[position + 1] << 4) + (uint32_t) (point_data[position + 3] >> 4);
input_y = (uint32_t)(point_data[position + 2] << 4) + (uint32_t) (point_data[position + 3] & 0x0F);
@ -1092,6 +939,10 @@ static void nvt_ts_work_func(struct work_struct *work)
#if TOUCH_KEY_NUM > 0
if (point_data[61] == 0xF8) {
#if NVT_TOUCH_ESD_PROTECT
/* update interrupt timer */
irq_timer = jiffies;
#endif /* #if NVT_TOUCH_ESD_PROTECT */
for (i = 0; i < ts->max_button_num; i++) {
input_report_key(ts->input_dev, touch_key_array[i], ((point_data[62] >> i) & 0x01));
}
@ -1132,7 +983,6 @@ static irqreturn_t nvt_ts_irq_handler(int32_t irq, void *dev_id)
return IRQ_HANDLED;
}
/*******************************************************
Description:
Novatek touchscreen check and stop crc reboot loop.
@ -1145,29 +995,36 @@ void nvt_stop_crc_reboot(void)
uint8_t buf[8] = {0};
int32_t retry = 0;
/* read dummy buffer to check CRC fail reboot is happening or not*/
/* ---change I2C index to prevent geting 0xFF, but not 0xFC---*/
buf[0] = 0xFF;
buf[1] = 0x01;
buf[2] = 0xF6;
CTP_I2C_WRITE(ts->client, I2C_BLDR_Address, buf, 3);
/* ---read to check if buf is 0xFC which means IC is in CRC reboot ---*/
buf[0] = 0x4E;
CTP_I2C_READ(ts->client, I2C_BLDR_Address, buf, 4);
if (((buf[1] == 0xFC) && (buf[2] == 0xFC) && (buf[3] == 0xFC)) ||
if ((buf[1] == 0xFC) ||
((buf[1] == 0xFF) && (buf[2] == 0xFF) && (buf[3] == 0xFF))) {
/* IC is in CRC fail reboot loop, needs to be stopped! */
/* IC is in CRC fail reboot loop, needs to be stopped!*/
for (retry = 5; retry > 0; retry--) {
/* ---write i2c cmds to reset idle : 1st---*/
buf[0] = 0x00;
buf[1] = 0xA5;
CTP_I2C_WRITE(ts->client, I2C_HW_Address, buf, 2);
/* ---write i2c cmds to reset idle : 2rd---*/
buf[0] = 0x00;
buf[1] = 0xA5;
CTP_I2C_WRITE(ts->client, I2C_HW_Address, buf, 2);
msleep(1);
/* ---clear CRC_ERR_FLAG---*/
buf[0] = 0xFF;
buf[1] = 0x03;
buf[2] = 0xF1;
@ -1177,6 +1034,7 @@ void nvt_stop_crc_reboot(void)
buf[1] = 0xA5;
CTP_I2C_WRITE(ts->client, I2C_BLDR_Address, buf, 2);
/* ---check CRC_ERR_FLAG---*/
buf[0] = 0xFF;
buf[1] = 0x03;
buf[2] = 0xF1;
@ -1211,11 +1069,31 @@ static int8_t nvt_ts_check_chip_ver_trim(void)
int32_t i = 0;
int32_t found_nvt_chip = 0;
int32_t ret = -1;
#if NVT_TOUCH_FW
const char* product_id_table[] = {
"NT36572A", /* 0*/
"NT36672A",
"NT36682A",
"NT36670A",
"NT36670B",
"NT36772A", /* 5*/
"NT36772",
"NT36772",
"NT36772",
"NT36772",
"NT36772", /* 10*/
"NT36670",
"NT36770",
"NT36672",
"NT36525",
"NT36870", /* 15*/
"NT36676"
};
#endif
nvt_bootloader_reset(); /* NOT in retry loop*/
nvt_bootloader_reset();
//---Check for 5 times---
for (retry = 5; retry > 0; retry--) {
nvt_sw_reset_idle();
buf[0] = 0x00;
@ -1239,9 +1117,18 @@ static int8_t nvt_ts_check_chip_ver_trim(void)
NVT_LOG("buf[1]=0x%02X, buf[2]=0x%02X, buf[3]=0x%02X, buf[4]=0x%02X, buf[5]=0x%02X, buf[6]=0x%02X\n",
buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]);
/* ---Stop CRC check to prevent IC auto reboot---*/
if ((buf[1] == 0xFC) ||
((buf[1] == 0xFF) && (buf[2] == 0xFF) && (buf[3] == 0xFF))) {
nvt_stop_crc_reboot();
continue;
}
/* compare read chip id on supported list*/
for (list = 0; list < (sizeof(trim_id_table) / sizeof(struct nvt_ts_trim_id_table)); list++) {
found_nvt_chip = 0;
/* compare each byte*/
for (i = 0; i < NVT_ID_BYTE_MAX; i++) {
if (trim_id_table[list].mask[i]) {
if (buf[i + 1] != trim_id_table[list].id[i])
@ -1256,15 +1143,7 @@ static int8_t nvt_ts_check_chip_ver_trim(void)
if (found_nvt_chip) {
NVT_LOG("This is NVT touch IC\n");
#if NVT_TOUCH_FW
if (list == 8) {
snprintf(ts->product_id, sizeof(ts->product_id), "NT36525");
} else if (list == 9) {
snprintf(ts->product_id, sizeof(ts->product_id), "NT36870");
} else if (list == 10) {
snprintf(ts->product_id, sizeof(ts->product_id), "NT36676F");
} else {
snprintf(ts->product_id, sizeof(ts->product_id), "NT36772");
}
snprintf(ts->product_id, sizeof(ts->product_id), product_id_table[list]);
#endif
ts->mmap = trim_id_table[list].mmap;
ts->carrier_system = trim_id_table[list].carrier_system;
@ -1276,13 +1155,14 @@ static int8_t nvt_ts_check_chip_ver_trim(void)
}
}
if (((buf[1] == 0xFC) && (buf[2] == 0xFC) && (buf[3] == 0xFC)) ||
((buf[1] == 0xFF) && (buf[2] == 0xFF) && (buf[3] == 0xFF))) {
nvt_stop_crc_reboot();
}
msleep(10);
}
#if NVT_TOUCH_FW
if (ret == -1) {
snprintf(ts->product_id, sizeof(ts->product_id), "NA");
}
#endif
out:
return ret;
}
@ -1313,8 +1193,10 @@ static int32_t nvt_ts_probe(struct i2c_client *client, const struct i2c_device_i
ts->client = client;
i2c_set_clientdata(client, ts);
/*---parse dts---*/
nvt_parse_dt(&client->dev);
/*---request and config GPIOs---*/
ret = nvt_gpio_config(ts);
if (ret) {
NVT_ERR("gpio config error!\n");
@ -1327,14 +1209,17 @@ static int32_t nvt_ts_probe(struct i2c_client *client, const struct i2c_device_i
NVT_LOG("pinctrl failed err %ld\n", error);
}
/*---check i2c func.---*/
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
NVT_ERR("i2c_check_functionality failed. (no I2C_FUNC_I2C)\n");
ret = -ENODEV;
goto err_check_functionality_failed;
}
/* need 10ms delay after POR(power on reset)*/
msleep(10);
/*---check chip version trim---*/
ret = nvt_ts_check_chip_ver_trim();
if (ret) {
NVT_ERR("chip is not identified\n");
@ -1350,6 +1235,7 @@ static int32_t nvt_ts_probe(struct i2c_client *client, const struct i2c_device_i
nvt_get_fw_info();
mutex_unlock(&ts->lock);
/*---create workqueue---*/
nvt_wq = create_workqueue("nvt_wq");
if (!nvt_wq) {
NVT_ERR("nvt_wq create workqueue failed\n");
@ -1358,6 +1244,7 @@ static int32_t nvt_ts_probe(struct i2c_client *client, const struct i2c_device_i
}
INIT_WORK(&ts->nvt_work, nvt_ts_work_func);
/*---allocate input device---*/
ts->input_dev = input_allocate_device();
if (ts->input_dev == NULL) {
NVT_ERR("allocate input device failed\n");
@ -1373,6 +1260,7 @@ static int32_t nvt_ts_probe(struct i2c_client *client, const struct i2c_device_i
ts->int_trigger_type = INT_TRIGGER_TYPE;
/*---set input device info.---*/
ts->input_dev->evbit[0] = BIT_MASK(EV_SYN) | BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) ;
ts->input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
ts->input_dev->propbit[0] = BIT(INPUT_PROP_DIRECT);
@ -1381,18 +1269,19 @@ static int32_t nvt_ts_probe(struct i2c_client *client, const struct i2c_device_i
input_mt_init_slots(ts->input_dev, ts->max_touch_num, 0);
#endif
input_set_abs_params(ts->input_dev, ABS_MT_PRESSURE, 0, TOUCH_FORCE_NUM, 0, 0);
input_set_abs_params(ts->input_dev, ABS_MT_PRESSURE, 0, TOUCH_FORCE_NUM, 0, 0); /*pressure = TOUCH_FORCE_NUM*/
#if TOUCH_MAX_FINGER_NUM > 1
input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); /*area = 255*/
input_set_abs_params(ts->input_dev, ABS_MT_POSITION_X, 0, ts->abs_x_max, 0, 0);
input_set_abs_params(ts->input_dev, ABS_MT_POSITION_Y, 0, ts->abs_y_max, 0, 0);
#if MT_PROTOCOL_B
/* no need to set ABS_MT_TRACKING_ID, input_mt_init_slots() already set it*/
#else
input_set_abs_params(ts->input_dev, ABS_MT_TRACKING_ID, 0, ts->max_touch_num, 0, 0);
#endif
#endif
#endif /*MT_PROTOCOL_B*/
#endif /*TOUCH_MAX_FINGER_NUM > 1*/
#if TOUCH_KEY_NUM > 0
for (retry = 0; retry < ts->max_button_num; retry++) {
@ -1412,12 +1301,14 @@ static int32_t nvt_ts_probe(struct i2c_client *client, const struct i2c_device_i
ts->input_dev->phys = ts->phys;
ts->input_dev->id.bustype = BUS_I2C;
/*---register input device---*/
ret = input_register_device(ts->input_dev);
if (ret) {
NVT_ERR("register input device (%s) failed. ret=%d\n", ts->input_dev->name, ret);
goto err_input_register_device_failed;
}
/*---set int-pin & request irq---*/
client->irq = gpio_to_irq(ts->irq_gpio);
if (client->irq) {
NVT_LOG("int_trigger_type=%d\n", ts->int_trigger_type);
@ -1444,6 +1335,7 @@ static int32_t nvt_ts_probe(struct i2c_client *client, const struct i2c_device_i
goto err_create_nvt_fwu_wq_failed;
}
INIT_DELAYED_WORK(&ts->nvt_fwu_work, Boot_Update_Firmware);
/* please make sure boot update start after display reset(RESX) sequence*/
queue_delayed_work(nvt_fwu_wq, &ts->nvt_fwu_work, msecs_to_jiffies(14000));
#endif
@ -1453,7 +1345,7 @@ static int32_t nvt_ts_probe(struct i2c_client *client, const struct i2c_device_i
queue_delayed_work(nvt_esd_check_wq, &nvt_esd_check_work,
msecs_to_jiffies(NVT_TOUCH_ESD_CHECK_PERIOD));
#endif
/*---set device node---*/
#if NVT_TOUCH_PROC
ret = nvt_flash_proc_init();
if (ret != 0) {
@ -1601,15 +1493,17 @@ static int32_t nvt_ts_suspend(struct device *dev)
ts->suspended = 1;
#endif
bTouchIsAwake = 0;
#if NVT_TOUCH_ESD_PROTECT
cancel_delayed_work_sync(&nvt_esd_check_work);
nvt_esd_check_enable(false);
#endif
#if WAKEUP_GESTURE
/*---write i2c command to enter "wakeup gesture mode"---*/
buf[0] = EVENT_MAP_HOST_CMD;
buf[1] = 0x13;
#if 0
#if 0 /* Do not set 0xFF first, ToDo*/
buf[2] = 0xFF;
buf[3] = 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 4);
@ -1621,13 +1515,14 @@ static int32_t nvt_ts_suspend(struct device *dev)
NVT_LOG("Enabled touch wakeup gesture\n");
#else
#else /* WAKEUP_GESTURE*/
disable_irq(ts->client->irq);
/*---write i2c command to enter "deep sleep mode"---*/
buf[0] = EVENT_MAP_HOST_CMD;
buf[1] = 0x11;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 2);
#endif
#endif /* WAKEUP_GESTURE*/
/* release all touches */
#if MT_PROTOCOL_B
@ -1675,10 +1570,11 @@ static int32_t nvt_ts_resume(struct device *dev)
NVT_LOG("start\n");
/* please make sure display reset(RESX) sequence and mipi dsi cmds sent before this*/
nvt_bootloader_reset();
res = nvt_check_fw_reset_state(RESET_STATE_REK);
NVT_ERR("xlixiang---enter-%s-----res=%d\n", __func__, res);
NVT_LOG("enter-%s-----res=%d\n", __func__, res);
#if !WAKEUP_GESTURE
enable_irq(ts->client->irq);
@ -1717,7 +1613,7 @@ static int fb_notifier_callback(struct notifier_block *self, unsigned long event
} else if (evdata && evdata->data && event == FB_EVENT_BLANK) {
blank = evdata->data;
if (*blank == FB_BLANK_UNBLANK ||
(*blank == FB_BLANK_NORMAL && 0 == bTouchIsAwake)) {
(*blank == FB_BLANK_NORMAL && 0 == bTouchIsAwake)) {
nvt_ts_resume(&ts->client->dev);
}
}
@ -1806,13 +1702,14 @@ static int32_t __init nvt_driver_init(void)
int32_t ret = 0;
NVT_LOG("start\n");
/*---add i2c driver---*/
ret = i2c_add_driver(&nvt_i2c_driver);
if (ret) {
pr_err("%s: failed to add i2c driver", __func__);
goto err_driver;
}
pr_info("%s: finished\n", __func__);
NVT_LOG("%s: finished\n", __func__);
err_driver:
return ret;
@ -1836,6 +1733,7 @@ static void __exit nvt_driver_exit(void)
if (nvt_fwu_wq)
destroy_workqueue(nvt_fwu_wq);
#endif
#if NVT_TOUCH_ESD_PROTECT
if (nvt_esd_check_wq)
destroy_workqueue(nvt_esd_check_wq);

View file

@ -15,8 +15,8 @@
* more details.
*
*/
#ifndef _LINUX_NVT_TOUCH_H
#define _LINUX_NVT_TOUCH_H
#ifndef _LINUX_NVT_TOUCH_H
#define _LINUX_NVT_TOUCH_H
#include <linux/i2c.h>
#include <linux/input.h>
@ -25,12 +25,19 @@
#include <linux/earlysuspend.h>
#endif
#define NVT_DEBUG 1
#include "nt36xxx_mem_map.h"
#define NVT_DEBUG 0
/*---GPIO number---*/
#define NVTTOUCH_INT_PIN 943
/*---INT trigger mode---*/
#define INT_TRIGGER_TYPE IRQ_TYPE_EDGE_RISING
/*---I2C driver info.---*/
#define NVT_I2C_NAME "NVT-ts"
#define I2C_BLDR_Address 0x01
#define I2C_FW_Address 0x01
@ -39,12 +46,15 @@
#if NVT_DEBUG
#define NVT_LOG(fmt, args...) pr_err("[%s] %s %d: " fmt, NVT_I2C_NAME, __func__, __LINE__, ##args)
#else
#define NVT_LOG(fmt, args...) pr_info("[%s] %s %d: " fmt, NVT_I2C_NAME, __func__, __LINE__, ##args)
#define NVT_LOG(fmt, args...) pr_debug("[%s] %s %d: " fmt, NVT_I2C_NAME, __func__, __LINE__, ##args)
#endif
#define NVT_ERR(fmt, args...) pr_err("[%s] %s %d: " fmt, NVT_I2C_NAME, __func__, __LINE__, ##args)
/*---Input device info.---*/
#define NVT_TS_NAME "NVTCapacitiveTouchScreen"
/*---Touch info.---*/
#define TOUCH_DEFAULT_MAX_WIDTH 1080
#define TOUCH_DEFAULT_MAX_HEIGHT 2246
#define TOUCH_MAX_FINGER_NUM 10
@ -54,6 +64,7 @@ extern const uint16_t touch_key_array[TOUCH_KEY_NUM];
#endif
#define TOUCH_FORCE_NUM 1000
/*---Customerized func.---*/
#define NVT_TOUCH_PROC 1
#define NVT_TOUCH_EXT_PROC 1
#define NVT_TOUCH_FW 1
@ -70,32 +81,6 @@ extern const uint16_t gesture_key_array[];
#define NVT_TOUCH_ESD_PROTECT 1
#define NVT_TOUCH_ESD_CHECK_PERIOD 2000 /* ms */
struct nvt_ts_mem_map {
uint32_t EVENT_BUF_ADDR;
uint32_t RAW_PIPE0_ADDR;
uint32_t RAW_PIPE0_Q_ADDR;
uint32_t RAW_PIPE1_ADDR;
uint32_t RAW_PIPE1_Q_ADDR;
uint32_t BASELINE_ADDR;
uint32_t BASELINE_Q_ADDR;
uint32_t BASELINE_BTN_ADDR;
uint32_t BASELINE_BTN_Q_ADDR;
uint32_t DIFF_PIPE0_ADDR;
uint32_t DIFF_PIPE0_Q_ADDR;
uint32_t DIFF_PIPE1_ADDR;
uint32_t DIFF_PIPE1_Q_ADDR;
uint32_t RAW_BTN_PIPE0_ADDR;
uint32_t RAW_BTN_PIPE0_Q_ADDR;
uint32_t RAW_BTN_PIPE1_ADDR;
uint32_t RAW_BTN_PIPE1_Q_ADDR;
uint32_t DIFF_BTN_PIPE0_ADDR;
uint32_t DIFF_BTN_PIPE0_Q_ADDR;
uint32_t DIFF_BTN_PIPE1_ADDR;
uint32_t DIFF_BTN_PIPE1_Q_ADDR;
uint32_t READ_FLASH_CHECKSUM_ADDR;
uint32_t RW_FLASH_DATA_ADDR;
};
struct nvt_ts_data {
struct i2c_client *client;
struct input_dev *input_dev;
@ -145,9 +130,9 @@ struct nvt_flash_data{
#endif
typedef enum {
RESET_STATE_INIT = 0xA0,
RESET_STATE_REK,
RESET_STATE_REK_FINISH,
RESET_STATE_INIT = 0xA0,/* IC reset*/
RESET_STATE_REK, /* ReK baseline*/
RESET_STATE_REK_FINISH, /* baseline is ready*/
RESET_STATE_NORMAL_RUN,
RESET_STATE_MAX = 0xAF
} RST_COMPLETE_STATE;
@ -178,8 +163,10 @@ typedef enum {
} MP_TEST_RESULT;
#endif
/*---extern structures---*/
extern struct nvt_ts_data *ts;
/*---extern functions---*/
extern int32_t CTP_I2C_READ(struct i2c_client *client, uint16_t address, uint8_t *buf, uint16_t len);
extern int32_t CTP_I2C_WRITE(struct i2c_client *client, uint16_t address, uint8_t *buf, uint16_t len);
extern void nvt_bootloader_reset(void);
@ -188,9 +175,9 @@ extern int32_t nvt_check_fw_reset_state(RST_COMPLETE_STATE check_reset_state);
extern int32_t nvt_get_fw_info(void);
extern int32_t nvt_clear_fw_status(void);
extern int32_t nvt_check_fw_status(void);
#if NVT_TOUCH_ESD_PROTECT
extern void nvt_esd_check_enable(uint8_t enable);
#endif
#endif /* #if NVT_TOUCH_ESD_PROTECT */
extern void nvt_stop_crc_reboot(void);
#endif /* _LINUX_NVT_TOUCH_H */

View file

@ -60,11 +60,13 @@ void nvt_change_mode(uint8_t mode)
{
uint8_t buf[8] = {0};
/*---set xdata index to EVENT BUF ADDR---*/
buf[0] = 0xFF;
buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
/*---set mode---*/
buf[0] = EVENT_MAP_HOST_CMD;
buf[1] = mode;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 2);
@ -88,15 +90,19 @@ uint8_t nvt_get_fw_pipe(void)
{
uint8_t buf[8] = {0};
/*---set xdata index to EVENT BUF ADDR---*/
buf[0] = 0xFF;
buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
/*---read fw status---*/
buf[0] = EVENT_MAP_HANDSHAKING_or_SUB_CMD_BYTE;
buf[1] = 0x00;
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, 2);
/*NVT_LOG("FW pipe=%d, buf[1]=0x%02X\n", (buf[1]&0x01), buf[1]);*/
return (buf[1] & 0x01);
}
@ -119,6 +125,7 @@ int32_t nvt_read_mass_data(uint8_t i2c_addr, uint8_t *temp_buf, uint32_t count)
int32_t data_len = 0;
int32_t residual_len = 0;
/*---set xdata sector address & length---*/
xdata_addr = (temp_buf[3] << 24) + (temp_buf[4] << 16) + (temp_buf[5] << 8) + temp_buf[6];
head_addr = xdata_addr - (xdata_addr % XDATA_SECTOR_SIZE);
dummy_len = xdata_addr - head_addr;
@ -128,39 +135,61 @@ int32_t nvt_read_mass_data(uint8_t i2c_addr, uint8_t *temp_buf, uint32_t count)
if (data_len > XDATA_BUF_SIZE)
return -EINVAL;
/*NVT_LOG("head_addr=0x%05X, dummy_len=0x%05X, data_len=0x%05X, residual_len=0x%05X\n", head_addr, dummy_len, data_len, residual_len);*/
/*read xdata : step 1*/
for (i = 0; i < ((dummy_len + data_len) / XDATA_SECTOR_SIZE); i++) {
/*---change xdata index---*/
i2c_buf[0] = 0xFF;
i2c_buf[1] = ((head_addr + XDATA_SECTOR_SIZE * i) >> 16) & 0xFF;
i2c_buf[2] = ((head_addr + XDATA_SECTOR_SIZE * i) >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, (uint16_t)i2c_addr, i2c_buf, 3);
/*---read xdata by I2C_TANSFER_LENGTH*/
for (j = 0; j < (XDATA_SECTOR_SIZE / I2C_TANSFER_LENGTH); j++) {
/*---read data---*/
i2c_buf[0] = I2C_TANSFER_LENGTH * j;
CTP_I2C_READ(ts->client, (uint16_t)i2c_addr, i2c_buf, I2C_TANSFER_LENGTH + 1);
/*---copy buf to xdata_tmp---*/
for (k = 0; k < I2C_TANSFER_LENGTH; k++) {
xdata_tmp[XDATA_SECTOR_SIZE * i + I2C_TANSFER_LENGTH * j + k] = i2c_buf[k + 1];
//NVT_LOG("0x%02X, 0x%04X\n", i2c_buf[k+1], (XDATA_SECTOR_SIZE*i + I2C_TANSFER_LENGTH*j + k));
}
}
/*NVT_LOG("addr=0x%05X\n", (head_addr+XDATA_SECTOR_SIZE*i));*/
}
/*read xdata : step2*/
if (residual_len != 0) {
/*---change xdata index---*/
i2c_buf[0] = 0xFF;
i2c_buf[1] = ((xdata_addr + data_len - residual_len) >> 16) & 0xFF;
i2c_buf[2] = ((xdata_addr + data_len - residual_len) >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, (uint16_t)i2c_addr, i2c_buf, 3);
/*---read xdata by I2C_TANSFER_LENGTH*/
for (j = 0; j < (residual_len / I2C_TANSFER_LENGTH + 1); j++) {
/*---read data---*/
i2c_buf[0] = I2C_TANSFER_LENGTH * j;
CTP_I2C_READ(ts->client, (uint16_t)i2c_addr, i2c_buf, I2C_TANSFER_LENGTH + 1);
/*---copy buf to xdata_tmp---*/
for (k = 0; k < I2C_TANSFER_LENGTH; k++) {
xdata_tmp[(dummy_len + data_len - residual_len) + I2C_TANSFER_LENGTH * j + k] = i2c_buf[k + 1];
/*printk("0x%02X, 0x%04x\n", buf[k+1], ((dummy_len+data_len-residual_len) + I2C_TANSFER_LENGTH*j + k));*/
}
}
/*printk("addr=0x%05X\n", (xdata_addr+data_len-residual_len));*/
}
/*---set xdata index to EVENT BUF ADDR---*/
i2c_buf[0] = 0xFF;
i2c_buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
i2c_buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, (uint16_t)i2c_addr, i2c_buf, 3);
/*---remove dummy data and copy to caller buffer---*/
for (i = 0; i < data_len; i++) {
*(temp_buf + i) = xdata_tmp[dummy_len + i];
}
@ -186,61 +215,84 @@ void nvt_read_mdata(uint32_t xdata_addr, uint32_t xdata_btn_addr)
int32_t data_len = 0;
int32_t residual_len = 0;
/*---set xdata sector address & length---*/
head_addr = xdata_addr - (xdata_addr % XDATA_SECTOR_SIZE);
dummy_len = xdata_addr - head_addr;
data_len = ts->x_num * ts->y_num * 2;
residual_len = (head_addr + dummy_len + data_len) % XDATA_SECTOR_SIZE;
/*printk("head_addr=0x%05X, dummy_len=0x%05X, data_len=0x%05X, residual_len=0x%05X\n", head_addr, dummy_len, data_len, residual_len);*/
/*read xdata : step 1*/
for (i = 0; i < ((dummy_len + data_len) / XDATA_SECTOR_SIZE); i++) {
/*---change xdata index---*/
buf[0] = 0xFF;
buf[1] = ((head_addr + XDATA_SECTOR_SIZE * i) >> 16) & 0xFF;
buf[2] = ((head_addr + XDATA_SECTOR_SIZE * i) >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
/*---read xdata by I2C_TANSFER_LENGTH*/
for (j = 0; j < (XDATA_SECTOR_SIZE / I2C_TANSFER_LENGTH); j++) {
/*---read data---*/
buf[0] = I2C_TANSFER_LENGTH * j;
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, I2C_TANSFER_LENGTH + 1);
/*---copy buf to xdata_tmp---*/
for (k = 0; k < I2C_TANSFER_LENGTH; k++) {
xdata_tmp[XDATA_SECTOR_SIZE * i + I2C_TANSFER_LENGTH * j + k] = buf[k + 1];
/*printk("0x%02X, 0x%04X\n", buf[k+1], (XDATA_SECTOR_SIZE*i + I2C_TANSFER_LENGTH*j + k));*/
}
}
/*printk("addr=0x%05X\n", (head_addr+XDATA_SECTOR_SIZE*i));*/
}
/*read xdata : step2*/
if (residual_len != 0) {
/*---change xdata index---*/
buf[0] = 0xFF;
buf[1] = ((xdata_addr + data_len - residual_len) >> 16) & 0xFF;
buf[2] = ((xdata_addr + data_len - residual_len) >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
/*---read xdata by I2C_TANSFER_LENGTH*/
for (j = 0; j < (residual_len / I2C_TANSFER_LENGTH + 1); j++) {
/*---read data---*/
buf[0] = I2C_TANSFER_LENGTH * j;
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, I2C_TANSFER_LENGTH + 1);
/*---copy buf to xdata_tmp---*/
for (k = 0; k < I2C_TANSFER_LENGTH; k++) {
xdata_tmp[(dummy_len + data_len - residual_len) + I2C_TANSFER_LENGTH * j + k] = buf[k + 1];
/*printk("0x%02X, 0x%04x\n", buf[k+1], ((dummy_len+data_len-residual_len) + I2C_TANSFER_LENGTH*j + k));*/
}
}
/*printk("addr=0x%05X\n", (xdata_addr+data_len-residual_len));*/
}
/*---remove dummy data and 2bytes-to-1data---*/
for (i = 0; i < (data_len / 2); i++) {
xdata[i] = (int16_t)(xdata_tmp[dummy_len + i * 2] + 256 * xdata_tmp[dummy_len + i * 2 + 1]);
}
#if TOUCH_KEY_NUM > 0
/*read button xdata : step3*/
/*---change xdata index---*/
buf[0] = 0xFF;
buf[1] = (xdata_btn_addr >> 16) & 0xFF;
buf[2] = ((xdata_btn_addr >> 8) & 0xFF);
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
/*---read data---*/
buf[0] = (xdata_btn_addr & 0xFF);
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, (TOUCH_KEY_NUM * 2 + 1));
/*---2bytes-to-1data---*/
for (i = 0; i < TOUCH_KEY_NUM; i++) {
xdata[ts->x_num * ts->y_num + i] = (int16_t)(buf[1 + i * 2] + 256 * buf[1 + i * 2 + 1]);
}
#endif
/*---set xdata index to EVENT BUF ADDR---*/
buf[0] = 0xFF;
buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;

View file

@ -31,7 +31,7 @@
#define SIZE_64KB 65536
#define BLOCK_64KB_NUM 4
const struct firmware *fw_entry;
const struct firmware *fw_entry = NULL;
/*******************************************************
Description:
@ -56,11 +56,13 @@ int32_t update_firmware_request(char *filename)
return ret;
}
/* check bin file size (116kb)*/
if (fw_entry->size != FW_BIN_SIZE) {
NVT_ERR("bin file size not match. (%zu)\n", fw_entry->size);
return -EINVAL;
}
/* check if FW version add FW version bar equals 0xFF*/
if (*(fw_entry->data + FW_BIN_VER_OFFSET) + *(fw_entry->data + FW_BIN_VER_BAR_OFFSET) != 0xFF) {
NVT_ERR("bin file FW_VER + FW_VER_BAR should be 0xFF!\n");
NVT_ERR("FW_VER=0x%02X, FW_VER_BAR=0x%02X\n", *(fw_entry->data+FW_BIN_VER_OFFSET), *(fw_entry->data+FW_BIN_VER_BAR_OFFSET));
@ -98,6 +100,7 @@ int32_t Check_FW_Ver(void)
uint8_t buf[16] = {0};
int32_t ret = 0;
/*write i2c index to EVENT BUF ADDR*/
buf[0] = 0xFF;
buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;
@ -107,6 +110,7 @@ int32_t Check_FW_Ver(void)
return ret;
}
/*read Firmware Version*/
buf[0] = EVENT_MAP_FWINFO;
buf[1] = 0x00;
buf[2] = 0x00;
@ -120,11 +124,13 @@ int32_t Check_FW_Ver(void)
NVT_LOG("Bin FW Ver = 0x%02X, FW ver Bar = 0x%02X\n",
fw_entry->data[FW_BIN_VER_OFFSET], fw_entry->data[FW_BIN_VER_BAR_OFFSET]);
/* check IC FW_VER + FW_VER_BAR equals 0xFF or not, need to update if not*/
if ((buf[1] + buf[2]) != 0xFF) {
NVT_ERR("IC FW_VER + FW_VER_BAR not equals to 0xFF!\n");
return 0;
}
/* compare IC and binary FW version*/
if (buf[1] == fw_entry->data[FW_BIN_VER_OFFSET])
return 1;
else
@ -144,6 +150,7 @@ int32_t Resume_PD(void)
int32_t ret = 0;
int32_t retry = 0;
/* Resume Command*/
buf[0] = 0x00;
buf[1] = 0xAB;
ret = CTP_I2C_WRITE(ts->client, I2C_HW_Address, buf, 2);
@ -152,6 +159,7 @@ int32_t Resume_PD(void)
return ret;
}
/* Check 0xAA (Resume Command)*/
retry = 0;
while (1) {
msleep(1);
@ -207,6 +215,7 @@ int32_t Check_CheckSum(void)
for (i = 0; i < BLOCK_64KB_NUM; i++) {
if (fw_bin_size > (i * SIZE_64KB)) {
/* Calculate WR_Filechksum of each 64KB block*/
len_in_blk = min(fw_bin_size - i * SIZE_64KB, (size_t)SIZE_64KB);
WR_Filechksum[i] = i + 0x00 + 0x00 + (((len_in_blk - 1) >> 8) & 0xFF) + ((len_in_blk - 1) & 0xFF);
for (k = 0; k < len_in_blk; k++) {
@ -214,6 +223,7 @@ int32_t Check_CheckSum(void)
}
WR_Filechksum[i] = 65535 - WR_Filechksum[i] + 1;
/* Fast Read Command*/
buf[0] = 0x00;
buf[1] = 0x07;
buf[2] = i;
@ -226,6 +236,7 @@ int32_t Check_CheckSum(void)
NVT_ERR("Fast Read Command error!!(%d)\n", ret);
return ret;
}
/* Check 0xAA (Fast Read Command)*/
retry = 0;
while (1) {
msleep(80);
@ -245,6 +256,7 @@ int32_t Check_CheckSum(void)
return -1;
}
}
/* Read Checksum (write addr high byte & middle byte)*/
buf[0] = 0xFF;
buf[1] = XDATA_Addr >> 16;
buf[2] = (XDATA_Addr >> 8) & 0xFF;
@ -253,6 +265,7 @@ int32_t Check_CheckSum(void)
NVT_ERR("Read Checksum (write addr high byte & middle byte) error!!(%d)\n", ret);
return ret;
}
/* Read Checksum*/
buf[0] = (XDATA_Addr) & 0xFF;
buf[1] = 0x00;
buf[2] = 0x00;
@ -289,8 +302,10 @@ int32_t Init_BootLoader(void)
int32_t ret = 0;
int32_t retry = 0;
/* SW Reset & Idle*/
nvt_sw_reset_idle();
/* Initiate Flash Block*/
buf[0] = 0x00;
buf[1] = 0x00;
buf[2] = I2C_FW_Address;
@ -300,6 +315,7 @@ int32_t Init_BootLoader(void)
return ret;
}
/* Check 0xAA (Initiate Flash Block)*/
retry = 0;
while (1) {
msleep(1);
@ -342,6 +358,7 @@ int32_t Erase_Flash(void)
int32_t Flash_Address = 0;
int32_t retry = 0;
/* Write Enable*/
buf[0] = 0x00;
buf[1] = 0x06;
ret = CTP_I2C_WRITE(ts->client, I2C_HW_Address, buf, 2);
@ -349,6 +366,7 @@ int32_t Erase_Flash(void)
NVT_ERR("Write Enable (for Write Status Register) error!!(%d)\n", ret);
return ret;
}
/* Check 0xAA (Write Enable)*/
retry = 0;
while (1) {
mdelay(1);
@ -369,6 +387,7 @@ int32_t Erase_Flash(void)
}
}
/* Write Status Register*/
buf[0] = 0x00;
buf[1] = 0x01;
buf[2] = 0x00;
@ -377,6 +396,7 @@ int32_t Erase_Flash(void)
NVT_ERR("Write Status Register error!!(%d)\n", ret);
return ret;
}
/* Check 0xAA (Write Status Register)*/
retry = 0;
while (1) {
mdelay(1);
@ -397,6 +417,7 @@ int32_t Erase_Flash(void)
}
}
/* Read Status*/
retry = 0;
while (1) {
mdelay(5);
@ -408,6 +429,7 @@ int32_t Erase_Flash(void)
return ret;
}
/* Check 0xAA (Read Status)*/
buf[0] = 0x00;
buf[1] = 0x00;
buf[2] = 0x00;
@ -431,7 +453,8 @@ int32_t Erase_Flash(void)
else
count = fw_entry->size / FLASH_SECTOR_SIZE;
for (i = 0; i < count; i++) {
for(i = 0; i < count; i++) {
/* Write Enable*/
buf[0] = 0x00;
buf[1] = 0x06;
ret = CTP_I2C_WRITE(ts->client, I2C_HW_Address, buf, 2);
@ -439,6 +462,7 @@ int32_t Erase_Flash(void)
NVT_ERR("Write Enable error!!(%d,%d)\n", ret, i);
return ret;
}
/* Check 0xAA (Write Enable)*/
retry = 0;
while (1) {
mdelay(1);
@ -461,8 +485,9 @@ int32_t Erase_Flash(void)
Flash_Address = i * FLASH_SECTOR_SIZE;
/* Sector Erase*/
buf[0] = 0x00;
buf[1] = 0x20;
buf[1] = 0x20; /* Command : Sector Erase*/
buf[2] = ((Flash_Address >> 16) & 0xFF);
buf[3] = ((Flash_Address >> 8) & 0xFF);
buf[4] = (Flash_Address & 0xFF);
@ -471,6 +496,7 @@ int32_t Erase_Flash(void)
NVT_ERR("Sector Erase error!!(%d,%d)\n", ret, i);
return ret;
}
/* Check 0xAA (Sector Erase)*/
retry = 0;
while (1) {
mdelay(1);
@ -491,6 +517,7 @@ int32_t Erase_Flash(void)
}
}
/* Read Status*/
retry = 0;
while (1) {
mdelay(5);
@ -502,6 +529,7 @@ int32_t Erase_Flash(void)
return ret;
}
/* Check 0xAA (Read Status)*/
buf[0] = 0x00;
buf[1] = 0x00;
buf[2] = 0x00;
@ -543,6 +571,7 @@ int32_t Write_Flash(void)
int32_t ret = 0;
int32_t retry = 0;
/* change I2C buffer index*/
buf[0] = 0xFF;
buf[1] = XDATA_Addr >> 16;
buf[2] = (XDATA_Addr >> 8) & 0xFF;
@ -560,6 +589,7 @@ int32_t Write_Flash(void)
for (i = 0; i < count; i++) {
Flash_Address = i * 256;
/* Write Enable*/
buf[0] = 0x00;
buf[1] = 0x06;
ret = CTP_I2C_WRITE(ts->client, I2C_HW_Address, buf, 2);
@ -567,6 +597,7 @@ int32_t Write_Flash(void)
NVT_ERR("Write Enable error!!(%d)\n", ret);
return ret;
}
/* Check 0xAA (Write Enable)*/
retry = 0;
while (1) {
udelay(100);
@ -587,6 +618,7 @@ int32_t Write_Flash(void)
}
}
/* Write Page : 256 bytes*/
for (j = 0; j < min(fw_entry->size - i * 256, (size_t)256); j += 32) {
buf[0] = (XDATA_Addr + j) & 0xFF;
for (k = 0; k < 32; k++) {
@ -608,6 +640,7 @@ int32_t Write_Flash(void)
tmpvalue = 255 - tmpvalue + 1;
/* Page Program*/
buf[0] = 0x00;
buf[1] = 0x02;
buf[2] = ((Flash_Address >> 16) & 0xFF);
@ -621,6 +654,7 @@ int32_t Write_Flash(void)
NVT_ERR("Page Program error!!(%d), i=%d\n", ret, i);
return ret;
}
/* Check 0xAA (Page Program)*/
retry = 0;
while (1) {
mdelay(1);
@ -645,6 +679,7 @@ int32_t Write_Flash(void)
return -3;
}
/* Read Status*/
retry = 0;
while (1) {
mdelay(5);
@ -656,6 +691,7 @@ int32_t Write_Flash(void)
return ret;
}
/* Check 0xAA (Read Status)*/
buf[0] = 0x00;
buf[1] = 0x00;
buf[2] = 0x00;
@ -711,6 +747,7 @@ int32_t Verify_Flash(void)
for (i = 0; i < BLOCK_64KB_NUM; i++) {
if (fw_bin_size > (i * SIZE_64KB)) {
/* Calculate WR_Filechksum of each 64KB block*/
len_in_blk = min(fw_bin_size - i * SIZE_64KB, (size_t)SIZE_64KB);
WR_Filechksum[i] = i + 0x00 + 0x00 + (((len_in_blk - 1) >> 8) & 0xFF) + ((len_in_blk - 1) & 0xFF);
for (k = 0; k < len_in_blk; k++) {
@ -718,6 +755,7 @@ int32_t Verify_Flash(void)
}
WR_Filechksum[i] = 65535 - WR_Filechksum[i] + 1;
/* Fast Read Command*/
buf[0] = 0x00;
buf[1] = 0x07;
buf[2] = i;
@ -730,6 +768,7 @@ int32_t Verify_Flash(void)
NVT_ERR("Fast Read Command error!!(%d)\n", ret);
return ret;
}
/* Check 0xAA (Fast Read Command)*/
retry = 0;
while (1) {
msleep(80);
@ -749,6 +788,7 @@ int32_t Verify_Flash(void)
return -1;
}
}
/* Read Checksum (write addr high byte & middle byte)*/
buf[0] = 0xFF;
buf[1] = XDATA_Addr >> 16;
buf[2] = (XDATA_Addr >> 8) & 0xFF;
@ -757,6 +797,7 @@ int32_t Verify_Flash(void)
NVT_ERR("Read Checksum (write addr high byte & middle byte) error!!(%d)\n", ret);
return ret;
}
/* Read Checksum*/
buf[0] = (XDATA_Addr) & 0xFF;
buf[1] = 0x00;
buf[2] = 0x00;
@ -790,36 +831,143 @@ int32_t Update_Firmware(void)
{
int32_t ret = 0;
/* ---Stop CRC check to prevent IC auto reboot---*/
nvt_stop_crc_reboot();
/* Step 1 : initial bootloader*/
ret = Init_BootLoader();
if (ret) {
return ret;
}
/* Step 2 : Resume PD*/
ret = Resume_PD();
if (ret) {
return ret;
}
/* Step 3 : Erase*/
ret = Erase_Flash();
if (ret) {
return ret;
}
/* Step 4 : Program*/
ret = Write_Flash();
if (ret) {
return ret;
}
/* Step 5 : Verify*/
ret = Verify_Flash();
if (ret) {
return ret;
}
/*Step 6 : Bootloader Reset*/
nvt_bootloader_reset();
nvt_check_fw_reset_state(RESET_STATE_INIT);
return ret;
}
/*******************************************************
Description:
Novatek touchscreen check flash end flag function.
return:
Executive outcomes. 0---succeed. 1,negative---failed.
*******************************************************/
#define NVT_FLASH_END_FLAG_LEN 3
#define NVT_FLASH_END_FLAG_ADDR 0x1AFFD
int32_t nvt_check_flash_end_flag(void)
{
uint8_t buf[8] = {0};
uint8_t nvt_end_flag[NVT_FLASH_END_FLAG_LEN + 1] = {0};
int32_t ret = 0;
/* Step 1 : initial bootloader*/
ret = Init_BootLoader();
if (ret) {
return ret;
}
/* Step 2 : Resume PD*/
ret = Resume_PD();
if (ret) {
return ret;
}
/* Step 3 : unlock*/
buf[0] = 0x00;
buf[1] = 0x35;
ret = CTP_I2C_WRITE(ts->client, I2C_HW_Address, buf, 2);
if (ret < 0) {
NVT_ERR("write unlock error!!(%d)\n", ret);
return ret;
}
msleep(10);
/* Step 4 : Flash Read Command*/
buf[0] = 0x00;
buf[1] = 0x03;
buf[2] = (NVT_FLASH_END_FLAG_ADDR >> 16) & 0xFF; //Addr_H
buf[3] = (NVT_FLASH_END_FLAG_ADDR >> 8) & 0xFF; //Addr_M
buf[4] = NVT_FLASH_END_FLAG_ADDR & 0xFF; //Addr_L
buf[5] = (NVT_FLASH_END_FLAG_LEN >> 8) & 0xFF; //Len_H
buf[6] = NVT_FLASH_END_FLAG_LEN & 0xFF; //Len_L
ret = CTP_I2C_WRITE(ts->client, I2C_HW_Address, buf, 7);
if (ret < 0) {
NVT_ERR("write Read Command error!!(%d)\n", ret);
return ret;
}
msleep(10);
/* Check 0xAA (Read Command)*/
buf[0] = 0x00;
buf[1] = 0x00;
ret = CTP_I2C_READ(ts->client, I2C_HW_Address, buf, 2);
if (ret < 0) {
NVT_ERR("Check 0xAA (Read Command) error!!(%d)\n", ret);
return ret;
}
if (buf[1] != 0xAA) {
NVT_ERR("Check 0xAA (Read Command) error!! status=0x%02X\n", buf[1]);
return -1;
}
msleep(10);
/* Step 5 : Read Flash Data*/
buf[0] = 0xFF;
buf[1] = (ts->mmap->READ_FLASH_CHECKSUM_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->READ_FLASH_CHECKSUM_ADDR >> 8) & 0xFF;
ret = CTP_I2C_WRITE(ts->client, I2C_BLDR_Address, buf, 3);
if (ret < 0) {
NVT_ERR("change index error!! (%d)\n", ret);
return ret;
}
msleep(10);
/* Read Back*/
buf[0] = ts->mmap->READ_FLASH_CHECKSUM_ADDR & 0xFF;
ret = CTP_I2C_READ(ts->client, I2C_BLDR_Address, buf, 6);
if (ret < 0) {
NVT_ERR("Read Back error!! (%d)\n", ret);
return ret;
}
/* buf[3:5] => NVT End Flag*/
strncpy(nvt_end_flag, &buf[3], NVT_FLASH_END_FLAG_LEN);
NVT_LOG("nvt_end_flag=%s (%02X %02X %02X)\n", nvt_end_flag, buf[3], buf[4], buf[5]);
if (strncmp(nvt_end_flag, "NVT", 3) == 0) {
return 0;
} else {
NVT_ERR("\"NVT\" end flag not found!\n");
return 1;
}
}
#endif
#if BOOT_UPDATE_FIRMWARE
@ -838,6 +986,7 @@ void Boot_Update_Firmware(struct work_struct *work)
char firmware_name[256] = "";
sprintf(firmware_name, BOOT_UPDATE_FIRMWARE_NAME);
/* request bin file in "/etc/firmware"*/
ret = update_firmware_request(firmware_name);
if (ret) {
NVT_ERR("update_firmware_request failed. (%d)\n", ret);
@ -855,17 +1004,26 @@ void Boot_Update_Firmware(struct work_struct *work)
ret = Check_CheckSum();
if (ret < 0) {
if (ret < 0) { /* read firmware checksum failed*/
NVT_ERR("read firmware checksum failed\n");
Update_Firmware();
} else if ((ret == 0) && (Check_FW_Ver() == 0)) {
} else if ((ret == 0) && (Check_FW_Ver() == 0)) { /* (fw checksum not match) && (bin fw version >= ic fw version)*/
NVT_LOG("firmware version not match\n");
Update_Firmware();
} else if (nvt_check_flash_end_flag()) {
NVT_LOG("check flash end flag failed\n");
Update_Firmware();
} else {
/* Bootloader Reset*/
nvt_bootloader_reset();
nvt_check_fw_reset_state(RESET_STATE_INIT);
ret = nvt_check_fw_reset_state(RESET_STATE_INIT);
if (ret) {
NVT_LOG("check fw reset state failed\n");
Update_Firmware();
}
}
#if NVT_TOUCH_FW
ts->loading_fw = 0;
#endif
@ -894,8 +1052,8 @@ static DEVICE_ATTR(poweron, 0444, nvt_poweron_show, NULL);
static ssize_t nvt_ic_ver_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
return scnprintf(buf, PAGE_SIZE, "[FW]%02x,[IC]NT36525\n",
ts->fw_ver);
return scnprintf(buf, PAGE_SIZE, "[FW]%02x,[IC]%s\n",
ts->fw_ver, ts->product_id);
}
static DEVICE_ATTR(ic_ver, 0444, nvt_ic_ver_show, NULL);
@ -1004,10 +1162,17 @@ static ssize_t nvt_do_reflash_store(struct device *dev,
} else if ((retval == 0) && (Check_FW_Ver() == 0)) {
NVT_LOG("firmware version not match\n");
Update_Firmware();
} else if (nvt_check_flash_end_flag()) {
NVT_LOG("check flash end flag failed\n");
Update_Firmware();
} else {
/* Bootloader Reset */
nvt_bootloader_reset();
nvt_check_fw_reset_state(RESET_STATE_INIT);
retval = nvt_check_fw_reset_state(RESET_STATE_INIT);
if (retval) {
NVT_LOG("check fw reset state failed\n");
Update_Firmware();
}
}
ts->loading_fw = 0;

View file

@ -0,0 +1,218 @@
/*
* Copyright (C) 2010 - 2017 Novatek, Inc.
*
* $Revision: 26970 $
* $Date: 2018-04-25 09:34:01 +0800 (週三, 25 四月 2018) $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*/
struct nvt_ts_mem_map {
uint32_t EVENT_BUF_ADDR;
uint32_t RAW_PIPE0_ADDR;
uint32_t RAW_PIPE0_Q_ADDR;
uint32_t RAW_PIPE1_ADDR;
uint32_t RAW_PIPE1_Q_ADDR;
uint32_t BASELINE_ADDR;
uint32_t BASELINE_Q_ADDR;
uint32_t BASELINE_BTN_ADDR;
uint32_t BASELINE_BTN_Q_ADDR;
uint32_t DIFF_PIPE0_ADDR;
uint32_t DIFF_PIPE0_Q_ADDR;
uint32_t DIFF_PIPE1_ADDR;
uint32_t DIFF_PIPE1_Q_ADDR;
uint32_t RAW_BTN_PIPE0_ADDR;
uint32_t RAW_BTN_PIPE0_Q_ADDR;
uint32_t RAW_BTN_PIPE1_ADDR;
uint32_t RAW_BTN_PIPE1_Q_ADDR;
uint32_t DIFF_BTN_PIPE0_ADDR;
uint32_t DIFF_BTN_PIPE0_Q_ADDR;
uint32_t DIFF_BTN_PIPE1_ADDR;
uint32_t DIFF_BTN_PIPE1_Q_ADDR;
uint32_t READ_FLASH_CHECKSUM_ADDR;
uint32_t RW_FLASH_DATA_ADDR;
};
static const struct nvt_ts_mem_map NT36672A_memory_map = {
.EVENT_BUF_ADDR = 0x21C00,
.RAW_PIPE0_ADDR = 0x20000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x23000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x20BFC,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x23BFC,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x206DC,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x236DC,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x20510,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x23510,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x20BF0,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x23BF0,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x24000,
.RW_FLASH_DATA_ADDR = 0x24002,
};
static const struct nvt_ts_mem_map NT36772_memory_map = {
.EVENT_BUF_ADDR = 0x11E00,
.RAW_PIPE0_ADDR = 0x10000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x12000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x10E70,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x12E70,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x10830,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x12830,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x10E60,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x12E60,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x10E68,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x12E68,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x14000,
.RW_FLASH_DATA_ADDR = 0x14002,
};
static const struct nvt_ts_mem_map NT36525_memory_map = {
.EVENT_BUF_ADDR = 0x11A00,
.RAW_PIPE0_ADDR = 0x10000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x12000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x10B08,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x12B08,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x1064C,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x1264C,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x10634,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x12634,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x10AFC,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x12AFC,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x14000,
.RW_FLASH_DATA_ADDR = 0x14002,
};
static const struct nvt_ts_mem_map NT36870_memory_map = {
.EVENT_BUF_ADDR = 0x25000,
.RAW_PIPE0_ADDR = 0x20000,
.RAW_PIPE0_Q_ADDR = 0x204C8,
.RAW_PIPE1_ADDR = 0x23000,
.RAW_PIPE1_Q_ADDR = 0x234C8,
.BASELINE_ADDR = 0x21350,
.BASELINE_Q_ADDR = 0x21818,
.BASELINE_BTN_ADDR = 0x24350,
.BASELINE_BTN_Q_ADDR = 0x24358,
.DIFF_PIPE0_ADDR = 0x209B0,
.DIFF_PIPE0_Q_ADDR = 0x20E78,
.DIFF_PIPE1_ADDR = 0x239B0,
.DIFF_PIPE1_Q_ADDR = 0x23E78,
.RAW_BTN_PIPE0_ADDR = 0x20990,
.RAW_BTN_PIPE0_Q_ADDR = 0x20998,
.RAW_BTN_PIPE1_ADDR = 0x23990,
.RAW_BTN_PIPE1_Q_ADDR = 0x23998,
.DIFF_BTN_PIPE0_ADDR = 0x21340,
.DIFF_BTN_PIPE0_Q_ADDR = 0x21348,
.DIFF_BTN_PIPE1_ADDR = 0x24340,
.DIFF_BTN_PIPE1_Q_ADDR = 0x24348,
.READ_FLASH_CHECKSUM_ADDR = 0x24000,
.RW_FLASH_DATA_ADDR = 0x24002,
};
static const struct nvt_ts_mem_map NT36676F_memory_map = {
.EVENT_BUF_ADDR = 0x11A00,
.RAW_PIPE0_ADDR = 0x10000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x12000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x10B08,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x12B08,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x1064C,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x1264C,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x10634,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x12634,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x10AFC,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x12AFC,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x14000,
.RW_FLASH_DATA_ADDR = 0x14002,
};
#define NVT_ID_BYTE_MAX 6
struct nvt_ts_trim_id_table {
uint8_t id[NVT_ID_BYTE_MAX];
uint8_t mask[NVT_ID_BYTE_MAX];
const struct nvt_ts_mem_map *mmap;
uint8_t carrier_system;
};
static const struct nvt_ts_trim_id_table trim_id_table[] = {
{.id = {0x0A, 0xFF, 0xFF, 0x72, 0x65, 0x03}, .mask = {1, 0, 0, 1, 1, 1},
.mmap = &NT36672A_memory_map, .carrier_system = 0},
{.id = {0x0A, 0xFF, 0xFF, 0x72, 0x66, 0x03}, .mask = {1, 0, 0, 1, 1, 1},
.mmap = &NT36672A_memory_map, .carrier_system = 0},
{.id = {0x0A, 0xFF, 0xFF, 0x82, 0x66, 0x03}, .mask = {1, 0, 0, 1, 1, 1},
.mmap = &NT36672A_memory_map, .carrier_system = 0},
{.id = {0x0A, 0xFF, 0xFF, 0x70, 0x66, 0x03}, .mask = {1, 0, 0, 1, 1, 1},
.mmap = &NT36672A_memory_map, .carrier_system = 0},
{.id = {0x0B, 0xFF, 0xFF, 0x70, 0x66, 0x03}, .mask = {1, 0, 0, 1, 1, 1},
.mmap = &NT36672A_memory_map, .carrier_system = 0},
{.id = {0x0A, 0xFF, 0xFF, 0x72, 0x67, 0x03}, .mask = {1, 0, 0, 1, 1, 1},
.mmap = &NT36672A_memory_map, .carrier_system = 0},
{.id = {0x55, 0x00, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0x55, 0x72, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xAA, 0x00, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xAA, 0x72, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x72, 0x67, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x70, 0x66, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x70, 0x67, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x72, 0x66, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x25, 0x65, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36525_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x70, 0x68, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36870_memory_map, .carrier_system = 1},
{.id = {0xFF, 0xFF, 0xFF, 0x76, 0x66, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36676F_memory_map, .carrier_system = 0}
};

File diff suppressed because it is too large Load diff

View file

@ -19,199 +19,772 @@
#if NVT_TOUCH_MP
static uint32_t IC_X_CFG_SIZE = 18;
static uint32_t IC_Y_CFG_SIZE = 32;
static uint32_t IC_Y_CFG_SIZE = 36;
static uint32_t IC_KEY_CFG_SIZE = 4;
static uint32_t X_Channel = 18;
static uint32_t Y_Channel = 32;
static uint32_t Y_Channel = 36;
static uint32_t Key_Channel = TOUCH_KEY_NUM;
static uint8_t AIN_X[40] = {17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
static uint8_t AIN_Y[40] = {31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
static uint8_t AIN_X[40] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
static uint8_t AIN_Y[40] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35};
#if TOUCH_KEY_NUM > 0
static uint8_t AIN_KEY[8] = {0, 1, 2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
#endif /* #if TOUCH_KEY_NUM > 0 */
static int32_t PS_Config_Lmt_Short_Rawdata_P = 13500;
static int32_t PS_Config_Lmt_Short_Rawdata_N = 11500;
static int32_t PS_Config_Lmt_Key_Short_Rawdata_P = 20000;
static int32_t PS_Config_Lmt_Key_Short_Rawdata_N = 11550;
static int32_t PS_Config_Lmt_Short_Diff_P = 6300;
static int32_t PS_Config_Lmt_Short_Diff_N;
static int32_t PS_Config_Lmt_Key_Short_Diff_P = 6300;
static int32_t PS_Config_Lmt_Key_Short_Diff_N;
static int32_t PS_Config_Lmt_Short_Base_P = 2000;
static int32_t PS_Config_Lmt_Short_Base_N = -2000;
static int32_t PS_Config_Lmt_Key_Short_Base_P = 2000;
static int32_t PS_Config_Lmt_Key_Short_Base_N = -2000;
static int32_t PS_Config_Lmt_Short_Rawdata_P[40 * 40] = {
65535, 14008, 14008, 14008, 14008, 14008, 65535, 65535, 65535, 65535, 65535, 65535, 14008, 14008, 14008, 14008, 14008, 65535,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008, 14008,
#if TOUCH_KEY_NUM > 0
20000, 20000, 20000,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Short_Rawdata_N[40 * 40] = {
-65535, 11376, 11376, 11376, 11376, 11376, -65535, -65535, -65535, -65535, -65535, -65535, 11376, 11376, 11376, 11376, 11376, -65535,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376, 11376,
#if TOUCH_KEY_NUM > 0
11550, 11550, 11550,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Short_Diff_P[40 * 40] = {
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300, 6300,
#if TOUCH_KEY_NUM > 0
6300, 6300, 6300,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Short_Diff_N[40 * 40] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
#if TOUCH_KEY_NUM > 0
0, 0, 0,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Short_Base_P[40 * 40] = {
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000,
#if TOUCH_KEY_NUM > 0
2000, 2000, 2000,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Short_Base_N[40 * 40] = {
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
-2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000, -2000,
#if TOUCH_KEY_NUM > 0
-2000, -2000, -2000,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Open_Rawdata_P[40 * 40] = {
5149, 5167, 5201, 5164, 5204, 5167, 5201, 5177, 5233, 5217, 5168, 5193, 5161, 5187, 5161, 5190, 5154, 5145,
4926, 4937, 4968, 4929, 4970, 4933, 4967, 4942, 4998, 4986, 4936, 4964, 4933, 4962, 4933, 4965, 4927, 4929,
4901, 4907, 4937, 4898, 4936, 4901, 4934, 4908, 4965, 4959, 4910, 4936, 4905, 4936, 4905, 4936, 4902, 4904,
4865, 4868, 4901, 4862, 4898, 4865, 4896, 4871, 4927, 4901, 4852, 4877, 4848, 4877, 4846, 4876, 4845, 4842,
4860, 4865, 4895, 4858, 4892, 4861, 4892, 4867, 4921, 4911, 4864, 4887, 4860, 4889, 4858, 4886, 4855, 4852,
4862, 4870, 4898, 4862, 4895, 4865, 4895, 4873, 4924, 4905, 4860, 4882, 4855, 4882, 4854, 4880, 4852, 4845,
4860, 4867, 4893, 4861, 4890, 4864, 4889, 4868, 4920, 4904, 4861, 4880, 4855, 4880, 4855, 4879, 4852, 4842,
4858, 4867, 4890, 4861, 4887, 4862, 4887, 4868, 4917, 4902, 4861, 4877, 4855, 4879, 4854, 4876, 4854, 4839,
4854, 4864, 4885, 4858, 4882, 4860, 4880, 4864, 4910, 4905, 4865, 4879, 4858, 4880, 4858, 4877, 4858, 4842,
4867, 4877, 4895, 4871, 4893, 4873, 4892, 4877, 4923, 4907, 4867, 4879, 4861, 4879, 4860, 4877, 4861, 4840,
4858, 4870, 4887, 4862, 4885, 4865, 4883, 4870, 4914, 4899, 4861, 4871, 4855, 4873, 4854, 4870, 4855, 4835,
4857, 4867, 4885, 4861, 4882, 4864, 4882, 4867, 4911, 4902, 4864, 4874, 4857, 4877, 4855, 4873, 4858, 4837,
4858, 4870, 4886, 4864, 4885, 4865, 4883, 4870, 4914, 4896, 4860, 4870, 4854, 4871, 4851, 4867, 4854, 4832,
4855, 4867, 4883, 4862, 4880, 4862, 4880, 4867, 4911, 4902, 4864, 4874, 4858, 4876, 4857, 4871, 4858, 4836,
4855, 4867, 4883, 4861, 4880, 4864, 4880, 4867, 4911, 4892, 4855, 4864, 4848, 4867, 4848, 4862, 4851, 4826,
4852, 4864, 4882, 4860, 4879, 4861, 4877, 4864, 4907, 4895, 4858, 4867, 4852, 4870, 4851, 4865, 4854, 4829,
4846, 4864, 4883, 4861, 4879, 4861, 4879, 4864, 4908, 4885, 4854, 4864, 4849, 4865, 4848, 4864, 4851, 4827,
4843, 4858, 4877, 4855, 4871, 4855, 4871, 4858, 4901, 4895, 4862, 4871, 4858, 4874, 4855, 4873, 4861, 4835,
4849, 4862, 4882, 4860, 4876, 4860, 4877, 4862, 4907, 4885, 4851, 4860, 4846, 4862, 4843, 4861, 4851, 4824,
4836, 4849, 4868, 4848, 4864, 4848, 4864, 4852, 4895, 4883, 4851, 4858, 4846, 4862, 4843, 4861, 4849, 4823,
4839, 4852, 4870, 4849, 4865, 4851, 4865, 4852, 4895, 4880, 4848, 4855, 4843, 4860, 4840, 4858, 4848, 4820,
4840, 4854, 4871, 4851, 4865, 4851, 4867, 4854, 4896, 4877, 4846, 4854, 4840, 4857, 4839, 4857, 4846, 4818,
4826, 4839, 4857, 4836, 4851, 4836, 4852, 4839, 4882, 4871, 4840, 4848, 4836, 4852, 4833, 4851, 4842, 4812,
4830, 4845, 4862, 4843, 4857, 4842, 4857, 4845, 4887, 4864, 4835, 4842, 4830, 4845, 4827, 4845, 4836, 4807,
4827, 4842, 4860, 4839, 4852, 4839, 4854, 4842, 4885, 4862, 4832, 4839, 4827, 4842, 4824, 4842, 4835, 4804,
4821, 4836, 4852, 4833, 4846, 4833, 4848, 4836, 4879, 4864, 4835, 4842, 4829, 4843, 4827, 4845, 4837, 4808,
4821, 4837, 4855, 4835, 4848, 4833, 4848, 4836, 4879, 4858, 4830, 4837, 4826, 4840, 4824, 4842, 4836, 4804,
4818, 4833, 4852, 4830, 4845, 4830, 4846, 4833, 4876, 4855, 4826, 4835, 4821, 4837, 4820, 4839, 4830, 4799,
4818, 4835, 4854, 4832, 4849, 4830, 4849, 4833, 4880, 4862, 4832, 4843, 4827, 4846, 4826, 4848, 4837, 4805,
4870, 4882, 4904, 4879, 4898, 4877, 4899, 4882, 4930, 4912, 4879, 4893, 4874, 4896, 4874, 4898, 4885, 4857,
4854, 4860, 4876, 4851, 4868, 4849, 4870, 4857, 4904, 4876, 4845, 4855, 4839, 4857, 4837, 4861, 4855, 4833,
4995, 4993, 4986, 4967, 4964, 4964, 4976, 4974, 5017, 4996, 4971, 4967, 4958, 4968, 4961, 4982, 5002, 4989,
65535, 5073, 5699, 4902, 4158, 3372, 65535, 65535, 65535, 65535, 65535, 65535, 3252, 4097, 4856, 5603, 5211, 65535,
2067, 1988, 1973, 1943, 1928, 1889, 1887, 1788, 1748, 1742, 1779, 1871, 1892, 1923, 1944, 1986, 2018, 2258,
1811, 1848, 1842, 1826, 1820, 1797, 1850, 1874, 1835, 1874, 1908, 1886, 1836, 1859, 1875, 1905, 1920, 1967,
1838, 1869, 1863, 1844, 1844, 1824, 1875, 1898, 1860, 1826, 1863, 1844, 1797, 1812, 1827, 1854, 1869, 1889,
1803, 1833, 1829, 1818, 1814, 1793, 1847, 1865, 1826, 1809, 1844, 1827, 1778, 1799, 1811, 1835, 1845, 1866,
1844, 1866, 1854, 1845, 1836, 1821, 1874, 1890, 1856, 1826, 1862, 1853, 1788, 1814, 1826, 1848, 1865, 1890,
1829, 1851, 1838, 1826, 1820, 1805, 1859, 1872, 1838, 1872, 1904, 1898, 1841, 1863, 1874, 1895, 1914, 1947,
1821, 1832, 1826, 1824, 1817, 1800, 1853, 1871, 1833, 1830, 1865, 1865, 1802, 1820, 1841, 1857, 1866, 1899,
1824, 1833, 1833, 1827, 1821, 1800, 1863, 1874, 1833, 1829, 1856, 1859, 1799, 1814, 1826, 1848, 1854, 1896,
1803, 1809, 1806, 1805, 1796, 1770, 1842, 1848, 1806, 1817, 1847, 1847, 1785, 1805, 1818, 1836, 1848, 1887,
1818, 1829, 1820, 1817, 1812, 1790, 1862, 1862, 1823, 1802, 1832, 1830, 1770, 1793, 1802, 1823, 1824, 1871,
1805, 1814, 1800, 1800, 1793, 1776, 1844, 1844, 1805, 1796, 1818, 1821, 1755, 1778, 1793, 1809, 1823, 1865,
1805, 1812, 1802, 1793, 1788, 1772, 1844, 1844, 1797, 1805, 1829, 1829, 1755, 1776, 1791, 1809, 1820, 1865,
1790, 1802, 1793, 1791, 1785, 1766, 1836, 1838, 1791, 1769, 1793, 1802, 1730, 1746, 1758, 1770, 1790, 1824,
1763, 1790, 1766, 1755, 1752, 1736, 1806, 1806, 1760, 1770, 1769, 1793, 1721, 1733, 1745, 1763, 1809, 1811,
1757, 1809, 1751, 1748, 1742, 1731, 1800, 1796, 1751, 1737, 1754, 1770, 1695, 1713, 1730, 1742, 1800, 1784,
1749, 1802, 1746, 1740, 1736, 1721, 1796, 1802, 1742, 1748, 1776, 1781, 1707, 1721, 1736, 1748, 1809, 1793,
1746, 1797, 1740, 1737, 1730, 1715, 1794, 1782, 1737, 1703, 1716, 1737, 1665, 1679, 1698, 1706, 1761, 1755,
1713, 1760, 1710, 1691, 1677, 1656, 1731, 1716, 1667, 1715, 1725, 1743, 1661, 1674, 1686, 1731, 1752, 1749,
1688, 1734, 1725, 1673, 1659, 1637, 1719, 1697, 1662, 1698, 1704, 1725, 1644, 1661, 1673, 1730, 1734, 1725,
1695, 1736, 1727, 1677, 1665, 1643, 1722, 1697, 1670, 1685, 1689, 1718, 1628, 1643, 1656, 1710, 1725, 1715,
1677, 1710, 1704, 1653, 1644, 1625, 1704, 1674, 1640, 1664, 1659, 1697, 1613, 1623, 1635, 1695, 1697, 1691,
1671, 1706, 1701, 1643, 1632, 1614, 1694, 1668, 1626, 1664, 1667, 1701, 1611, 1623, 1641, 1689, 1698, 1692,
1640, 1668, 1656, 1616, 1595, 1578, 1658, 1634, 1589, 1653, 1655, 1694, 1601, 1617, 1664, 1683, 1688, 1682,
1623, 1650, 1643, 1631, 1575, 1559, 1641, 1617, 1566, 1619, 1628, 1670, 1571, 1584, 1641, 1650, 1653, 1656,
1625, 1647, 1641, 1634, 1578, 1557, 1646, 1620, 1566, 1586, 1610, 1638, 1551, 1563, 1620, 1626, 1626, 1629,
1605, 1629, 1628, 1619, 1560, 1542, 1628, 1607, 1542, 1584, 1613, 1640, 1556, 1563, 1622, 1628, 1628, 1631,
1611, 1631, 1625, 1611, 1566, 1535, 1623, 1607, 1539, 1548, 1589, 1614, 1524, 1577, 1602, 1611, 1610, 1607,
1563, 1596, 1584, 1578, 1568, 1497, 1592, 1547, 1494, 1487, 1532, 1565, 1466, 1535, 1544, 1551, 1553, 1548,
1568, 1593, 1587, 1578, 1568, 1497, 1592, 1551, 1494, 1502, 1550, 1587, 1487, 1556, 1565, 1571, 1571, 1571,
1542, 1563, 1554, 1551, 1538, 1469, 1565, 1526, 1473, 1487, 1529, 1569, 1466, 1535, 1544, 1550, 1559, 1548,
1526, 1551, 1547, 1535, 1526, 1455, 1551, 1511, 1455, 1446, 1488, 1529, 1430, 1497, 1508, 1512, 1515, 1508,
1521, 1550, 1542, 1533, 1524, 1451, 1547, 1508, 1448, 1422, 1458, 1500, 1400, 1470, 1478, 1487, 1487, 1481,
1491, 1511, 1505, 1497, 1485, 1409, 1511, 1469, 1415, 1401, 1437, 1475, 1383, 1454, 1461, 1467, 1475, 1466,
1497, 1518, 1503, 1494, 1484, 1406, 1508, 1461, 1404, 1424, 1469, 1512, 1413, 1484, 1493, 1500, 1512, 1514,
1800, 1806, 1758, 1733, 1709, 1620, 1721, 1680, 1620, 1599, 1643, 1683, 1586, 1661, 1688, 1718, 1754, 1710,
#if TOUCH_KEY_NUM > 0
13000, 13000, 13000,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Open_Rawdata_N[40 * 40] = {
3821, 3827, 3839, 3826, 3841, 3827, 3839, 3831, 3851, 3845, 3828, 3837, 3825, 3835, 3825, 3836, 3822, 3819,
3740, 3745, 3756, 3741, 3756, 3743, 3755, 3746, 3766, 3762, 3744, 3754, 3743, 3754, 3743, 3755, 3741, 3741,
3731, 3733, 3745, 3730, 3744, 3731, 3744, 3734, 3755, 3753, 3735, 3744, 3733, 3744, 3733, 3744, 3732, 3732,
3719, 3720, 3731, 3718, 3730, 3719, 3730, 3721, 3741, 3731, 3714, 3723, 3712, 3723, 3712, 3722, 3711, 3710,
3716, 3719, 3729, 3716, 3728, 3717, 3728, 3719, 3739, 3735, 3718, 3727, 3716, 3727, 3716, 3726, 3715, 3714,
3718, 3720, 3730, 3718, 3729, 3719, 3729, 3721, 3740, 3733, 3716, 3724, 3715, 3724, 3714, 3724, 3714, 3711,
3716, 3719, 3729, 3717, 3728, 3718, 3727, 3720, 3738, 3732, 3717, 3724, 3715, 3724, 3715, 3723, 3714, 3710,
3716, 3719, 3728, 3717, 3727, 3718, 3727, 3720, 3737, 3732, 3717, 3723, 3715, 3723, 3714, 3722, 3714, 3709,
3714, 3718, 3725, 3716, 3724, 3716, 3724, 3718, 3735, 3733, 3719, 3723, 3716, 3724, 3716, 3723, 3716, 3710,
3719, 3723, 3729, 3721, 3729, 3721, 3728, 3723, 3739, 3733, 3719, 3723, 3717, 3723, 3716, 3723, 3717, 3710,
3716, 3720, 3727, 3718, 3725, 3719, 3725, 3720, 3736, 3731, 3717, 3721, 3715, 3721, 3714, 3720, 3715, 3707,
3715, 3719, 3725, 3717, 3724, 3718, 3724, 3719, 3735, 3732, 3718, 3722, 3715, 3723, 3715, 3721, 3716, 3709,
3716, 3720, 3726, 3718, 3725, 3719, 3725, 3720, 3736, 3730, 3716, 3720, 3714, 3721, 3713, 3719, 3714, 3706,
3715, 3719, 3725, 3718, 3724, 3718, 3724, 3719, 3735, 3732, 3718, 3722, 3716, 3722, 3715, 3721, 3716, 3708,
3715, 3719, 3725, 3717, 3724, 3718, 3724, 3719, 3735, 3728, 3715, 3718, 3712, 3719, 3712, 3718, 3713, 3704,
3714, 3718, 3724, 3716, 3723, 3717, 3723, 3718, 3733, 3729, 3716, 3719, 3714, 3720, 3713, 3719, 3714, 3705,
3712, 3718, 3725, 3717, 3723, 3717, 3723, 3718, 3734, 3725, 3714, 3718, 3713, 3719, 3712, 3718, 3713, 3705,
3711, 3716, 3723, 3715, 3721, 3715, 3721, 3716, 3731, 3729, 3718, 3721, 3716, 3722, 3715, 3721, 3717, 3707,
3713, 3718, 3724, 3716, 3722, 3716, 3723, 3718, 3733, 3725, 3713, 3716, 3712, 3718, 3711, 3717, 3713, 3704,
3708, 3713, 3720, 3712, 3718, 3712, 3718, 3714, 3729, 3725, 3713, 3716, 3712, 3718, 3711, 3717, 3713, 3703,
3709, 3714, 3720, 3713, 3719, 3713, 3719, 3714, 3729, 3724, 3712, 3715, 3711, 3716, 3710, 3716, 3712, 3702,
3710, 3714, 3721, 3713, 3719, 3713, 3719, 3714, 3730, 3723, 3712, 3714, 3710, 3715, 3709, 3715, 3712, 3702,
3704, 3709, 3715, 3708, 3713, 3708, 3714, 3709, 3724, 3721, 3710, 3712, 3708, 3714, 3707, 3713, 3710, 3700,
3706, 3711, 3718, 3711, 3715, 3710, 3715, 3711, 3727, 3718, 3707, 3710, 3706, 3711, 3705, 3711, 3708, 3697,
3705, 3710, 3716, 3709, 3714, 3709, 3714, 3710, 3725, 3718, 3706, 3709, 3705, 3710, 3704, 3710, 3707, 3696,
3703, 3708, 3714, 3707, 3712, 3707, 3712, 3708, 3723, 3718, 3707, 3710, 3705, 3711, 3705, 3711, 3709, 3698,
3703, 3709, 3715, 3707, 3712, 3707, 3712, 3708, 3723, 3716, 3706, 3709, 3704, 3710, 3704, 3710, 3708, 3696,
3702, 3707, 3714, 3706, 3711, 3706, 3712, 3707, 3722, 3715, 3704, 3707, 3703, 3709, 3702, 3709, 3706, 3695,
3702, 3707, 3714, 3706, 3713, 3706, 3713, 3707, 3724, 3718, 3706, 3711, 3705, 3712, 3704, 3712, 3709, 3697,
3720, 3724, 3732, 3723, 3730, 3723, 3731, 3724, 3742, 3736, 3723, 3729, 3722, 3730, 3722, 3730, 3725, 3715,
3714, 3716, 3722, 3713, 3720, 3713, 3720, 3715, 3732, 3722, 3711, 3715, 3709, 3715, 3709, 3717, 3715, 3707,
3765, 3765, 3762, 3755, 3754, 3754, 3758, 3758, 3773, 3766, 3757, 3755, 3752, 3756, 3753, 3760, 3768, 3763,
-65535, 1691, 1900, 1634, 1386, 1124, -65535, -65535, -65535, -65535, -65535, -65535, 1084, 1366, 1619, 1868, 1737, -65535,
689, 663, 658, 648, 643, 630, 629, 596, 583, 581, 593, 624, 631, 641, 648, 662, 673, 753,
604, 616, 614, 609, 607, 599, 617, 625, 612, 625, 636, 629, 612, 620, 625, 635, 640, 656,
613, 623, 621, 615, 615, 608, 625, 633, 620, 609, 621, 615, 599, 604, 609, 618, 623, 630,
601, 611, 610, 606, 605, 598, 616, 622, 609, 603, 615, 609, 593, 600, 604, 612, 615, 622,
615, 622, 618, 615, 612, 607, 625, 630, 619, 609, 621, 618, 596, 605, 609, 616, 622, 630,
610, 617, 613, 609, 607, 602, 620, 624, 613, 624, 635, 633, 614, 621, 625, 632, 638, 649,
607, 611, 609, 608, 606, 600, 618, 624, 611, 610, 622, 622, 601, 607, 614, 619, 622, 633,
608, 611, 611, 609, 607, 600, 621, 625, 611, 610, 619, 620, 600, 605, 609, 616, 618, 632,
601, 603, 602, 602, 599, 590, 614, 616, 602, 606, 616, 616, 595, 602, 606, 612, 616, 629,
606, 610, 607, 606, 604, 597, 621, 621, 608, 601, 611, 610, 590, 598, 601, 608, 608, 624,
602, 605, 600, 600, 598, 592, 615, 615, 602, 599, 606, 607, 585, 593, 598, 603, 608, 622,
602, 604, 601, 598, 596, 591, 615, 615, 599, 602, 610, 610, 585, 592, 597, 603, 607, 622,
597, 601, 598, 597, 595, 589, 612, 613, 597, 590, 598, 601, 577, 582, 586, 590, 597, 608,
588, 597, 589, 585, 584, 579, 602, 602, 587, 590, 590, 598, 574, 578, 582, 588, 603, 604,
586, 603, 584, 583, 581, 577, 600, 599, 584, 579, 585, 590, 565, 571, 577, 581, 600, 595,
583, 601, 582, 580, 579, 574, 599, 601, 581, 583, 592, 594, 569, 574, 579, 583, 603, 598,
582, 599, 580, 579, 577, 572, 598, 594, 579, 568, 572, 579, 555, 560, 566, 569, 587, 585,
571, 587, 570, 564, 559, 552, 577, 572, 556, 572, 575, 581, 554, 558, 562, 577, 584, 583,
563, 578, 575, 558, 553, 546, 573, 566, 554, 566, 568, 575, 548, 554, 558, 577, 578, 575,
565, 579, 576, 559, 555, 548, 574, 566, 557, 562, 563, 573, 543, 548, 552, 570, 575, 572,
559, 570, 568, 551, 548, 542, 568, 558, 547, 555, 553, 566, 538, 541, 545, 565, 566, 564,
557, 569, 567, 548, 544, 538, 565, 556, 542, 555, 556, 567, 537, 541, 547, 563, 566, 564,
547, 556, 552, 539, 532, 526, 553, 545, 530, 551, 552, 565, 534, 539, 555, 561, 563, 561,
541, 550, 548, 544, 525, 520, 547, 539, 522, 540, 543, 557, 524, 528, 547, 550, 551, 552,
542, 549, 547, 545, 526, 519, 549, 540, 522, 529, 537, 546, 517, 521, 540, 542, 542, 543,
535, 543, 543, 540, 520, 514, 543, 536, 514, 528, 538, 547, 519, 521, 541, 543, 543, 544,
537, 544, 542, 537, 522, 512, 541, 536, 513, 516, 530, 538, 508, 526, 534, 537, 537, 536,
521, 532, 528, 526, 523, 499, 531, 516, 498, 496, 511, 522, 489, 512, 515, 517, 518, 516,
523, 531, 529, 526, 523, 499, 531, 517, 498, 501, 517, 529, 496, 519, 522, 524, 524, 524,
514, 521, 518, 517, 513, 490, 522, 509, 491, 496, 510, 523, 489, 512, 515, 517, 520, 516,
509, 517, 516, 512, 509, 485, 517, 504, 485, 482, 496, 510, 477, 499, 503, 504, 505, 503,
507, 517, 514, 511, 508, 484, 516, 503, 483, 474, 486, 500, 467, 490, 493, 496, 496, 494,
497, 504, 502, 499, 495, 470, 504, 490, 472, 467, 479, 492, 461, 485, 487, 489, 492, 489,
499, 506, 501, 498, 495, 469, 503, 487, 468, 475, 490, 504, 471, 495, 498, 500, 504, 505,
600, 602, 586, 578, 570, 540, 574, 560, 540, 533, 548, 561, 529, 554, 563, 573, 585, 570,
#if TOUCH_KEY_NUM > 0
6500, 6500, 6500,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_Rawdata_P[40 * 40] = {
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800,
65535, 1799, 1581, 1847, 1749, 1634, 65535, 65535, 65535, 65535, 65535, 65535, 1744, 1708, 1596, 1659, 1588, 65535,
1819, 1726, 1831, 1721, 1715, 1715, 1795, 1761, 1704, 1821, 1819, 1679, 1763, 1761, 1827, 1840, 1830, 1709,
1597, 1638, 1652, 1574, 1515, 1610, 1625, 1546, 1674, 1530, 1648, 1540, 1554, 1506, 1520, 1572, 1606, 1670,
1589, 1665, 1639, 1585, 1616, 1737, 1565, 1630, 1609, 1746, 1736, 1632, 1641, 1644, 1674, 1571, 1585, 1595,
1694, 1680, 1686, 1700, 1638, 1786, 1662, 1618, 1751, 1660, 1705, 1733, 1831, 1634, 1760, 1729, 1715, 1775,
1541, 1613, 1726, 1760, 1568, 1813, 1651, 1761, 1726, 1610, 1562, 1659, 1560, 1653, 1548, 1653, 1691, 1529,
1786, 1817, 1767, 1781, 1641, 1777, 1683, 1621, 1593, 1697, 1774, 1721, 1775, 1736, 1781, 1750, 1599, 1861,
1708, 1674, 1516, 1558, 1747, 1670, 1758, 1663, 1708, 1590, 1809, 1691, 1812, 1646, 1739, 1680, 1834, 1795,
1568, 1589, 1623, 1662, 1688, 1593, 1582, 1569, 1679, 1618, 1620, 1525, 1655, 1547, 1567, 1637, 1632, 1576,
1603, 1620, 1607, 1673, 1658, 1669, 1589, 1659, 1651, 1607, 1635, 1606, 1652, 1621, 1632, 1541, 1557, 1645,
1736, 1630, 1856, 1704, 1655, 1800, 1849, 1624, 1751, 1842, 1809, 1635, 1809, 1813, 1711, 1659, 1765, 1739,
1690, 1716, 1595, 1677, 1679, 1656, 1597, 1719, 1653, 1744, 1840, 1659, 1781, 1781, 1807, 1719, 1823, 1774,
1672, 1588, 1589, 1623, 1663, 1564, 1511, 1646, 1646, 1513, 1617, 1674, 1540, 1529, 1649, 1644, 1548, 1680,
1597, 1651, 1557, 1697, 1729, 1793, 1716, 1632, 1672, 1550, 1779, 1743, 1803, 1732, 1679, 1586, 1644, 1842,
1579, 1540, 1665, 1480, 1553, 1644, 1652, 1553, 1627, 1572, 1602, 1578, 1512, 1606, 1718, 1712, 1567, 1597,
1582, 1632, 1578, 1618, 1625, 1715, 1670, 1701, 1651, 1621, 1824, 1831, 1834, 1758, 1788, 1712, 1779, 1637,
1607, 1693, 1659, 1683, 1770, 1656, 1824, 1648, 1721, 1596, 1742, 1751, 1739, 1630, 1560, 1513, 1571, 1830,
1686, 1763, 1756, 1673, 1698, 1749, 1803, 1694, 1711, 1728, 1725, 1697, 1824, 1723, 1730, 1848, 1837, 1831,
1716, 1525, 1660, 1645, 1511, 1536, 1795, 1620, 1749, 1785, 1767, 1513, 1637, 1663, 1637, 1638, 1666, 1737,
1558, 1669, 1649, 1704, 1735, 1574, 1564, 1568, 1627, 1537, 1621, 1651, 1700, 1662, 1630, 1571, 1527, 1715,
1732, 1557, 1520, 1574, 1628, 1684, 1652, 1653, 1665, 1810, 1627, 1852, 1604, 1554, 1807, 1778, 1823, 1679,
1684, 1568, 1569, 1618, 1655, 1652, 1614, 1592, 1662, 1683, 1595, 1597, 1623, 1511, 1662, 1645, 1642, 1613,
1770, 1588, 1754, 1655, 1733, 1858, 1792, 1802, 1620, 1855, 1635, 1624, 1646, 1690, 1788, 1701, 1718, 1562,
1870, 1649, 1665, 1691, 1704, 1847, 1770, 1866, 1593, 1656, 1873, 1750, 1611, 1828, 1796, 1782, 1744, 1704,
1732, 1492, 1658, 1485, 1523, 1655, 1672, 1572, 1611, 1715, 1558, 1735, 1687, 1550, 1532, 1677, 1518, 1567,
1788, 1870, 1610, 1607, 1705, 1837, 1863, 1658, 1609, 1854, 1879, 1785, 1718, 1551, 1852, 1861, 1793, 1610,
1793, 1606, 1651, 1681, 1792, 1876, 1709, 1763, 1646, 1644, 1809, 1585, 1620, 1795, 1676, 1618, 1593, 1798,
1550, 1513, 1554, 1539, 1628, 1716, 1739, 1690, 1617, 1597, 1733, 1585, 1548, 1543, 1625, 1645, 1597, 1571,
1742, 1715, 1858, 1732, 1708, 1806, 1700, 1781, 1676, 1831, 1693, 1824, 1712, 1831, 1709, 1827, 1863, 1820,
1632, 1803, 1830, 1851, 1534, 1632, 1674, 1777, 1680, 1823, 1865, 1536, 1726, 1660, 1579, 1562, 1562, 1700,
1666, 1632, 1740, 1639, 1576, 1712, 1728, 1609, 1590, 1653, 1550, 1529, 1751, 1645, 1546, 1628, 1593, 1733,
1715, 1870, 1870, 1761, 1715, 1844, 1721, 1729, 1744, 1729, 1637, 1628, 1827, 1723, 1817, 1735, 1733, 1642,
1708, 1764, 1694, 1781, 1866, 1575, 1736, 1700, 1611, 1812, 1557, 1684, 1730, 1669, 1578, 1792, 1686, 1634,
1651, 1595, 1597, 1656, 1578, 1628, 1611, 1670, 1609, 1551, 1585, 1562, 1568, 1494, 1637, 1725, 1562, 1523,
1700, 1610, 1880, 1670, 1763, 1795, 1582, 1623, 1609, 1576, 1721, 1739, 1816, 1744, 1655, 1842, 1603, 1722,
1653, 1600, 1723, 1728, 1754, 1827, 1617, 1667, 1592, 1847, 1810, 1653, 1712, 1800, 1735, 1679, 1744, 1596,
#if TOUCH_KEY_NUM > 0
1500, 1500, 1500,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_Rawdata_N[40 * 40] = {
-65535, 771, 677, 791, 749, 700, -65535, -65535, -65535, -65535, -65535, -65535, 748, 732, 684, 711, 680, -65535,
779, 740, 785, 737, 735, 735, 769, 755, 730, 781, 779, 719, 755, 755, 783, 788, 784, 733,
685, 702, 708, 674, 649, 690, 697, 662, 718, 656, 706, 660, 666, 646, 652, 674, 688, 716,
681, 713, 703, 679, 692, 745, 671, 698, 689, 748, 744, 700, 703, 704, 718, 673, 679, 683,
726, 720, 722, 728, 702, 766, 712, 694, 751, 712, 731, 743, 785, 700, 754, 741, 735, 761,
661, 691, 740, 754, 672, 777, 707, 755, 740, 690, 670, 711, 668, 709, 664, 709, 725, 655,
766, 779, 757, 763, 703, 761, 721, 695, 683, 727, 760, 737, 761, 744, 763, 750, 685, 797,
732, 718, 650, 668, 749, 716, 754, 713, 732, 682, 775, 725, 776, 706, 745, 720, 786, 769,
672, 681, 695, 712, 724, 683, 678, 673, 719, 694, 694, 653, 709, 663, 671, 701, 700, 676,
687, 694, 689, 717, 710, 715, 681, 711, 707, 689, 701, 688, 708, 695, 700, 661, 667, 705,
744, 698, 796, 730, 709, 772, 793, 696, 751, 790, 775, 701, 775, 777, 733, 711, 757, 745,
724, 736, 683, 719, 719, 710, 685, 737, 709, 748, 788, 711, 763, 763, 775, 737, 781, 760,
716, 680, 681, 695, 713, 670, 647, 706, 706, 649, 693, 718, 660, 655, 707, 704, 664, 720,
685, 707, 667, 727, 741, 769, 736, 700, 716, 664, 763, 747, 773, 742, 719, 680, 704, 790,
677, 660, 713, 634, 665, 704, 708, 665, 697, 674, 686, 676, 648, 688, 736, 734, 671, 685,
678, 700, 676, 694, 697, 735, 716, 729, 707, 695, 782, 785, 786, 754, 766, 734, 763, 701,
689, 725, 711, 721, 758, 710, 782, 706, 737, 684, 746, 751, 745, 698, 668, 649, 673, 784,
722, 755, 752, 717, 728, 749, 773, 726, 733, 740, 739, 727, 782, 739, 742, 792, 787, 785,
736, 653, 712, 705, 647, 658, 769, 694, 749, 765, 757, 649, 701, 713, 701, 702, 714, 745,
668, 715, 707, 730, 743, 674, 670, 672, 697, 659, 695, 707, 728, 712, 698, 673, 655, 735,
742, 667, 652, 674, 698, 722, 708, 709, 713, 776, 697, 794, 688, 666, 775, 762, 781, 719,
722, 672, 673, 694, 709, 708, 692, 682, 712, 721, 683, 685, 695, 647, 712, 705, 704, 691,
758, 680, 752, 709, 743, 796, 768, 772, 694, 795, 701, 696, 706, 724, 766, 729, 736, 670,
802, 707, 713, 725, 730, 791, 758, 800, 683, 710, 803, 750, 691, 784, 770, 764, 748, 730,
742, 640, 710, 637, 653, 709, 716, 674, 691, 735, 668, 743, 723, 664, 656, 719, 650, 671,
766, 802, 690, 689, 731, 787, 799, 710, 689, 794, 805, 765, 736, 665, 794, 797, 769, 690,
769, 688, 707, 721, 768, 804, 733, 755, 706, 704, 775, 679, 694, 769, 718, 694, 683, 770,
664, 649, 666, 659, 698, 736, 745, 724, 693, 685, 743, 679, 664, 661, 697, 705, 685, 673,
746, 735, 796, 742, 732, 774, 728, 763, 718, 785, 725, 782, 734, 785, 733, 783, 799, 780,
700, 773, 784, 793, 658, 700, 718, 761, 720, 781, 799, 658, 740, 712, 677, 670, 670, 728,
714, 700, 746, 703, 676, 734, 740, 689, 682, 709, 664, 655, 751, 705, 662, 698, 683, 743,
735, 802, 802, 755, 735, 790, 737, 741, 748, 741, 701, 698, 783, 739, 779, 743, 743, 704,
732, 756, 726, 763, 800, 675, 744, 728, 691, 776, 667, 722, 742, 715, 676, 768, 722, 700,
707, 683, 685, 710, 676, 698, 691, 716, 689, 665, 679, 670, 672, 640, 701, 739, 670, 653,
728, 690, 806, 716, 755, 769, 678, 695, 689, 676, 737, 745, 778, 748, 709, 790, 687, 738,
709, 686, 739, 740, 752, 783, 693, 715, 682, 791, 776, 709, 734, 772, 743, 719, 748, 684,
#if TOUCH_KEY_NUM > 0
800, 800, 800,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_Rawdata_N[40 * 40] = {
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
static int32_t PS_Config_Lmt_FW_CC_P[40 * 40] = {
65535, 116, 116, 113, 115, 116, 65535, 65535, 65535, 65535, 65535, 65535, 116, 116, 116, 116, 119, 65535,
115, 119, 116, 116, 117, 117, 116, 117, 115, 113, 116, 116, 116, 116, 115, 115, 116, 117,
116, 116, 115, 115, 116, 115, 115, 116, 112, 120, 122, 122, 122, 123, 122, 122, 123, 124,
120, 117, 116, 116, 117, 116, 117, 117, 115, 116, 119, 119, 119, 119, 117, 119, 120, 122,
117, 116, 115, 115, 116, 115, 116, 116, 112, 116, 117, 117, 116, 119, 116, 116, 117, 119,
122, 119, 116, 116, 119, 116, 117, 116, 113, 116, 119, 119, 119, 119, 119, 117, 119, 122,
119, 116, 115, 115, 116, 115, 116, 116, 113, 117, 119, 120, 119, 120, 119, 119, 122, 122,
119, 116, 116, 116, 116, 116, 116, 116, 113, 116, 116, 119, 116, 117, 116, 116, 116, 119,
122, 119, 117, 117, 119, 119, 120, 119, 115, 117, 119, 122, 119, 120, 119, 117, 119, 122,
122, 119, 117, 117, 119, 117, 120, 117, 115, 117, 117, 120, 117, 117, 117, 117, 119, 120,
117, 116, 113, 115, 116, 115, 116, 116, 112, 119, 119, 122, 119, 119, 119, 119, 119, 122,
119, 116, 116, 116, 116, 116, 119, 116, 113, 119, 116, 119, 116, 116, 116, 116, 116, 119,
120, 119, 117, 117, 117, 119, 122, 119, 115, 122, 119, 119, 117, 117, 116, 116, 117, 119,
119, 116, 116, 116, 116, 116, 119, 119, 113, 122, 119, 119, 116, 116, 116, 116, 116, 116,
117, 116, 115, 116, 116, 116, 117, 119, 112, 124, 122, 123, 122, 120, 119, 119, 120, 122,
119, 116, 116, 116, 116, 116, 119, 119, 113, 122, 119, 119, 116, 116, 116, 116, 116, 119,
119, 116, 116, 116, 116, 117, 119, 120, 113, 122, 119, 119, 116, 116, 116, 116, 116, 116,
120, 117, 117, 119, 119, 119, 120, 120, 115, 119, 116, 117, 115, 115, 115, 113, 113, 115,
116, 116, 115, 115, 116, 116, 116, 116, 111, 122, 119, 122, 119, 117, 117, 117, 117, 119,
119, 116, 116, 116, 116, 117, 120, 119, 115, 122, 117, 119, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 119, 116, 113, 122, 119, 119, 119, 119, 116, 116, 116, 119,
119, 117, 117, 117, 117, 119, 122, 119, 115, 120, 116, 119, 116, 116, 115, 115, 115, 116,
116, 116, 115, 116, 116, 116, 119, 116, 113, 122, 119, 122, 119, 117, 116, 116, 116, 119,
116, 116, 116, 116, 116, 116, 119, 116, 113, 122, 116, 120, 119, 116, 116, 116, 116, 117,
116, 116, 115, 116, 116, 116, 119, 117, 112, 119, 117, 119, 116, 116, 116, 115, 116, 117,
119, 116, 119, 119, 119, 119, 122, 122, 116, 116, 116, 119, 116, 116, 113, 113, 113, 116,
116, 116, 116, 116, 116, 116, 120, 119, 113, 116, 119, 122, 119, 116, 116, 116, 116, 116,
123, 122, 122, 122, 122, 122, 124, 124, 117, 113, 119, 122, 119, 117, 116, 116, 116, 117,
119, 117, 116, 117, 119, 119, 123, 120, 115, 111, 117, 119, 116, 115, 115, 113, 113, 115,
122, 119, 119, 119, 122, 122, 124, 122, 116, 111, 116, 122, 116, 116, 116, 116, 116, 116,
119, 117, 116, 117, 119, 119, 122, 120, 115, 115, 122, 124, 119, 119, 119, 117, 119, 119,
119, 116, 116, 117, 119, 119, 123, 120, 115, 112, 119, 122, 116, 116, 115, 115, 115, 116,
120, 119, 119, 119, 119, 122, 124, 122, 116, 113, 122, 123, 119, 119, 119, 116, 117, 119,
122, 120, 120, 120, 122, 122, 127, 123, 117, 112, 117, 122, 116, 116, 115, 113, 115, 116,
119, 119, 116, 119, 119, 119, 127, 122, 116, 116, 122, 126, 119, 119, 119, 116, 119, 119,
116, 116, 115, 116, 116, 116, 124, 119, 113, 111, 119, 124, 117, 116, 116, 115, 115, 116,
#if TOUCH_KEY_NUM > 0
400, 400, 400,
38, 38, 38,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_CC_P = 130;
static int32_t PS_Config_Lmt_FW_CC_N = 80;
static int32_t PS_Config_Lmt_Key_FW_CC_P = 38;
static int32_t PS_Config_Lmt_Key_FW_CC_N = 9;
static int32_t PS_Config_Lmt_FW_CC_I_P = 25;
static int32_t PS_Config_Lmt_FW_CC_I_N;
static int32_t PS_Config_Lmt_FW_CC_Q_P = 25;
static int32_t PS_Config_Lmt_FW_CC_Q_N;
static int32_t PS_Config_Lmt_Key_FW_CC_I_P = 25;
static int32_t PS_Config_Lmt_Key_FW_CC_I_N;
static int32_t PS_Config_Lmt_Key_FW_CC_Q_P = 25;
static int32_t PS_Config_Lmt_Key_FW_CC_Q_N;
static int32_t PS_Config_Lmt_FW_CC_N[40 * 40] = {
-65535, 56, 56, 55, 55, 56, -65535, -65535, -65535, -65535, -65535, -65535, 56, 56, 56, 56, 57, -65535,
55, 57, 56, 56, 57, 57, 56, 57, 55, 55, 56, 56, 56, 56, 55, 55, 56, 57,
56, 56, 55, 55, 56, 55, 55, 56, 54, 58, 59, 59, 59, 59, 59, 59, 59, 60,
58, 57, 56, 56, 57, 56, 57, 57, 55, 56, 57, 57, 57, 57, 57, 57, 58, 59,
57, 56, 55, 55, 56, 55, 56, 56, 54, 56, 57, 57, 56, 57, 56, 56, 57, 57,
59, 57, 56, 56, 57, 56, 57, 56, 55, 56, 57, 57, 57, 57, 57, 57, 57, 59,
57, 56, 55, 55, 56, 55, 56, 56, 55, 57, 57, 58, 57, 58, 57, 57, 59, 59,
57, 56, 56, 56, 56, 56, 56, 56, 55, 56, 56, 57, 56, 57, 56, 56, 56, 57,
59, 57, 57, 57, 57, 57, 58, 57, 55, 57, 57, 59, 57, 58, 57, 57, 57, 59,
59, 57, 57, 57, 57, 57, 58, 57, 55, 57, 57, 58, 57, 57, 57, 57, 57, 58,
57, 56, 55, 55, 56, 55, 56, 56, 54, 57, 57, 59, 57, 57, 57, 57, 57, 59,
57, 56, 56, 56, 56, 56, 57, 56, 55, 57, 56, 57, 56, 56, 56, 56, 56, 57,
58, 57, 57, 57, 57, 57, 59, 57, 55, 59, 57, 57, 57, 57, 56, 56, 57, 57,
57, 56, 56, 56, 56, 56, 57, 57, 55, 59, 57, 57, 56, 56, 56, 56, 56, 56,
57, 56, 55, 56, 56, 56, 57, 57, 54, 60, 59, 59, 59, 58, 57, 57, 58, 59,
57, 56, 56, 56, 56, 56, 57, 57, 55, 59, 57, 57, 56, 56, 56, 56, 56, 57,
57, 56, 56, 56, 56, 57, 57, 58, 55, 59, 57, 57, 56, 56, 56, 56, 56, 56,
58, 57, 57, 57, 57, 57, 58, 58, 55, 57, 56, 57, 55, 55, 55, 55, 55, 55,
56, 56, 55, 55, 56, 56, 56, 56, 53, 59, 57, 59, 57, 57, 57, 57, 57, 57,
57, 56, 56, 56, 56, 57, 58, 57, 55, 59, 57, 57, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 57, 56, 55, 59, 57, 57, 57, 57, 56, 56, 56, 57,
57, 57, 57, 57, 57, 57, 59, 57, 55, 58, 56, 57, 56, 56, 55, 55, 55, 56,
56, 56, 55, 56, 56, 56, 57, 56, 55, 59, 57, 59, 57, 57, 56, 56, 56, 57,
56, 56, 56, 56, 56, 56, 57, 56, 55, 59, 56, 58, 57, 56, 56, 56, 56, 57,
56, 56, 55, 56, 56, 56, 57, 57, 54, 57, 57, 57, 56, 56, 56, 55, 56, 57,
57, 56, 57, 57, 57, 57, 59, 59, 56, 56, 56, 57, 56, 56, 55, 55, 55, 56,
56, 56, 56, 56, 56, 56, 58, 57, 55, 56, 57, 59, 57, 56, 56, 56, 56, 56,
59, 59, 59, 59, 59, 59, 60, 60, 57, 55, 57, 59, 57, 57, 56, 56, 56, 57,
57, 57, 56, 57, 57, 57, 59, 58, 55, 53, 57, 57, 56, 55, 55, 55, 55, 55,
59, 57, 57, 57, 59, 59, 60, 59, 56, 53, 56, 59, 56, 56, 56, 56, 56, 56,
57, 57, 56, 57, 57, 57, 59, 58, 55, 55, 59, 60, 57, 57, 57, 57, 57, 57,
57, 56, 56, 57, 57, 57, 59, 58, 55, 54, 57, 59, 56, 56, 55, 55, 55, 56,
58, 57, 57, 57, 57, 59, 60, 59, 56, 55, 59, 59, 57, 57, 57, 56, 57, 57,
59, 58, 58, 58, 59, 59, 61, 59, 57, 54, 57, 59, 56, 56, 55, 55, 55, 56,
57, 57, 56, 57, 57, 57, 61, 59, 56, 56, 59, 60, 57, 57, 57, 56, 57, 57,
56, 56, 55, 56, 56, 56, 60, 57, 55, 53, 57, 60, 57, 56, 56, 55, 55, 56,
#if TOUCH_KEY_NUM > 0
9, 9, 9,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_Diff_P = 35;
static int32_t PS_Config_Lmt_FW_Diff_N = -35;
static int32_t PS_Config_Lmt_Key_FW_Diff_P = 35;
static int32_t PS_Config_Lmt_Key_FW_Diff_N = -35;
static int32_t PS_Config_Lmt_FW_CC_I_P[40 * 40] = {
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
#if TOUCH_KEY_NUM > 0
25, 25, 25,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_CC_I_N[40 * 40] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
#if TOUCH_KEY_NUM > 0
0, 0, 0,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_CC_Q_P[40 * 40] = {
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
#if TOUCH_KEY_NUM > 0
25, 25, 25,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_CC_Q_N[40 * 40] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
#if TOUCH_KEY_NUM > 0
0, 0, 0,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_Diff_P[40 * 40] = {
65535, 50, 50, 50, 50, 50, 65535, 65535, 65535, 65535, 65535, 65535, 50, 50, 50, 50, 50, 65535,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
#if TOUCH_KEY_NUM > 0
35, 35, 35,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_Diff_N[40 *40] = {
-65535, -50, -50, -50, -50, -50, -65535, -65535, -65535, -65535, -65535, -65535, -50, -50, -50, -50, -50, -65535,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
-50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
#if TOUCH_KEY_NUM > 0
-35, -35, -35,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Diff_Test_Frame = 50;