summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/main.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/apps/main.c b/apps/main.c
index 4dee1a482c..693577a72f 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -43,60 +43,15 @@
43 43
44#include "version.h" 44#include "version.h"
45 45
46#include "sh7034.h"
47#include "sprintf.h" 46#include "sprintf.h"
48 47
49char appsversion[]=APPSVERSION; 48char appsversion[]=APPSVERSION;
50 49
51void init(void); 50void init(void);
52 51
53#ifndef SIMULATOR
54/* Test code!!! */
55void dbg_ports(void)
56{
57 unsigned short porta;
58 unsigned short portb;
59 unsigned char portc;
60 char buf[32];
61
62 lcd_clear_display();
63
64 while(1)
65 {
66 porta = PADR;
67 portb = PBDR;
68 portc = PCDR;
69
70 snprintf(buf, 32, "PADR: %04x", porta);
71 lcd_puts(0, 0, buf);
72 snprintf(buf, 32, "PBDR: %04x", portb);
73 lcd_puts(0, 1, buf);
74 snprintf(buf, 32, "PCDR: %02x", portc);
75 lcd_puts(0, 2, buf);
76
77 snprintf(buf, 32, "AN0: %03x AN4: %03x", adc_read(0), adc_read(4));
78 lcd_puts(0, 3, buf);
79 snprintf(buf, 32, "AN1: %03x AN5: %03x", adc_read(1), adc_read(5));
80 lcd_puts(0, 4, buf);
81 snprintf(buf, 32, "AN2: %03x AN6: %03x", adc_read(2), adc_read(6));
82 lcd_puts(0, 5, buf);
83 snprintf(buf, 32, "AN3: %03x AN7: %03x", adc_read(3), adc_read(7));
84 lcd_puts(0, 6, buf);
85
86 lcd_update();
87 sleep(HZ/10);
88
89 /* Toggle the charger */
90 if ((portb & PBDR_BTN_ON) == 0)
91 PBDR ^= 0x20;
92 }
93}
94#endif
95
96void app_main(void) 52void app_main(void)
97{ 53{
98 init(); 54 init();
99// dbg_ports();
100 browse_root(); 55 browse_root();
101} 56}
102 57