/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Slight improvement to LCD_DisplayChar function

Username:     
Password:     
             

Forum

# 1   2008-02-02 22:12:36 Slight improvement to LCD_DisplayChar function

TroyC3
Member
Registered: 2007-10-13
Posts: 10

Slight improvement to LCD_DisplayChar function

This change will remove the runtime multiplication.

First change the Character array from

static const u8 AsciiDotsTable[95 * 14 ] = {

to this

static const u8 AsciiDotsTable [95][14] = {

then change the call in LCD_DisplayChar
from

LCD_DrawChar( x, y, 7, (u8*)&AsciiDotsTable[ (Ascii-32) * 14 ], TextColor, BGndColor, CharMagniCoeff );

To this

LCD_DrawChar( x, y, 7, (u8*)&AsciiDotsTable[ (Ascii-32) ][0], TextColor, BGndColor, CharMagniCoeff );

Troy wink

Offline

 

# 2   2008-02-03 06:17:32 Slight improvement to LCD_DisplayChar function

TroyC3
Member
Registered: 2007-10-13
Posts: 10

Re: Slight improvement to LCD_DisplayChar function

Okay my bad.

There is no improvement in the above code change, both produce the same assembly.

Troy hmm

Offline

 

Board footer