Advertisement
Guest User

Untitled

a guest
Dec 19th, 2012
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement