0 Replies Latest reply on Jan 5, 2010 5:49 AM by akaryqin

    How to use function ADL_Display_WriteAndReadI2C in ADL SDK

    akaryqin

      I want to use the function "ADL_Display_WriteAndReadI2C" in ADL SDK to communicate with display, but can't success.

      Can anyone help me?

      char pcCommandbytes[] = {(char)0x51, (char)0x82, (char)0x01, (char)0x10, (char)0xAC}; ADLI2C objI2C; memset(&objI2C, 0, sizeof(ADLI2C)); objI2C.iSize = sizeof(ADLI2C); objI2C.iLine = 0; // ??? objI2C.iAddress = 0x6E; objI2C.iOffset = 0; objI2C.iAction = ADL_DL_I2C_ACTIONWRITE; objI2C.iSpeed = 10; objI2C.iDataSize = sizeof(pcCommandbytes); objI2C.pcData = pcCommandbytes; int iResult = ADL_Display_WriteAndReadI2C(iAdapterIndex, &objI2C); if (iResult != ADL_OK) printf("Failed to write DDC data. Error code: %d\n", iResult);