Skip to content
Permalink
Browse files

Added DISABLE_CHAR_ROTATING flag to UTFT

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 36f59887b5189857f0bf6ae72ef4211c834fbf2a
Showing with 9 additions and 0 deletions.
  1. +4 −0 firmware/garage/UTFT/HW_MSP430FR5739.h
  2. +5 −0 firmware/garage/UTFT/UTFT.cpp
@@ -1,3 +1,7 @@

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

// *** Hardwarespecific functions ***
void UTFT::_hw_special_init()
{
@@ -976,10 +976,15 @@ void UTFT::print(char *st, int x, int y, int deg)
}

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)
printChar(*st++, x + (i*(cfont.x_size)), y);
else
rotateChar(*st++, x, y, i, deg);
#endif
}

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

0 comments on commit 36f5988

Please sign in to comment.
You can’t perform that action at this time.