当前位置: 首页>>代码示例>>C++>>正文


C++ readRMI函数代码示例

本文整理汇总了C++中readRMI函数的典型用法代码示例。如果您正苦于以下问题:C++ readRMI函数的具体用法?C++ readRMI怎么用?C++ readRMI使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了readRMI函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SynaReadConfigInfo

/* SynaReadConfigInfo reads the F34 query registers and retrieves the block size
 * and count of the configuration section of the image to be reflashed
 */
static void SynaReadConfigInfo(void)
{
	u8 uData[2];

	pr_info("tsp fw. : Read Config Info\n");

	readRMI(SynaF34ReflashQuery_ConfigBlockSize, uData, 2);
	SynaConfigBlockSize = uData[0] | (uData[1] << 8);

	readRMI(SynaF34ReflashQuery_ConfigBlockCount, uData, 2);
	SynaConfigBlockCount = uData[0] | (uData[1] << 8);
	SynaConfigImageSize = SynaConfigBlockCount * SynaConfigBlockSize;
}
开发者ID:ItsAnilSingh,项目名称:android_kernel_samsung_logan2g,代码行数:16,代码来源:synaptics_fw_updater.c

示例2: SynaWaitATTN1

static void SynaWaitATTN1(void)
{
    unsigned char uData;
    unsigned char uStatus;

    //waitATTN(ASSERT, 300);
    msleep(5);

    do {
        readRMI(SynaF34_FlashControl, &uData, 1);
        //printk("----SynaWaitATTN1-1-1\n");
        readRMI((SynaF01DataBase + 1), &uStatus, 1);
        //printk("----SynaWaitATTN1-1-2\n");
    } while (uData!= 0x80);
}
开发者ID:El-Nath,项目名称:bidji-find5,代码行数:15,代码来源:synaptics_update_firmware.c

示例3: SynaWaitATTN

/* SynaWaitATTN waits for ATTN to be asserted within a certain time threshold.
 * The function also checks for the F34 "Program Enabled" bit and clear ATTN
 * accordingly.
 */
static void SynaWaitATTN(void)
{
	u8 uData;
	u8 uStatus;
	int cnt = 1;

	while (gpio_get_value(91) && cnt < 30) {
		//msleep(20);
		cnt++;
	}
	do {
		readRMI(SynaF34_FlashControl, &uData, 1);
		readRMI((SynaF01DataBase + 1), &uStatus, 1);
	} while (uData != 0x80);
}
开发者ID:ItsAnilSingh,项目名称:android_kernel_samsung_logan2g,代码行数:19,代码来源:synaptics_fw_updater.c

示例4: SynaInitialize

/* SynaInitialize sets up the reflahs process
 */
static void SynaInitialize(void)
{
    unsigned char uData[1]; // uData[2]
    unsigned char uStatus;

    printk("\nInitializing Reflash Process...");
#define PAGE_SELECT_REG 0xff
    uData[0] = 0x00;
    writeRMI(PAGE_SELECT_REG, uData, 1); //select page 0

    SynafirmwareImgData = 0;

    SynaconfigImgData = 0 ;

    do {
        readRMI(0, &uStatus, 1);

        if (uStatus & 0x80) {
            break;
        }
    } while (uStatus & 0x40);

    SynaSetup();

    //readRMI(SynaF34ReflashQuery_FirmwareBlockSize, &uData[0], 2);

    //SynaFirmwareBlockSize = uData[0] | (uData[1] << 8);
}
开发者ID:El-Nath,项目名称:bidji-find5,代码行数:30,代码来源:synaptics_update_firmware.c

示例5: SynaWaitATTN

/* SynaWaitATTN waits for ATTN to be asserted within a certain time threshold.
 * The function also checks for the F34 "Program Enabled" bit and clear ATTN
 * accordingly.
 */
static void SynaWaitATTN(void)
{
	u8 uData;
	u8 uStatus;
	int cnt = 0;

	while (gpio_get_value(gpio_irq) && cnt++ < 300)
		usleep_range(500, 1000);

	do {
		readRMI(SynaF34_FlashControl, &uData, 1);
		usleep_range(500, 1000);
	} while ((uData != 0x80) && (cnt++ < 300));

	readRMI((SynaF01DataBase + 1), &uStatus, 1);
}
开发者ID:andi34,项目名称:Dhollmen_Kernel,代码行数:20,代码来源:synaptics.c

示例6: SynaReadBootloadID

/* SynaReadBootloadID reads the F34 query registers and retrieves the bootloader ID of the firmware
 */
static void SynaReadBootloadID(void)
{
    unsigned char uData[2];

    readRMI(SynaF34ReflashQuery_BootID, &uData[0], 2);
    SynaBootloadID = uData[0] + uData[1] * 0x100;
}
开发者ID:El-Nath,项目名称:bidji-find5,代码行数:9,代码来源:synaptics_update_firmware.c

示例7: SynaEnableFlashing

/* SynaEnableFlashing kicks off the reflash process
 */
void SynaEnableFlashing(struct i2c_client *client)
{
	unsigned char uStatus = 0;
	enum FlashCommand cmd;
	TPD_LOG("%s\n", __func__);
	TPD_LOG("Enable Reflash...\n");

	readRMI(client, SynaF01DataBase, &uStatus, 1);

/* APK_TEST */
	TPD_LOG("APK_TEST uStatus= 0x%02x\n", uStatus);

	if ((uStatus & 0x40) == 0 /*|| force */) {
		/* Reflash is enabled by first reading the bootloader ID from the firmware and write it back */
		SynaReadBootloadID(client);
		SynaWriteBootloadID(client);

		/* Write the "Enable Flash Programming command to F34 Control register */
		/* Wait for ATTN and then clear the ATTN. */
		cmd = m_uF34ReflashCmd_Enable;
		writeRMI(client, SynaF34_FlashControl, (unsigned char *)&cmd, 1);
		SynaWaitForATTN(1000, client);

		/* I2C addrss may change */
		/* ConfigCommunication();//APK_TEST */

		/* Scan the PDT again to ensure all register offsets are correct */
		SynaScanPDT(client);

		/* Read the "Program Enabled" bit of the F34 Control register, and proceed only if the */
		/* bit is set. */
		CheckFlashStatus(cmd, client);
	}
}
开发者ID:vitek999,项目名称:android_kernel_lg_mm,代码行数:36,代码来源:s3320_fw_update.c

示例8: SynaReadConfigInfo

/* SynaReadConfigInfo reads the F34 query registers and retrieves the block size and count
 * of the configuration section of the image to be reflashed
 */
static void SynaReadConfigInfo(void)
{
    unsigned char uData[2];

    printk("\nRead Config Info");

    readRMI(SynaF34ReflashQuery_ConfigBlockSize, &uData[0], 2);
    SynaConfigBlockSize = uData[0] | (uData[1] << 8);

    readRMI(SynaF34ReflashQuery_ConfigBlockCount, &uData[0], 2);
    SynaConfigBlockCount = uData[0] | (uData[1] << 8);
    SynaConfigImageSize = SynaConfigBlockCount * SynaConfigBlockSize;

    printk("\nConfig   block:%d count:%d  total_size:%lu",
            SynaConfigBlockSize, SynaConfigBlockCount, SynaConfigImageSize);
}
开发者ID:El-Nath,项目名称:bidji-find5,代码行数:19,代码来源:synaptics_update_firmware.c

示例9: readTouchKeyThreshold

bool	readTouchKeyThreshold(struct i2c_client *ts_client, u8 *command)
{
#if 0
	u8 resetCmd;
	
	client = ts_client;

	SetPage(0x02);

	F54_PDTscan();  /* scan for page 0x02 */

	readRMI(F1A_Button_Threshold, command, 2);;

//	printk("hunny2 : %d 0x%x\n",  *command, *command);

	/* reset TSP IC */
	SetPage(0x00);
	resetCmd = 0x01;
	writeRMI(F01_Command_Base, &resetCmd, 1);
#else
	*command = 50; // guide by synaptics.
#endif
	
	return true;
}
开发者ID:PsychoGame,项目名称:android_kernel_samsung_royss_old,代码行数:25,代码来源:synaptics_fw_updater.c

示例10: SynaReadBootloadID

/* SynaReadBootloadID reads the F34 query registers and retrieves the bootloader
 * ID of the firmware
 */
static void SynaReadBootloadID(void)
{
	u8 uData[2];
	pr_info("tsp fw. : SynaReadBootloadID\n");

	readRMI(SynaF34ReflashQuery_BootID, uData, 2);
	SynaBootloadID = uData[0] + uData[1] * 0x100;
}
开发者ID:ItsAnilSingh,项目名称:android_kernel_samsung_logan2g,代码行数:11,代码来源:synaptics_fw_updater.c

示例11: SynaReadBootloadID

/* SynaReadBootloadID reads the F34 query registers and retrieves the bootloader ID of the firmware
 */
void SynaReadBootloadID(struct i2c_client *client)
{
	unsigned char uData[2] = { 0, };
	TPD_LOG("%s\n", __func__);

	readRMI(client, SynaF34ReflashQuery_BootID, &uData[0], 2);
	SynaBootloadID = uData[0] | (uData[1] << 8);
}
开发者ID:vitek999,项目名称:android_kernel_lg_mm,代码行数:10,代码来源:s3320_fw_update.c

示例12: SynaReadFirmwareInfo

/* SynaReadFirmwareInfo reads the F34 query registers and retrieves the block size and count
 * of the firmware section of the image to be reflashed
 */
void SynaReadFirmwareInfo(struct i2c_client *client)
{
	unsigned char uData[3] = { 0, };
	unsigned char product_id[11] = { 0, };
	int firmware_version = 0;
	TPD_LOG("%s\n", __func__);

	readRMI(client, SynaF01QueryBase + 11, product_id, 10);
	product_id[10] = '\0';
	TPD_LOG("Read Product ID %s\n", product_id);

	readRMI(client, SynaF01QueryBase + 18, uData, 3);
	firmware_version = uData[2] << 16 | uData[1] << 8 | uData[0];
	TPD_LOG("Read Firmware Info %d\n", firmware_version);

	CheckTouchControllerType(client);
	/* CheckFimrwareRevision();//APK_TEST */
}
开发者ID:vitek999,项目名称:android_kernel_lg_mm,代码行数:21,代码来源:s3320_fw_update.c

示例13: SynaEnableFlashing

/* SynaEnableFlashing kicks off the reflash process
 */
static void SynaEnableFlashing(void)
{
	u8 uData;
	u8 uStatus;

	pr_info("\nEnable Reflash...");

	/* Reflash is enabled by first reading the bootloader ID from
	   the firmware and write it back */
	SynaReadBootloadID();
	SynaWriteBootloadID();

	/* Make sure Reflash is not already enabled */
	do {
		readRMI(SynaF34_FlashControl, &uData, 1);
	} while (((uData & 0x0f) != 0x00));

	readRMI(SynaF01DataBase, &uStatus, 1);

	if ((uStatus & 0x40) == 0) {
		/* Write the "Enable Flash Programming command to
		F34 Control register Wait for ATTN and then clear the ATTN. */
		uData = 0x0f;
		writeRMI(SynaF34_FlashControl, &uData, 1);
		mdelay(300);
		readRMI((SynaF01DataBase + 1), &uStatus, 1);

		/* Scan the PDT again to ensure all register offsets are
		correct */
		SynaSetup();

		/* Read the "Program Enabled" bit of the F34 Control register,
		and proceed only if the bit is set.*/
		readRMI(SynaF34_FlashControl, &uData, 1);

		while (uData != 0x80) {
			/* In practice, if uData!=0x80 happens for multiple
			counts, it indicates reflash is failed to be enabled,
			and program should quit */
			;
		}
	}
}
开发者ID:ItsAnilSingh,项目名称:android_kernel_samsung_logan2g,代码行数:45,代码来源:synaptics_fw_updater.c

示例14: SynaScanPDT

/* SynaScanPDT scans the Page Description Table (PDT) and sets up the necessary variables
 * for the reflash process. This function is a "slim" version of the PDT scan function in
 * in PDT.c, since only F34 and F01 are needed for reflash.
 */
void SynaScanPDT(struct i2c_client *client)
{
	unsigned char address = 0;
	unsigned char uData[2] = { 0, };
	unsigned char buffer[6] = { 0, };
	TPD_LOG("%s\n", __func__);

	for (address = 0xe9; address > 0xc0; address = address - 6) {
		readRMI(client, address, buffer, 6);

		switch (buffer[5]) {
		case 0x34:
			SynaF34DataBase = buffer[3];
			SynaF34QueryBase = buffer[0];
			break;
		case 0x01:
			SynaF01DataBase = buffer[3];
			SynaF01CommandBase = buffer[1];
			SynaF01QueryBase = buffer[0];
			break;
		}
	}

	SynaF34Reflash_BlockNum = SynaF34DataBase;
	SynaF34Reflash_BlockData = SynaF34DataBase + 1;
	SynaF34ReflashQuery_BootID = SynaF34QueryBase;
	SynaF34ReflashQuery_FlashPropertyQuery = SynaF34QueryBase + 1;
	SynaF34ReflashQuery_BlockSize = SynaF34QueryBase + 2;
	SynaF34ReflashQuery_FirmwareBlockCount = SynaF34QueryBase + 3;
	SynaF34_FlashControl = SynaF34DataBase + 2;
	SynaF34_FlashStatus = SynaF34DataBase + 3;

	readRMI(client, SynaF34ReflashQuery_FirmwareBlockCount, buffer, 4);
	SynaFirmwareBlockCount = buffer[0] | (buffer[1] << 8);
	SynaConfigBlockCount = buffer[2] | (buffer[3] << 8);

	readRMI(client, SynaF34ReflashQuery_BlockSize, &uData[0], 2);
	SynaConfigBlockSize = SynaFirmwareBlockSize = uData[0] | (uData[1] << 8);

	/* cleat ATTN */
	readRMI(client, (SynaF01DataBase + 1), buffer, 1);
}
开发者ID:vitek999,项目名称:android_kernel_lg_mm,代码行数:46,代码来源:s3320_fw_update.c

示例15: CheckFlashStatus

bool CheckFlashStatus(enum FlashCommand command, struct i2c_client *client)
{
	unsigned char uData = 0;
	/* Read the "Program Enabled" bit of the F34 Control register, and proceed only if the */
	/* bit is set. */
	readRMI(client, SynaF34_FlashStatus, &uData, 1);

	/* if ((uData & 0x3F) != 0) */
	/* printf("Command %s failed.\n\tFlash status : 0x%X\n", SynaFlashCommandStr[command], uData & 0x3F); */

	return !(uData & 0x3F);
}
开发者ID:vitek999,项目名称:android_kernel_lg_mm,代码行数:12,代码来源:s3320_fw_update.c


注:本文中的readRMI函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。