freemyipod r302 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r301‎ | r302 | r303 >
Date:21:33, 1 December 2010
Author:theseven
Status:new
Tags:
Comment:
emBIOS: Allow LCD data endianness to be configured
Modified paths:
  • /embios/trunk/drawing.S (modified) (history)
  • /embios/trunk/target/ipodnano2g/target.h (modified) (history)

Diff [purge]

Index: embios/trunk/drawing.S
@@ -136,10 +136,15 @@
137137 mov r12, r4
138138 sub r0, r0, r2
139139 renderbmp_pixel:
 140+#ifdef LCD_BIGENDIAN
140141 ldrb lr, [r1,#1]
141142 strb lr, [r0], #1
142143 ldrb lr, [r1], #2
143144 strb lr, [r0], #1
 145+#else
 146+ ldrh lr, [r1], #2
 147+ strh lr, [r0], #2
 148+#endif
144149 subs r12, r12, #1
145150 bne renderbmp_pixel
146151 tst r4, #1
Index: embios/trunk/target/ipodnano2g/target.h
@@ -47,6 +47,7 @@
4848 #define LCD_HEIGHT 132
4949 #define LCD_FORMAT rgb565
5050 #define LCD_BYTESPERPIXEL 2
 51+#define LCD_BIGENDIAN
5152 #define LCDCONSOLE_FGCOLOR 0
5253 #define LCDCONSOLE_BGCOLOR -1
5354