From 5efc935a3aa1f0d318c58ef1248dd2c49ef9ab47 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Sun, 18 Sep 2011 19:26:48 +0000 Subject: [PATCH] temp fix for bug fixed in mspgcc LTS but not in ubuntu 11.10 --- MSP-EXP430F5438-CC256x/firmware/hal_lcd.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/MSP-EXP430F5438-CC256x/firmware/hal_lcd.c b/MSP-EXP430F5438-CC256x/firmware/hal_lcd.c index be609e2ca..d73b18f2c 100755 --- a/MSP-EXP430F5438-CC256x/firmware/hal_lcd.c +++ b/MSP-EXP430F5438-CC256x/firmware/hal_lcd.c @@ -623,8 +623,10 @@ void halLcdDrawTextBlock(unsigned int Value) *************************************************************************/ void halLcdPrint( char String[], unsigned char TextStyle) { + int Address; + int LCD_MEM_Add; + int ActualAddress; int i, j, Counter=0, BlockValue; - int Address, LCD_MEM_Add, ActualAddress; int temp; char LookUpChar; @@ -646,6 +648,8 @@ void halLcdPrint( char String[], unsigned char TextStyle) BlockValue = LCD_MEM[ LCD_MEM_Add ]; +#if 0 + // work around a mspgcc bug - fixed in LTS but not in 11.10 yet if (TextStyle & INVERT_TEXT) if (TextStyle & OVERWRITE_TEXT) BlockValue = 0xFFFF - fonts[LookUpChar*13+j]; @@ -657,7 +661,14 @@ void halLcdPrint( char String[], unsigned char TextStyle) BlockValue = fonts[LookUpChar*(FONT_HEIGHT+1) +j]; else BlockValue |= fonts[LookUpChar*(FONT_HEIGHT+1) +j]; - +#else + int offset = j; + while (LookUpChar) { + offset += FONT_HEIGHT + 1; + LookUpChar--; + } + BlockValue |= fonts[offset]; +#endif halLcdDrawBlock( Address, BlockValue); }