Skip to content

functions : changeMode

max mc costa edited this page Jun 18, 2016 · 1 revision

changeMode(NORMAL/PARTIAL/IDLE/SLEEP/INVERT/DISP_ON/DISP_OFF);//sit change the current mode of the display


parameter:
changeMode group in one function several modes and display states
The complete changeMode function is: changeMode(mode);
where mode are:

  • NORMAL: this brings display to normal operations whatever mode was selected before.
  • PARTIAL: rarely used and should be used with setPartialArea command. It limits operations on a strictly area of the display, the main difference with setArea is that the ILI logic doesn't drive anymore the part of the display outside the partial area. This can be interesting for some operation but unfortunatly most display shows the non partial area as bright white (due to incorrect hardware connection of the TFT) so is pretty un-usable!
  • IDLE: despite name is little confusing command, you may thing display goes off and consume less but in IDLE just limit the number of colors on display and should consume little less than normal.
  • SLEEP: this turns display in SLEEP mode immediately where TFT driver logic is off but SPI is on so it can listen to commands and wakeup. Since backlight is not drived directly by ILI, put display in sleep results in a white screen (since tft that drive mosfet are grounded) so you need to use the included useBacklight(pin) to assign to library a backlight pin (connected to a transistor or mosfet) that drive display backlight automatically. The WakeUp from sleep mode takes about 120ms.
  • DISP_ON: It turns display ON (if was off). Same consideration of above, library needs to controls directly the backlight by provide useBacklight(pin). You can do the same thing by using NORMAL.
  • DISP_OFF: same of above but turns off. As told before, turning off screen doesn't turn off backlight that remains 100% white, by providing useBacklight(pin) the library can deal automatically with backlight stuff for you.
Clone this wiki locally