diff options
Diffstat (limited to 'bootloader')
-rw-r--r-- | bootloader/meizu_m3.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/bootloader/meizu_m3.c b/bootloader/meizu_m3.c index 7c0a5bca2d..5ecc92f369 100644 --- a/bootloader/meizu_m3.c +++ b/bootloader/meizu_m3.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include "pcm.h" | 53 | #include "pcm.h" |
54 | #include "audiohw.h" | 54 | #include "audiohw.h" |
55 | #include "rtc.h" | 55 | #include "rtc.h" |
56 | #include "time.h" | ||
56 | 57 | ||
57 | #define LONG_DELAY 200000 | 58 | #define LONG_DELAY 200000 |
58 | #define SHORT_DELAY 50000 | 59 | #define SHORT_DELAY 50000 |
@@ -105,12 +106,17 @@ void bl_debug_int(unsigned int input,unsigned int count) | |||
105 | delay(SHORT_DELAY*6); | 106 | delay(SHORT_DELAY*6); |
106 | } | 107 | } |
107 | 108 | ||
109 | void post_mortem_stub(void) | ||
110 | { | ||
111 | } | ||
112 | |||
108 | void main(void) | 113 | void main(void) |
109 | { | 114 | { |
110 | char mystring[64]; | 115 | char mystring[64]; |
111 | int i; | 116 | int i; |
112 | unsigned short data = 0; | 117 | unsigned short data = 0; |
113 | char write_data[2], read_data[16]; | 118 | char write_data[2], read_data[16]; |
119 | struct tm tm; | ||
114 | 120 | ||
115 | //Set backlight pin to output and enable | 121 | //Set backlight pin to output and enable |
116 | int oldval = PCON0; | 122 | int oldval = PCON0; |
@@ -180,10 +186,10 @@ void main(void) | |||
180 | #endif | 186 | #endif |
181 | 187 | ||
182 | #if 1 /* enable this to see info about the RTC */ | 188 | #if 1 /* enable this to see info about the RTC */ |
183 | rtc_read_datetime(read_data); | 189 | rtc_read_datetime(&tm); |
184 | for (i = 0; i < 7; i++) { | 190 | snprintf(mystring, 64, "%04d-%02d-%02d %02d:%02d:%02d", |
185 | snprintf(mystring + 2 * i, 64, "%02X", read_data[i]); | 191 | tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, |
186 | } | 192 | tm.tm_hour, tm.tm_min, tm.tm_sec); |
187 | lcd_puts(0, 10, mystring); | 193 | lcd_puts(0, 10, mystring); |
188 | #endif | 194 | #endif |
189 | 195 | ||
@@ -199,11 +205,11 @@ void main(void) | |||
199 | #endif | 205 | #endif |
200 | 206 | ||
201 | #if 1 /* enable this to see info about IODMA channel 0 (PCM) */ | 207 | #if 1 /* enable this to see info about IODMA channel 0 (PCM) */ |
202 | snprintf(mystring, 64, "DMA: %08X %08X", DMACADDR0, DMACTCNT0); | 208 | snprintf(mystring, 64, "DMA: %08X %08X", (int)DMACADDR0, (int)DMACTCNT0); |
203 | lcd_puts(0, 12, mystring); | 209 | lcd_puts(0, 12, mystring); |
204 | #endif | 210 | #endif |
205 | #if 1 /* enable this to see info about IIS */ | 211 | #if 1 /* enable this to see info about IIS */ |
206 | snprintf(mystring, 64, "IIS: %08X", I2SSTATUS); | 212 | snprintf(mystring, 64, "IIS: %08X", (int)I2SSTATUS); |
207 | lcd_puts(0, 13, mystring); | 213 | lcd_puts(0, 13, mystring); |
208 | #endif | 214 | #endif |
209 | 215 | ||