Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 18th, 2012  |  syntax: None  |  size: 0.42 KB  |  views: 29  |  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.     SCU_GPIOUPCON &= ~(1<<0x17);
  6.     GPIO_PCCON |= (1<<7);
  7.     GPIO_PCDR &= ~(1<<7);
  8.     udelay(1);
  9.     GPIO_PCDR |= (1<<7);
  10.     udelay(4);
  11.  
  12.     SCU_GPIOUPCON &= ~(1<<0x14);
  13.     GPIO_PCCON &= ~(1<<4);
  14.     GPIO_PCDR |= (1<<4);
  15.  
  16.     if (GPIO_PCDR & (1<<4))
  17.     {
  18.         lcd_type = LCD_V1;
  19.     }
  20.     else
  21.     {
  22.         lcd_type = LCD_v2;
  23.     }
  24. }