summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootloader/mrobe500.c73
1 files changed, 41 insertions, 32 deletions
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c
index 5f80d6d6c9..6a31dc22d0 100755
--- a/bootloader/mrobe500.c
+++ b/bootloader/mrobe500.c
@@ -43,6 +43,10 @@
43#include "tsc2100.h" 43#include "tsc2100.h"
44#include "time.h" 44#include "time.h"
45 45
46//#define MRDEBUG
47
48#if defined(MRDEBUG)
49
46extern int line; 50extern int line;
47 51
48struct touch_calibration_point tl, br; 52struct touch_calibration_point tl, br;
@@ -93,6 +97,41 @@ void touchpad_calibrate_screen(void)
93 set_calibration_points(&tl, &br); 97 set_calibration_points(&tl, &br);
94} 98}
95 99
100void mrdebug()
101{
102 int button=0, *address=0x0;
103 use_calibration(false);
104 touchpad_calibrate_screen();
105 use_calibration(true);
106 while(true)
107 {
108 struct tm *t = get_time();
109 printf("%d:%d:%d %d %d %d", t->tm_hour, t->tm_min, t->tm_sec, t->tm_mday, t->tm_mon, t->tm_year);
110 printf("time: %d", mktime(t));
111 button = button_read_device();
112 if (button == BUTTON_POWER)
113 {
114 printf("reset");
115 IO_GIO_BITSET1|=1<<10;
116 }
117 if(button==BUTTON_RC_PLAY)
118 address+=0x02;
119 else if (button==BUTTON_RC_DOWN)
120 address-=0x02;
121 else if (button==BUTTON_RC_FF)
122 address+=0x1000;
123 else if (button==BUTTON_RC_REW)
124 address-=0x1000;
125 if (button&BUTTON_TOUCHPAD)
126 {
127 unsigned int data = button_get_last_touch();
128 printf("x: %d, y: %d", data>>16, data&0xffff);
129 line-=3;
130 }
131 else line -=2;
132 }
133}
134#endif
96 135
97void main(void) 136void main(void)
98{ 137{
@@ -149,38 +188,8 @@ void main(void)
149 reset_screen(); 188 reset_screen();
150 lcd_update(); 189 lcd_update();
151 } 190 }
152#if 0 191#if defined(MRDEBUG)
153 int button=0, *address=0x0, count=0; 192 mrdebug();
154 use_calibration(false);
155 touchpad_calibrate_screen();
156 use_calibration(true);
157 while(true)
158 {
159 struct tm *t = get_time();
160 printf("%d:%d:%d %d %d %d", t->tm_hour, t->tm_min, t->tm_sec, t->tm_mday, t->tm_mon, t->tm_year);
161 printf("time: %d", mktime(t));
162 button = button_read_device();
163 if (button == BUTTON_POWER)
164 {
165 printf("reset");
166 IO_GIO_BITSET1|=1<<10;
167 }
168 if(button==BUTTON_RC_PLAY)
169 address+=0x02;
170 else if (button==BUTTON_RC_DOWN)
171 address-=0x02;
172 else if (button==BUTTON_RC_FF)
173 address+=0x1000;
174 else if (button==BUTTON_RC_REW)
175 address-=0x1000;
176 if (button&BUTTON_TOUCHPAD)
177 {
178 unsigned int data = button_get_last_touch();
179 printf("x: %d, y: %d", data>>16, data&0xffff);
180 line-=3;
181 }
182 else line -=2;
183 }
184#endif 193#endif
185 printf("ATA"); 194 printf("ATA");
186 rc = ata_init(); 195 rc = ata_init();