コード例 #1
0
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'
}
コード例 #2
0
static void mcsdl_set_ready(void)
{
	//--------------------------------------------
	// Tkey module reset
	//--------------------------------------------

	MCSDL_VDD_SET_LOW();

    MCSDL_CE_SET_OUTPUT();
	MCSDL_CE_SET_LOW();

	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_mcs7000_delay(MCSDL_DELAY_25MS);						// Delay for Stable VDD

	MCSDL_VDD_SET_HIGH();
	MCSDL_CE_SET_HIGH();

	MCSDL_GPIO_SDA_SET_HIGH();

	mcsdl_mcs7000_delay(MCSDL_DELAY_30MS); 						// Delay '30 msec'

}
コード例 #3
0
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' */
}
コード例 #4
0
static void mcsdl_set_ready(void)
{
    /*--------------------------------------------
    // Tkey module reset
    //--------------------------------------------*/

    MCSDL_VDD_SET_LOW(); /*power*/

    MCSDL_CE_SET_LOW();
    MCSDL_CE_SET_OUTPUT(0);

    MCSDL_SET_GPIO_I2C();

    MCSDL_GPIO_SDA_SET_LOW();
    MCSDL_GPIO_SDA_SET_OUTPUT(0);

    MCSDL_GPIO_SCL_SET_LOW();
    MCSDL_GPIO_SCL_SET_OUTPUT(0);

    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_GPIO_SCL_SET_LOW();
    MCSDL_GPIO_SDA_SET_HIGH();
    mcsdl_delay(MCSDL_DELAY_40MS);                                          /*  Delay '30 msec' */
}
コード例 #5
0
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'

}
コード例 #6
0
static void mcsdl_reboot_mcs(void)
{
	//--------------------------------------------
	// Tkey module reset
	//--------------------------------------------
#if 0
//--------------------------------------------
// Tkey module reset
//--------------------------------------------
//gpio_tlmm_config(GPIO_CFG(GPIO_I2C0_SCL, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_16MA),GPIO_CFG_ENABLE);
//gpio_tlmm_config(GPIO_CFG(GPIO_I2C0_SDA, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_16MA),GPIO_CFG_ENABLE);
MCSDL_RESETB_SET_LOW();
MCSDL_RESETB_SET_OUTPUT(0);

mcsdl_vdd_off();
gpio_set_value(GPIO_TSP_SCL, 0);  // TOUCH SCL DIS
gpio_set_value(GPIO_TSP_SDA, 0);  // TOUCH SDA DIS
msleep(300);

//gpio_tlmm_config(GPIO_CFG(GPIO_I2C0_SCL, 0, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP, GPIO_CFG_16MA),GPIO_CFG_ENABLE);
//gpio_tlmm_config(GPIO_CFG(GPIO_I2C0_SDA, 0, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP, GPIO_CFG_16MA),GPIO_CFG_ENABLE);
MCSDL_RESETB_SET_INPUT();
MCSDL_RESETB_SET_HIGH();
gpio_set_value(GPIO_TSP_SCL, 1);  // TOUCH SCL EN
gpio_set_value(GPIO_TSP_SDA, 1);  // TOUCH SDA EN   

mcsdl_vdd_on();

msleep(300);    

//#else
	MCSDL_VDD_SET_LOW();
   msleep(100);

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

	MCSDL_GPIO_SDA_SET_HIGH();
	MCSDL_GPIO_SDA_SET_OUTPUT(1);

	MCSDL_GPIO_SCL_SET_HIGH();
	MCSDL_GPIO_SCL_SET_OUTPUT(1);

	//MCSDL_SET_HW_I2C();

	MCSDL_RESETB_SET_LOW();
	MCSDL_RESETB_SET_OUTPUT(0); //1->0

	mcsdl_delay(MCSDL_DELAY_25MS);						// Delay for Stable VDD

	MCSDL_RESETB_SET_INPUT();
	MCSDL_VDD_SET_HIGH();
   msleep(25);
	MCSDL_RESETB_SET_HIGH();
	//MCSDL_CE_SET_HIGH();
printk("TSP firmware download complete and chip RESET! /n");
	mcsdl_delay(MCSDL_DELAY_60MS); 						// Delay '25 msec'
	mcsdl_delay(MCSDL_DELAY_40MS); 						// Delay '25 msec'
#endif
	MCSDL_VDD_SET_LOW();

	MCSDL_CE_SET_LOW();
	MCSDL_CE_SET_OUTPUT();

	MCSDL_GPIO_SDA_SET_HIGH();
	MCSDL_GPIO_SDA_SET_OUTPUT(1);

	MCSDL_GPIO_SCL_SET_HIGH();
	MCSDL_GPIO_SCL_SET_OUTPUT(1);

	MCSDL_SET_HW_I2C();

	MCSDL_RESETB_SET_LOW();
	MCSDL_RESETB_SET_OUTPUT(0);

	mcsdl_delay(MCSDL_DELAY_25MS);						// Delay for Stable VDD

	MCSDL_RESETB_SET_INPUT();
	MCSDL_VDD_SET_HIGH();
	MCSDL_CE_SET_HIGH();

	mcsdl_delay(MCSDL_DELAY_30MS); 						// Delay '25 msec'
}