/* Delete a text display device. 
Delete a text display device and release all resources associataed with the text display device. */
EMSTATUS TEXTDISPLAY_Delete(TEXTDISPLAY_Handle_t handle)
/* Delete a text display device. 
Delete a text display device and release all resources associataed with the text display device. */
EMSTATUS TEXTDISPLAY_Delete(TEXTDISPLAY_Handle_t handle)
{
  TEXTDISPLAY_Device_t*  textdisplay = (TEXTDISPLAY_Device_t*) handle;
  if (textdisplay->initialized)
  {
    textdisplay->charBuffer = NULL;
    textdisplay->charArray = NULL;
    if (textdisplay->lineBuffer)
    {
      textdisplay->displayDevice.pPixelMatrixFree (&textdisplay->displayDevice,
                                                   textdisplay->lineBuffer);
      textdisplay->lineBuffer = NULL;
    }
    textdisplay->displayDeviceNo = -1;
    textdisplay->initialized = false;
    return TEXTDISPLAY_EMSTATUS_OK;
  }
  return TEXTDISPLAY_EMSTATUS_INVALID_PARAM;
}