Comments needed

Hello everyone,I am really new to programming.I have a C program I need to understand and modify,can you please comment on them ..what it is actually doing??how is it working??
Is it possible to change the code so that i am able to send a circle with some definite radius to the display panel?If not,Is there any way you can help me to write the code...
Please Looking for a detailed reply ....thank you


#include
#include "2410addr.h"
#include "2410lib.h"
#include "def.h"
#include "lcdlib.h"
#include "glib.h"
#include "lcd.h"
#ifdef Ascii8x16
extern INT8U g_auc_Ascii8x16[];
void Lcd_DspAscII8X16(U16 x0, U16 y0, INT8U ForeColor, INT8U * s);
#endif





void Lcd_Test(void)
{
int b = 1023;
char s[3];
s[3]=b%10 + '0';
b=b/10;
s[2]=b%10 + '0';
b=b/10;
s[1]=b%10 + '0';
b=b/10;
s[0]=b%10 + '0';
int x=strlen(&s);

#ifdef Ascii8x16
Lcd_DspAscII8X16(100,50,BLACK, &s);
#endif
}


#ifdef Ascii8x16
void Lcd_DspAscII8X16(U16 x0, U16 y0, INT8U ForeColor, INT8U * s)
{
INT16 i,j,k,x,y,xx;
INT8U qm;
S32 ulOffset;
INT8 ywbuf[16],temp[2];

for(i = 0; i < strlen((const char*)s); i++)
{
if((INT8U)*(s+i) >= 161)
{
temp[0] = *(s + i);
temp[1] = '';
return;
}
else
{
qm = *(s+i);
ulOffset = (S32)(qm) * 16; for (j = 0; j < 16; j ++)
{
ywbuf[j] = g_auc_Ascii8x16[ulOffset + j];
}

for(y = 0; y < 16; y++)
{
for(x = 0; x < 8; x++)
{
k = x % 8;
if (ywbuf[y] & (0x80 >> k))
{
xx = x0 + x + i*8;
PutPixel( xx, y + y0, (INT8U)ForeColor);
}
}
}
}
}
}
#endif
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories