This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

ranma

By: a guest on Feb 12th, 2010  |  syntax: None  |  size: 1.21 KB  |  views: 202  |  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.     while(1)
  2.     {
  3.         int dir, data;
  4.         volatile int i;
  5.         line = 0;
  6.         dir = GPIOA_DIR;
  7.         data = GPIOA_DATA;
  8.         GPIOA_DIR = 0xff;
  9.         GPIOA_DATA = 0x00;
  10.         for (i=0; i<10; i++);
  11.         GPIOA_DIR = dir;
  12.         for (i=0; i<10; i++);
  13.         GPIOA_DATA = data & dir;
  14.         lcd_putsf(0, line++, "GPIOA: %2x DIR: %2x", GPIOA_DATA, GPIOA_DIR);
  15.         lcd_putsf(0, line++, "GPIOB: %2x DIR: %2x", GPIOB_DATA, GPIOB_DIR);
  16.         lcd_putsf(0, line++, "GPIOC: %2x DIR: %2x", GPIOC_DATA, GPIOC_DIR);
  17.         lcd_putsf(0, line++, "GPIOD: %2x DIR: %2x", GPIOD_DATA, GPIOD_DIR);
  18.         lcd_putsf(0, line++, "BVDD: %d VRTC: %d", adc_read(0)*5, adc_read(1)*5);
  19.         lcd_putsf(0, line++, "UVDD: %d CHGI: %d", adc_read(2)*5, adc_read(3)*5);
  20.         lcd_putsf(0, line++, "VBE1: %d VBE2: %d", adc_read(8), adc_read(9));
  21.         lcd_putsf(0, line++, "BTMP: %d CVDD: %d", adc_read(5)*25/10, adc_read(4)*25/10);
  22.         lcd_putsf(0, line++, "DBOP: %4x DC15:%2x", dbop_debug(), ascodec_read(AS3514_DCDC15));
  23.         lcd_putsf(0, line++, "IENRD0:%2x CHG:%2x",
  24.                   ascodec_read(AS3514_IRQ_ENRD0),
  25.                   ascodec_read(AS3514_CHARGER));
  26.         lcd_update();
  27.         if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
  28.             break;
  29.     }
clone this paste RAW Paste Data