/* Turns off the display and puts it into sleep mode Does not turn off backlight.  */
EMSTATUS DMD_sleep(void)
/* Turns off the display and puts it into sleep mode Does not turn off backlight.  */
EMSTATUS DMD_sleep(void)
{
  uint16_t data;
  if (!initialized)
  {
    return DMD_ERROR_DRIVER_NOT_INITIALIZED;
  }
  data = DMD_SSD2119_SLEEP_MODE_1_SLP;
  DMDIF_writeReg(DMD_SSD2119_SLEEP_MODE_1, data);
  data = 0;
  DMDIF_writeReg(DMD_SSD2119_DISPLAY_CONTROL, 0x0000);
  return DMD_OK;
}