Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 18th, 2012  |  syntax: None  |  size: 0.33 KB  |  hits: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. static void identify_lcd(void)
  2. {
  3.     SCU_IOMUXB_CON &= ~(1<<2);
  4.  
  5.         GPIO_PCCON |= (1<<7);
  6.         GPIO_PCDR &= ~(1<<7);
  7.         udelay(1);
  8.         GPIO_PCDR |= (1<<7);
  9.         udelay(4);
  10.         GPIO_PCCON |= (1<<4);
  11.         GPIO_PCDR |= (1<<4);
  12.  
  13.     if (GPIO_PCDR & (1<<4))
  14.     {
  15.         lcd_type = LCD_V1;
  16.     }
  17.     else
  18.     {
  19.         lcd_type = LCD_v2;
  20.     }
  21. }