diff options
Diffstat (limited to 'bootloader')
-rw-r--r-- | bootloader/meizu_m3.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/bootloader/meizu_m3.c b/bootloader/meizu_m3.c index 1c1f45a40a..c88494448c 100644 --- a/bootloader/meizu_m3.c +++ b/bootloader/meizu_m3.c | |||
@@ -44,6 +44,8 @@ | |||
44 | #include "rbunicode.h" | 44 | #include "rbunicode.h" |
45 | #include "usb.h" | 45 | #include "usb.h" |
46 | #include "qt1106.h" | 46 | #include "qt1106.h" |
47 | #include "rockboxlogo.h" | ||
48 | |||
47 | 49 | ||
48 | #include <stdarg.h> | 50 | #include <stdarg.h> |
49 | 51 | ||
@@ -105,12 +107,14 @@ void main(void) | |||
105 | int tmpval; | 107 | int tmpval; |
106 | 108 | ||
107 | /* set clock to 200 MHz */ | 109 | /* set clock to 200 MHz */ |
110 | #if 0 | ||
108 | CLKCON = 0x00800080; | 111 | CLKCON = 0x00800080; |
109 | CLKCON2= 0x00; | 112 | CLKCON2= 0x00; |
110 | PLL0PMS = 0x1ad200; | 113 | PLL0PMS = 0x1ad200; |
111 | PLLCON = 1; | 114 | PLLCON = 1; |
112 | while (!(PLLLOCK & 1)) ; | 115 | while (!(PLLLOCK & 1)) ; |
113 | CLKCON = 0x20802080; | 116 | CLKCON = 0x20802080; |
117 | #endif | ||
114 | 118 | ||
115 | /* mask all interrupts | 119 | /* mask all interrupts |
116 | this is done, because the lcd framebuffer | 120 | this is done, because the lcd framebuffer |
@@ -136,21 +140,18 @@ void main(void) | |||
136 | 140 | ||
137 | lcd_init(); | 141 | lcd_init(); |
138 | snprintf(mystring, 64, "tmpval: %x", tmpval); | 142 | snprintf(mystring, 64, "tmpval: %x", tmpval); |
139 | lcd_putsxy(0,0,mystring); | 143 | lcd_puts(0,0,mystring); |
140 | lcd_update(); | 144 | lcd_update(); |
141 | 145 | ||
142 | init_qt1106(); | 146 | init_qt1106(); |
143 | 147 | ||
144 | // Wait for play to be pressed | ||
145 | while(!(PDAT1 & (1 << 4))); | ||
146 | // Wait for play to be released | ||
147 | while((PDAT1 & (1 << 4))); | ||
148 | PDAT0 ^= (1 << 2); //Toggle backlight | ||
149 | delay(LONG_DELAY); | ||
150 | |||
151 | /* Calibrate the lot */ | 148 | /* Calibrate the lot */ |
152 | qt1106_io(QT1106_MODE_FREE | QT1106_MOD_INF | QT1106_DI \ | 149 | qt1106_io(QT1106_MODE_FREE | QT1106_MOD_INF | QT1106_DI \ |
153 | | QT1106_SLD_SLIDER | QT1106_CAL_WHEEL | QT1106_CAL_KEYS | QT1106_RES_4); | 150 | | QT1106_SLD_SLIDER | QT1106_CAL_WHEEL | QT1106_CAL_KEYS | QT1106_RES_256); |
151 | |||
152 | lcd_clear_display(); | ||
153 | lcd_bitmap(rockboxlogo, 0, 30, BMPWIDTH_rockboxlogo, BMPHEIGHT_rockboxlogo); | ||
154 | lcd_update(); | ||
154 | 155 | ||
155 | /* Set to maximum sensitivity */ | 156 | /* Set to maximum sensitivity */ |
156 | qt1106_io(QT1106_CT | (0x00 << 8) ); | 157 | qt1106_io(QT1106_CT | (0x00 << 8) ); |
@@ -160,9 +161,14 @@ void main(void) | |||
160 | qt1106_wait(); | 161 | qt1106_wait(); |
161 | 162 | ||
162 | int slider = qt1106_io(QT1106_MODE_FREE | QT1106_MOD_INF \ | 163 | int slider = qt1106_io(QT1106_MODE_FREE | QT1106_MOD_INF \ |
163 | | QT1106_DI | QT1106_SLD_SLIDER | QT1106_RES_4); | 164 | | QT1106_DI | QT1106_SLD_SLIDER | QT1106_RES_256); |
165 | snprintf(mystring, 64, "%x %2.2x",(slider & 0x008000)>>15, slider&0xff); | ||
166 | lcd_puts(0,1,mystring); | ||
167 | lcd_update(); | ||
168 | /* | ||
164 | if(slider & 0x008000) | 169 | if(slider & 0x008000) |
165 | bl_debug_count(((slider&0xff)) + 1); | 170 | bl_debug_count(((slider&0xff)) + 1); |
171 | */ | ||
166 | } | 172 | } |
167 | 173 | ||
168 | //power off | 174 | //power off |