Guest User

Untitled

a guest
Dec 18th, 2012
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data