View Single Post
Old 12-05-2011, 11:47 AM   #15
friend_1990
Đệ tử 3 túi
 
Tham gia ngày: Apr 2011
Bài gửi: 56
:
void lay_font(char * textptr);????????? dòng này khai báo trong ngặoc là gì vậy bạn


for(m=0;m<=63;m++)
{
n=hien_thi[m];
n=~n;??????????????????? toán tử ~ là gì nhỉ?
xuat(n);
delay_us(1000);

}




giải thích tiếng việt dùm mình void lấy font dc ko bạn những lệnh dưới mình chưa sử dung bao giờ nên đọc không hiểu cho lắm


void lay_font(char * textptr)
{
int i, j;//
BYTE pixelData[5]; // Stores character data

for(i=0; textptr[i] != '\0'; ++i ) // Loop through the passed string
{
if(textptr[i] == '#')
break;
if(textptr[i] < 'S') // Checks if the letter is in the first text array
memcpy(pixelData, TEXT[textptr[i]-' '], 5);
else if(textptr[i] <= '~') // Check if the letter is in the second array
memcpy(pixelData, TEXT2[textptr[i]-'S'], 5);
else
memcpy(pixelData, TEXT[0], 5); // Default to space
for(j=0;j<=4;j++)
{
hien_thi[chieu_dai]=(pixelData[j]);
chieu_dai++;
}

}
}

[/code][/QUOTE]
friend_1990 vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn