All pastes #482683 Raw Edit

Untitled

public text v1 · immutable
·published 2007-05-11 11:22 UTC
rendered paste body
void LoadTable_1(void* handle)
{
        int i;
        char tunerBuff[20];
        unsigned long uloutlen = 8;
        unsigned long ulvallen = 16;
        unsigned char   FirstByte = FWData[0];
        unsigned char tunerBuff19[20]={0x40,16,XC3028_I2C_ADDR,FirstByte,0x00,0x
00,0x02,0x00};
        for (i=0;i*8<FWLength-4;i++)
        {
                ulvallen = 16;
                tunerBuff[0] = 0x40;
                tunerBuff[1] = 16;
                tunerBuff[2] = XC3028_I2C_ADDR;
                tunerBuff[3] = FirstByte;
                tunerBuff[4] = 0;
                tunerBuff[5] = 0;
                tunerBuff[6] = 8;
                tunerBuff[7] = 0;

                tunerBuff[8] = FWData[i*8+1];
                tunerBuff[9] = FWData[i*8+2];
                tunerBuff[10] = FWData[i*8+3];
                tunerBuff[11] = FWData[i*8+4];
                tunerBuff[12] = FWData[i*8+5];
                tunerBuff[13] = FWData[i*8+6];
                tunerBuff[14] = FWData[i*8+7];
                tunerBuff[15] = FWData[i*8+8];
                USB_ControlVendorCommand(handle, tunerBuff,ulvallen,uloutlen);

                msleep(10);
        }
        msleep(20);
        ulvallen = 9;
//      tunerBuff[6] = 2;
        tunerBuff19[8] = FWData[4097];
        tunerBuff19[9] = FWData[4098];
        USB_ControlVendorCommand(handle, tunerBuff19,ulvallen,uloutlen);