📄 character.h
字号:
/*
* $Id: character.h,v 1.2 2003/08/29 03:13:18 casic Exp $
*
* character.h : display characters on LCD
*
* Copyright (C) 2003 ynding ( haoanian@263.net )
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _CHARACTER_H
#define _CHARACTER_H
/*
* display an ascii character
* x,y : coordinate of the start pixel
* ascii_codes : the the bytes serial to be displayed
* the size of the ascii characters is 8*16
* color : the color of the character
*/
void display_ascii(unsigned int x, unsigned int y, unsigned char* ascii_codes, COLOR color);
/*
* display a Chinese character
* x,y : coordinate of the start pixel
* cnc_codes : the bytes serial to be displayed
* the size of the Chinese characters is 16*16
* color : the color of the character
*/
void display_cnc(unsigned int x, unsigned int y, unsigned char* cnc_codes, COLOR color);
/*
* display a string,the string can contain
* not only ascii characters but also Chinese characters
*
* x,y : the beginning coordinate of the string to be displayed
* 0<=x<=39 : each line holds 40 bytes (each byte contain 8 pixels) horizontally
* 0<=y<=14 : each line holds 16 pixels vertically
*
* so the whole LCD can display 40*15 ascii characters,
* or 20*15 Chinese characters
*
* color : the color of the string
*/
void display_string(unsigned int x, unsigned int y, char* str, COLOR color);
#endif /* _CHARACTER_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -