Esempio n. 1
0
/***********************************************************
* 	   
* uiPowerOff
*  
***********************************************************/
void TTUI::uiPowerOff()
{

    if(state_UIPower == true) //power currently on
    {    
      state_UIPower = false; 
      
	  #ifdef TT_SHIELD
		  touch.clear();
	  #else
		 	 detachInterrupt(1);    // disable the touch key interrupt
		      I2c.end();              // stop i2c
 
	        if(batteryPower() == false) //USB connected
	        {
	          //do nothing
	        }
	        else //battery power
	        {

	            // Prevent leakage current: Bring all pins connected to devices on Vsw to ground.
	            // Shutdown LCD
	            noDisplay();                 // clear output
	            digitalWrite(A3,LOW);        // LCD RS
	            digitalWrite(4,LOW);        // LCD RW
	            digitalWrite(5,LOW);        // LCD EN
	            digitalWrite(6,LOW);        // LCD DB4
	            digitalWrite(7,LOW);        // LCD DB5
	            digitalWrite(8,LOW);        // LCD DB6
	            digitalWrite(9,LOW);        // LCD DB7
	            analogWrite (10, 0);        // LCD Contrast PWM
	            // Shutdown main power to LCD and Touch IC
	            PORTB |= (1<<PORTB6);            // turn off Vsw_SW
	            // i2c pins SDA and SCL are already input with internal pullups disabled
	            // KEY_CHG interrupt is already input without pullup
	         }
	 #endif //ifdef TTShield	
    
      #ifdef SERIAL_DEBUG
      Serial.println("UI Off");
      #endif
     

    }
}
Esempio n. 2
0
//
// Switch fully off the LCD (backlight and LCD) 
void LCD::off ( void )
{
   noBacklight();
   noDisplay();
}
Esempio n. 3
0
/*EDU FR*/ void rgb_lcd::desactiverTexte(){noDisplay();}
Esempio n. 4
0
//---------- DésactiverTexte/RéactiverTexte
/*EDU FR*/ void rgb_lcd::desactiverEcriture(){noDisplay();}
void LiquidCrystalNew_T3TWI::off(void) {
	noDisplay();
	backlight(0);
}