Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

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