summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-10-07 21:12:03 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-10-07 21:12:03 +0000
commit68d9fb95de3116ec8e7e4ad222d09c407b435504 (patch)
treeccba6b2174e026c067f15181bc17bd75d7971f1d /bootloader
parentdd7cacdc884a1dcd79256760f1b5677e9a142490 (diff)
downloadrockbox-68d9fb95de3116ec8e7e4ad222d09c407b435504.tar.gz
rockbox-68d9fb95de3116ec8e7e4ad222d09c407b435504.tar.bz2
rockbox-68d9fb95de3116ec8e7e4ad222d09c407b435504.zip
lcd now shows things on the old-style Meizu M3.
It needs to be re-tested on the new-style, colours are wrong, and timing loops need to be reviewed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18740 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/meizu_m3.c26
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 @@
#include "rbunicode.h"
#include "usb.h"
#include "qt1106.h"
+#include "rockboxlogo.h"
+
#include <stdarg.h>
@@ -105,12 +107,14 @@ void main(void)
int tmpval;
/* set clock to 200 MHz */
+ #if 0
CLKCON = 0x00800080;
CLKCON2= 0x00;
PLL0PMS = 0x1ad200;
PLLCON = 1;
while (!(PLLLOCK & 1)) ;
CLKCON = 0x20802080;
+ #endif
/* mask all interrupts
this is done, because the lcd framebuffer
@@ -136,21 +140,18 @@ void main(void)
lcd_init();
snprintf(mystring, 64, "tmpval: %x", tmpval);
- lcd_putsxy(0,0,mystring);
+ lcd_puts(0,0,mystring);
lcd_update();
init_qt1106();
- // Wait for play to be pressed
- while(!(PDAT1 & (1 << 4)));
- // Wait for play to be released
- while((PDAT1 & (1 << 4)));
- PDAT0 ^= (1 << 2); //Toggle backlight
- delay(LONG_DELAY);
-
/* Calibrate the lot */
qt1106_io(QT1106_MODE_FREE | QT1106_MOD_INF | QT1106_DI \
- | QT1106_SLD_SLIDER | QT1106_CAL_WHEEL | QT1106_CAL_KEYS | QT1106_RES_4);
+ | QT1106_SLD_SLIDER | QT1106_CAL_WHEEL | QT1106_CAL_KEYS | QT1106_RES_256);
+
+ lcd_clear_display();
+ lcd_bitmap(rockboxlogo, 0, 30, BMPWIDTH_rockboxlogo, BMPHEIGHT_rockboxlogo);
+ lcd_update();
/* Set to maximum sensitivity */
qt1106_io(QT1106_CT | (0x00 << 8) );
@@ -160,9 +161,14 @@ void main(void)
qt1106_wait();
int slider = qt1106_io(QT1106_MODE_FREE | QT1106_MOD_INF \
- | QT1106_DI | QT1106_SLD_SLIDER | QT1106_RES_4);
+ | QT1106_DI | QT1106_SLD_SLIDER | QT1106_RES_256);
+ snprintf(mystring, 64, "%x %2.2x",(slider & 0x008000)>>15, slider&0xff);
+ lcd_puts(0,1,mystring);
+ lcd_update();
+ /*
if(slider & 0x008000)
bl_debug_count(((slider&0xff)) + 1);
+ */
}
//power off