Пример #1
0
/**************************************************************************************
 * Name:  lcd_lcdinitialize
 *
 * Description:
 *   Set LCD panel contrast (0-CONFIG_LCD_MAXCONTRAST).
 *
 **************************************************************************************/
static inline void lcd_initialize(void)
{
  ginfo("%s: initializing LCD.\n",__FUNCTION__);
  calypso_reset_set(RESET_EXT, 0);
  usleep(5000);
  uwire_init();
  usleep(5000);
  fb_ssd1783_send_cmdlist(ssd1783_initdata);
}
Пример #2
0
void lcd_clear()
{
  struct ssd1783_cmdlist prepare_disp_write_cmds[] = {
    { CMD,  0x8E },
    { DATA, 0x00 },
    { DATA, 0x00 },
    { DATA, LCD_XRES },
    { DATA, LCD_YRES },
    { END,  0x00 }
  };

  struct ssd1783_cmdlist nop[] = {
    { CMD, 0x25 }, // NOP command
    { END, 0x00 }
  };

  fb_ssd1783_send_cmdlist(prepare_disp_write_cmds);
  fb_ssd1783_send_cmdlist(nop);
}
Пример #3
0
static void lcd_write_prepare(unsigned int x1, unsigned int x2, unsigned int y1, unsigned int y2)
{;
  DEBUGASSERT( (x1 < x2 )&& (y1 < y2));
  struct ssd1783_cmdlist prepare_disp_write_cmds[] = {
    { CMD,  0x15 },                  /*  set column address */
    { DATA, x1 },
    { DATA, x2 },
    { CMD,  0x75 },                 /*  set page address (Y) */
    { DATA, y1 },
    { DATA, y2 },
    { CMD,  0x5c },                  /* enter write display ram mode */
    { END,  0x00 }
  };
  dbg("x1:%d, x2:%d, y1:%d, y2:%d\n",x1, x2,y1, y2);
  fb_ssd1783_send_cmdlist(prepare_disp_write_cmds);
}
Пример #4
0
int lcd_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
    size_t npixels)
{
  int i;
  FAR const uint16_t *src = (FAR const uint16_t*) buffer;

  /* Buffer must be provided and aligned to a 16-bit address boundary */
  DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0);


  /* Write the run to GRAM. */
  lcd_write_prepare(col,col+npixels, row,row+1);

  for (i = 0; i < npixels; i++)
  {
    write_data(*src++);
  }
  fb_ssd1783_send_cmdlist(nop);

  return OK;
}