![Goodix GT911 Скачать руководство пользователя страница 23](http://html1.mh-extra.com/html/goodix/gt911/gt911_programming-manual_2243136023.webp)
GOODIX CONFIDENTIAL
Reproduction and/or distribution of this document in whole or in part is strictly prohibited without written consent of GOODIX.
23
beginning.
Reference Code for Crc16 calculation (note: big-edian mode)
:
#define FREQ_CRC_SEED 0x1021
//calculate the CRC16 value of the defined length of data in SrcData
unsigned short Crc16(unsigned char *SrcData,unsigned char length)
{
unsigned short crc=0xFFFF;
unsigned char i,j;
unsigned char value;
bit flag;
bit c15;
for (i= 0; i < length; i++)
{
value=SrcData[i];
for (j= 0; j < 8; j++)
{
flag = (value & 0x80);
c15 = (crc & 0x8000);
value <<= 1;
crc <<= 1;
if(c15^flag)
crc ^= FREQ_CRC_SEED;
}
}
return crc;
}
4. Power-on Initialization and Modification on Register Value
4.1 Power-On Timing of GT911
After power-on, the host needs to control such GT911 pins as AVDD, VDDIO, INT and Reset according to the
timing sequence shown below: