Skip to content

Commit

Permalink
Added DISABLE_CHAR_ROTATING flag to UTFT
Browse files Browse the repository at this point in the history
Character rotating takes huge amount of memory on msp430fr5739, now it is possible to disable this feature to save memory.
  • Loading branch information
andresv committed Apr 7, 2013
1 parent c562da5 commit 36f5988
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions firmware/garage/UTFT/HW_MSP430FR5739.h
@@ -1,3 +1,7 @@

// *** Character rotating takes huge amount of code space, lets disable it for this platform ***
#define DISABLE_CHAR_ROTATING

// *** Hardwarespecific functions *** // *** Hardwarespecific functions ***
void UTFT::_hw_special_init() void UTFT::_hw_special_init()
{ {
Expand Down
5 changes: 5 additions & 0 deletions firmware/garage/UTFT/UTFT.cpp
Expand Up @@ -976,10 +976,15 @@ void UTFT::print(char *st, int x, int y, int deg)
} }


for (i=0; i<stl; i++) for (i=0; i<stl; i++)
#ifdef DISABLE_CHAR_ROTATING
#pragma message("print char rotating disabled")
printChar(*st++, x + (i*(cfont.x_size)), y);
#else
if (deg==0) if (deg==0)
printChar(*st++, x + (i*(cfont.x_size)), y); printChar(*st++, x + (i*(cfont.x_size)), y);
else else
rotateChar(*st++, x, y, i, deg); rotateChar(*st++, x, y, i, deg);
#endif
} }


void UTFT::print(String st, int x, int y, int deg) void UTFT::print(String st, int x, int y, int deg)
Expand Down

0 comments on commit 36f5988

Please sign in to comment.