• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ MCSDL_GPIO_SDA_SET_OUTPUT函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: mcsdl_reboot_mcs

static void mcsdl_reboot_mcs(void)
{
	//--------------------------------------------
	// Tkey module reset
	//--------------------------------------------

	MCSDL_VDD_SET_LOW();

	MCSDL_CE_SET_LOW();
    MCSDL_CE_SET_OUTPUT();

	MCSDL_GPIO_SDA_SET_HIGH();
	MCSDL_GPIO_SDA_SET_OUTPUT();

	MCSDL_GPIO_SCL_SET_HIGH();
	MCSDL_GPIO_SCL_SET_OUTPUT();

	//MCSDL_SET_HW_I2C();

	MCSDL_RESETB_SET_LOW();
	MCSDL_RESETB_SET_OUTPUT();

	mcsdl_delay(MCSDL_DELAY_25MS);						// Delay for Stable VDD

	MCSDL_VDD_SET_HIGH();

	MCSDL_RESETB_SET_HIGH();
    MCSDL_RESETB_SET_INPUT();
    MCSDL_GPIO_SCL_SET_INPUT();
    MCSDL_GPIO_SDA_SET_INPUT();

    mcsdl_delay(MCSDL_DELAY_30MS); 						// Delay '25 msec'
}
开发者ID:Pantech-Discover,项目名称:android_kernel_pantech_oscar,代码行数:33,代码来源:mms100_ISP_download.c


示例2: mcsdl_read_32bits

static void mcsdl_read_32bits( UINT8 *pData )
{
	int i, j;
    MCSDL_GPIO_SCL_SET_LOW();
	MCSDL_GPIO_SDA_SET_LOW();
	MCSDL_GPIO_SDA_SET_INPUT();



        for (i=3; i>=0; i--){

		pData[i] = 0;

		for (j=0; j<8; j++){

			pData[i] <<= 1;

            MCSDL_GPIO_SCL_SET_LOW();   mcsdl_delay(MCSDL_DELAY_1US);
            MCSDL_GPIO_SCL_SET_HIGH();  mcsdl_delay(MCSDL_DELAY_1US);

            if (MCSDL_GPIO_SDA_IS_HIGH())
                pData[i] |= 0x01;
        }
    }

    MCSDL_GPIO_SDA_SET_LOW();
    MCSDL_GPIO_SDA_SET_OUTPUT(0);
}
开发者ID:rcunningham12,项目名称:L38C-Dynamic-Kernel,代码行数:28,代码来源:mcs8000_download.c


示例3: mcsdl_set_ready

static void mcsdl_set_ready(void)
{
	//--------------------------------------------
	// Tkey module reset
	//--------------------------------------------

	MCSDL_VDD_SET_LOW(); // power

	//MCSDL_CE_SET_LOW();
	MCSDL_CE_SET_OUTPUT();

	MCSDL_SET_GPIO_I2C();

	MCSDL_GPIO_SDA_SET_LOW();
	MCSDL_GPIO_SDA_SET_OUTPUT();

	MCSDL_GPIO_SCL_SET_LOW();
	MCSDL_GPIO_SCL_SET_OUTPUT();

	MCSDL_RESETB_SET_LOW();
	MCSDL_RESETB_SET_OUTPUT();

	mcsdl_delay(MCSDL_DELAY_25MS);						// Delay for Stable VDD

	MCSDL_VDD_SET_HIGH();
	MCSDL_CE_SET_HIGH();

    MCSDL_GPIO_SCL_SET_LOW();
	MCSDL_GPIO_SDA_SET_HIGH();

	mcsdl_delay(MCSDL_DELAY_40MS); 						// Delay '30 msec'

}
开发者ID:Pantech-Discover,项目名称:android_kernel_pantech_oscar,代码行数:33,代码来源:mms100_ISP_download.c


示例4: mcsdl_reboot_mcs

static void mcsdl_reboot_mcs(void)
{
    MCSDL_VDD_SET_LOW();

    MCSDL_CE_SET_LOW();
    MCSDL_CE_SET_OUTPUT(0);

    MCSDL_GPIO_SDA_SET_HIGH();
    MCSDL_GPIO_SDA_SET_OUTPUT(1);

    MCSDL_GPIO_SCL_SET_HIGH();
    MCSDL_GPIO_SCL_SET_OUTPUT(1);

    MCSDL_RESETB_SET_LOW();
    MCSDL_RESETB_SET_OUTPUT(0);

    mcsdl_delay(MCSDL_DELAY_25MS);                                          /* Delay for Stable VDD */

    MCSDL_VDD_SET_HIGH();
    /*MCSDL_CE_SET_HIGH();*/

    MCSDL_RESETB_SET_HIGH();
    MCSDL_RESETB_SET_INPUT();
    MCSDL_GPIO_SCL_SET_INPUT();
    MCSDL_GPIO_SDA_SET_INPUT();

    mcsdl_delay(MCSDL_DELAY_30MS);                                          /* Delay '25 msec' */
}
开发者ID:suiye223,项目名称:p920-ICS-kernel,代码行数:28,代码来源:mms136_ISP_download.c


示例5: mcsdl_write_bits

static void mcsdl_write_bits(UINT32 wordData, int nBits)
{
	int i;

	MCSDL_GPIO_SDA_SET_LOW();
	MCSDL_GPIO_SDA_SET_OUTPUT();

	for (i = 0; i < nBits; i++)
	{

		if (wordData & 0x80000000)
		{
			MCSDL_GPIO_SDA_SET_HIGH();
		}
		else
		{
			MCSDL_GPIO_SDA_SET_LOW();
		}

		mcsdl_delay(MCSDL_DELAY_7US);

		MCSDL_GPIO_SCL_SET_HIGH();
		mcsdl_delay(MCSDL_DELAY_3US);
		MCSDL_GPIO_SCL_SET_LOW();
		mcsdl_delay(MCSDL_DELAY_3US);

		wordData <<= 1;
	}
}
开发者ID:MichaelSX,项目名称:android_kernel_samsung_i9100g,代码行数:29,代码来源:melfas_download.c


示例6: mcsdl_download

//------------------------------------------------------------------
//
//	Download function
//
//------------------------------------------------------------------
static int mcsdl_download(const UINT8 *pBianry, const UINT16 unLength, INT8 IdxNum)
{
	int nRet;
#if 0
	int i;
	UINT8 Check_IC = 0xFF;	// d.model
	UINT8 readBuffer[32];
	UINT8 writeBuffer[4];
	UINT32 wordData;
#endif

	//---------------------------------
	// Check Binary Size
	//---------------------------------
	if (unLength >= MELFAS_FIRMWARE_MAX_SIZE)
	{
		nRet = MCSDL_RET_PROGRAM_SIZE_IS_WRONG;
		goto MCSDL_DOWNLOAD_FINISH;
	}

#if MELFAS_ENABLE_DBG_PROGRESS_PRINT
	printk(KERN_INFO " - Starting download...\n");
#endif

	//---------------------------------
	// Make it ready
	//---------------------------------
#if MELFAS_ENABLE_DBG_PROGRESS_PRINT
	printk(KERN_INFO " > Ready\n");
#endif
	mcsdl_set_ready();

#if 0
	mcsdl_delay(MCSDL_DELAY_1MS);
	//--------------------------------------------------------------
	// IC Information read from Flash
	//--------------------------------------------------------------
	if (IdxNum == 0)
	{
		mcsdl_select_isp_mode(ISP_MODE_SERIAL_READ);

		wordData   = ((0x1F00 & 0x1FFF) << 1) | 0x0;
		wordData <<= 14;
		mcsdl_write_bits(wordData, 18);

		mcsdl_read_flash(readBuffer);
		MCSDL_GPIO_SDA_SET_LOW();
		MCSDL_GPIO_SDA_SET_OUTPUT(0);

		mcsdl_unselect_isp_mode();

		//if (readBuffer[3] != 0xFF)
		Check_IC = readBuffer[3];
#if MELFAS_ENABLE_DBG_PROGRESS_PRINT
		printk("\IC Information :0x%02X,  0x%02X\n", readBuffer[3], Check_IC);
#endif
		mcsdl_delay(MCSDL_DELAY_1MS);
	}
开发者ID:CallMeVentus,项目名称:i9070_kernel_CoCore-P,代码行数:63,代码来源:mms100_download.c


示例7: mcsdl_scl_toggle_twice

static void mcsdl_scl_toggle_twice(void)
{

	MCSDL_GPIO_SDA_SET_HIGH();
	MCSDL_GPIO_SDA_SET_OUTPUT(1);

	MCSDL_GPIO_SCL_SET_HIGH();	mcsdl_delay(MCSDL_DELAY_20US);
	MCSDL_GPIO_SCL_SET_LOW();	mcsdl_delay(MCSDL_DELAY_20US);

	MCSDL_GPIO_SCL_SET_HIGH();	mcsdl_delay(MCSDL_DELAY_20US);
	MCSDL_GPIO_SCL_SET_LOW();	mcsdl_delay(MCSDL_DELAY_20US);
}
开发者ID:CL0SeY,项目名称:i957kernel,代码行数:12,代码来源:mcs8000_download.c


示例8: mcsdl_set_ready

void mcsdl_set_ready(void)
{
	//--------------------------------------------
	// Tkey module reset
	//--------------------------------------------

	MCSDL_VDD_SET_LOW(); // power 

	//MCSDL_CE_SET_LOW();
	//MCSDL_CE_SET_OUTPUT();

	//MCSDL_SET_GPIO_I2C();
	mcsdl_set_gpio_i2c();

	if (gpio_request(GPIO_TOUCH_I2C_SDA,"I2C3_SDA") != 0)
	{
		printk("TSP firm download, Could not request GPIO %d", GPIO_TOUCH_I2C_SDA);
		return -EIO;
	}

	if (gpio_request(GPIO_TOUCH_I2C_SCL,"I2C3_SCL") != 0)
	{
		printk("TSP firm download, Could not request GPIO %d", GPIO_TOUCH_I2C_SCL);
		return -EIO;
	}



	MCSDL_GPIO_SDA_SET_LOW();
	MCSDL_GPIO_SDA_SET_OUTPUT();

	MCSDL_GPIO_SCL_SET_LOW();
	MCSDL_GPIO_SCL_SET_OUTPUT();

	MCSDL_RESETB_SET_LOW();
	MCSDL_RESETB_SET_OUTPUT();

	mcsdl_delay(MCSDL_DELAY_25MS); // Delay for Stable VDD

	MCSDL_VDD_SET_HIGH();
	//MCSDL_CE_SET_HIGH();

	MCSDL_GPIO_SDA_SET_HIGH();

	mcsdl_delay(MCSDL_DELAY_10MS); //mcsdl_delay(MCSDL_DELAY_40MS); // Delay '30 msec'

}
开发者ID:CenterTurkHD,项目名称:android_kernel_samsung_hugo,代码行数:47,代码来源:melfas_download.c


示例9: mcsdl_reboot_mcs

static void mcsdl_reboot_mcs(void)
{
	//--------------------------------------------
	// Tkey module reset
	//--------------------------------------------

	MCSDL_VDD_SET_LOW();

	//MCSDL_CE_SET_LOW();
	//MCSDL_CE_SET_OUTPUT();

	MCSDL_GPIO_SDA_SET_HIGH();
	MCSDL_GPIO_SDA_SET_OUTPUT();

	MCSDL_GPIO_SCL_SET_HIGH();
	MCSDL_GPIO_SCL_SET_OUTPUT();

	//MCSDL_SET_HW_I2C();

	gpio_free(GPIO_TOUCH_I2C_SDA);
	gpio_free(GPIO_TOUCH_I2C_SCL);

	mdelay(500);

	mcsdl_set_hw_i2c();

	MCSDL_RESETB_SET_LOW();
	MCSDL_RESETB_SET_OUTPUT();

	mdelay(500); //mcsdl_delay(MCSDL_DELAY_60MS); // Delay for Stable VDD
	

	MCSDL_RESETB_SET_INPUT();
	MCSDL_VDD_SET_HIGH();

	MCSDL_RESETB_SET_HIGH();
	//MCSDL_CE_SET_HIGH();

	mdelay(500); //mcsdl_delay(MCSDL_DELAY_60MS); // Delay '25 msec'

}
开发者ID:CenterTurkHD,项目名称:android_kernel_samsung_hugo,代码行数:41,代码来源:melfas_download.c


示例10: mcsdl_set_ready

static void mcsdl_set_ready(void)
{
	//--------------------------------------------
	// Tkey module reset
	//--------------------------------------------

	MCSDL_VDD_SET_LOW(); // power

	//MCSDL_CE_SET_LOW();
	MCSDL_CE_SET_OUTPUT();

	MCSDL_SET_GPIO_I2C();

	//MCSDL_GPIO_SDA_SET_LOW(); //bomi
	MCSDL_GPIO_SDA_SET_OUTPUT();
	MCSDL_GPIO_SDA_SET_LOW();

	//MCSDL_GPIO_SCL_SET_LOW();  //bomi
	MCSDL_GPIO_SCL_SET_OUTPUT();
	MCSDL_GPIO_SCL_SET_LOW();

	//MCSDL_RESETB_SET_LOW();  //bomi
	MCSDL_RESETB_SET_OUTPUT();
	MCSDL_RESETB_SET_LOW();

	/* LGE_CHANGE_S: E0 [email protected] [2011-11-09] : 
	TD1416085584 :	After sleeping on and off while sensing a touchscreen,
	Touchscreen doesn't work*/
	mcsdl_delay(MCSDL_DELAY_25MS);						// Delay for Stable VDD
	mcsdl_delay(MCSDL_DELAY_25MS);						// Delay for Stable VDD

	MCSDL_VDD_SET_HIGH();
	MCSDL_CE_SET_HIGH();

    MCSDL_GPIO_SCL_SET_LOW();
	MCSDL_GPIO_SDA_SET_HIGH();

	mcsdl_delay(MCSDL_DELAY_40MS); 						// Delay '30 msec'

}
开发者ID:ochiman,项目名称:e405-kernel,代码行数:40,代码来源:mms100_ISP_download_e1.c


示例11: MFS_reboot

void MFS_reboot(void)
{
	MCSDL_VDD_SET_LOW();

	MCSDL_GPIO_SDA_SET_HIGH();
	MCSDL_GPIO_SDA_SET_OUTPUT(1);

	MCSDL_GPIO_SCL_SET_HIGH();
	MCSDL_GPIO_SCL_SET_OUTPUT(1);

	MCSDL_RESETB_SET_LOW();
	MCSDL_RESETB_SET_OUTPUT(1);

	MFS_ms_delay(25);

	MCSDL_VDD_SET_HIGH();

	MCSDL_RESETB_SET_HIGH();
	MCSDL_RESETB_SET_INPUT();
	MCSDL_GPIO_SCL_SET_INPUT();
	MCSDL_GPIO_SDA_SET_INPUT();

	MFS_ms_delay(25);
}
开发者ID:IjazCi,项目名称:android_kernel_samsung_kylexx,代码行数:24,代码来源:MMS100S_ISC_Updater_Customize.c


示例12: mcsdl_verify_flash

static int mcsdl_verify_flash( UINT8 *pDataOriginal, UINT16 unLength, INT8 IdxNum )
{
	int	  i, j;
	int	  nRet;

	UINT8 *pData;
	UINT8 ucLength;

	UINT16 addr;
	UINT32 wordData;

	addr  = 0;
	pData = (UINT8 *) pDataOriginal;

	ucLength  = MELFAS_TRANSFER_LENGTH;

    while ((addr*4) < (int)unLength)
    {
        if ((unLength - (addr*4)) < MELFAS_TRANSFER_LENGTH)
        {
            ucLength = (UINT8)(unLength - (addr * 4));
        }
        // start ADD DELAY
        mcsdl_delay(MCSDL_DELAY_40US);

        //--------------------------------------
        //	Select ISP Mode
        //--------------------------------------
        if (IdxNum > 0)
        {
            mcsdl_select_isp_mode(ISP_MODE_NEXT_CHIP_BYPASS);
		mcsdl_delay(MCSDL_DELAY_3US);
        }

    	mcsdl_select_isp_mode(ISP_MODE_SERIAL_READ);


    	//---------------------------------------------
    	//	Header
    	//	Address[13ibts] <<1
    	//---------------------------------------------

    	wordData   = ( (addr&0x1FFF) << 1 ) | 0x0;
    	wordData <<= 14;

    	mcsdl_write_bits( wordData, 18 );

        addr+=1;

    		#if MELFAS_ENABLE_DBG_PROGRESS_PRINT
    		printk("#");
    		#endif



    		//--------------------
    		// Read flash
    		//--------------------
    		mcsdl_read_flash( ucVerifyBuffer);

//kang

        MCSDL_GPIO_SDA_SET_LOW();
        MCSDL_GPIO_SDA_SET_OUTPUT(0);
//            mcsdl_delay(MCSDL_DELAY_1MS);
//kang
    		//--------------------
    		// Comparing
    		//--------------------


        if (IdxNum == 0)
        {
            for (j = 0; j < (int)ucLength; j++)
            {
#if MELFAS_ENABLE_DBG_PROGRESS_PRINT
                printk(" %02X", ucVerifyBuffer[j]);
#endif
                if (ucVerifyBuffer[j] != pData[j])
                {
#if MELFAS_ENABLE_DBG_PROGRESS_PRINT
	    				printk("\n [Error] Address : 0x%04X : 0x%02X - 0x%02X\n", addr, pData[j], ucVerifyBuffer[j] );
	                    #endif


	    				nRet = MCSDL_RET_PROGRAM_VERIFY_FAILED;
	    				goto MCSDL_VERIFY_FLASH_FINISH;

	    			}
	    		}
		}
        else // slave
        {
            for (j = 0; j < (int)ucLength; j++)
            {
#if MELFAS_ENABLE_DBG_PROGRESS_PRINT
                printk(" %02X", ucVerifyBuffer[j]);
#endif
                if ((0xff - ucVerifyBuffer[j]) != pData[j])
                {
//.........这里部分代码省略.........
开发者ID:CL0SeY,项目名称:i957kernel,代码行数:101,代码来源:mcs8000_download.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MC_函数代码示例发布时间:2022-05-30
下一篇:
C++ MCSDL_GPIO_SDA_SET_LOW函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap