const unsigned int ysdz_1616[][32]= /* “硬石开发板”中文字模,大小:16*16 */
{
{0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x0F,0x38,0x14,0x90,0x2F,0x90,0x2C,0xE8,0x14,0x38,0x1D,0xAC,0x06,0x3A,0x03,0x09,0x02,0x00,0x0D,0x00,0x38,0x00,0x00,0x00,0x00},/*"硬",0*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xE0,0x00,0x00,0x01,0x80,0x00,0x80,0x00,0x40,0x18,0xE0,0x37,0x50,0x10,0x48,0x10,0x44,0x1C,0x82,0x03,0x00,0x00,0x00,0x00},/*"石",1*/
{0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x0F,0x60,0x02,0x40,0x02,0x40,0x32,0xFE,0x0F,0x20,0x02,0x20,0x02,0x20,0x02,0x10,0x02,0x10,0x02,0x08,0x02,0x00,0x00,0x00,0x00},/*"开",2*/
{0x00,0x00,0x80,0x00,0x00,0x0D,0x80,0x18,0xA0,0x00,0x90,0x0F,0xF0,0x00,0x40,0x00,0xC0,0x07,0xA0,0x04,0x20,0x03,0x10,0x02,0x08,0x05,0xC4,0x1C,0x00,0x70,0x00,0x00},/*"发",3*/
{0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x0C,0x10,0x02,0x10,0x01,0x38,0x01,0x14,0x1D,0x38,0x0B,0xD8,0x0A,0x94,0x0C,0x92,0x0C,0x50,0x1A,0x30,0x70,0x10,0x00,0x00,0x00},/*"板",4*/
};
const unsigned int ysdz_2424[][72]= /* “硬石开发板”中文字模,大小:16*16 */
{
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0xF3,0x00,0xF0,0x80,0x00,0xC0,0x80,0x1F,0x40,0xF8,0x18,0x40,0x88,0x08,0x60,0xF0,0x09,0xF0,0x93,0x0C,0x30,0x93,0x07,0x30,0xF1,0x00,0x38,0x89,0x00,0xE8,0xD1,0x00,0x24,0x60,0x00,0x22,0xE0,0x00,0x00,0xA0,0x01,0x00,0x18,0x07,0x00,0x00,0x1E,0x00,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00},/*"硬",0*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0xFC,0x07,0x00,0x1F,0x00,0x00,0x10,0x00,0x00,0x38,0x00,0x00,0x18,0x00,0x00,0x0C,0x00,0x00,0x04,0x00,0x00,0x06,0x04,0x00,0xC3,0x0F,0x80,0x3F,0x1E,0x80,0x06,0x0C,0x40,0x06,0x06,0x20,0x06,0x06,0x10,0x04,0x06,0x0C,0xFC,0x07,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"石",1*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x07,0xC0,0xFF,0x01,0x80,0x43,0x00,0x00,0x42,0x00,0x00,0x42,0x00,0x00,0x42,0x10,0x00,0xF2,0x3F,0xFC,0x4F,0x00,0x00,0x42,0x00,0x00,0x43,0x00,0x00,0x41,0x00,0x00,0x41,0x00,0x80,0x41,0x00,0x80,0x40,0x00,0x40,0x40,0x00,0x20,0x40,0x00,0x10,0x40,0x00,0x00,0x40,0x00,0x00,0x40,0x00,0x00,0x00,0x00},/*"开",2*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x18,0x00,0x00,0x18,0x07,0x80,0x18,0x04,0x80,0x09,0x00,0x80,0x88,0x03,0xC0,0xFC,0x00,0xC0,0x07,0x00,0x40,0x04,0x00,0x00,0xC6,0x00,0x00,0xFA,0x01,0x00,0xC7,0x00,0x00,0xCD,0x00,0x80,0x59,0x00,0x80,0x70,0x00,0x40,0x60,0x00,0x60,0xF0,0x00,0x30,0x8C,0x03,0x08,0x02,0x0F,0x00,0x00,0x3E,0x00,0x00,0x00,0x00,0x00,0x00},/*"发",3*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0xC0,0x00,0x03,0xC0,0x80,0x03,0xC0,0xC0,0x00,0x40,0x38,0x00,0x40,0x12,0x00,0xC0,0x13,0x00,0x7E,0x10,0x02,0x40,0xD0,0x07,0x60,0x30,0x02,0xE0,0x33,0x02,0x50,0x5A,0x03,0x50,0x88,0x01,0x48,0x88,0x01,0x44,0x84,0x03,0x42,0xC6,0x06,0x40,0x21,0x1E,0x40,0x00,0x3C,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"板",4*/
};
/**
* 函数功能: 在 LCD 显示器上显示一个英文字符
* 输入参数: usX:在特定扫描方向下字符的起始X坐标
* usY :在特定扫描方向下该点的起始Y坐标
* index: 显示在中文字模中第index个中文
* usColor_Background :选择英文字符的背景色
* usColor_Foreground :选择英文字符的前景色
* font:字体选择
* 可选值:USB_FONT_16 :16号字体
* USB_FONT_24 :24号字体
* 返 回 值: 无
* 说 明:该函数必须与ascii.h内容对应使用
*/
void LCD_DispCHAR_CH( uint16_t usX, uint16_t usY,uint8_t index,uint16_t usColor_Background, uint16_t usColor_Foreground,USB_FONT_Typdef font)
{
uint8_t ucTemp, ucPage, ucColumn;
/* 检查输入参数是否合法 */
assert_param(IS_FONT(font));
if(font==USB_FONT_16)
{
LCD_OpenWindow(usX,usY,16,16);
LCD_WRITE_CMD(0x2C);
for(ucPage=0;ucPage<32;ucPage++)
{
ucTemp=ysdz_1616[index][ucPage];
for(ucColumn=0;ucColumn<8;ucColumn++)
{
if(ucTemp&0x01)
LCD_WRITE_DATA(usColor_Foreground);
else
LCD_WRITE_DATA(usColor_Background);
ucTemp >>= 1;
}
}
}
else
{
LCD_OpenWindow(usX,usY,24,24);
LCD_WRITE_CMD(0x2C);
for(ucPage=0;ucPage<72;ucPage++)
{
ucTemp=ysdz_2424[index][ucPage];
for(ucColumn=0;ucColumn<8;ucColumn++)
{
if(ucTemp&0x01)
LCD_WRITE_DATA(usColor_Foreground);
else
LCD_WRITE_DATA(usColor_Background);
ucTemp >>= 1;
}
}
}
}
/**
* 函数功能: 在 LCD 显示器上显示一个英文字符串
* 输入参数: usX:在特定扫描方向下字符的起始X坐标
* usY :在特定扫描方向下该点的起始Y坐标
* start:在中文字模的顺序开始显示
* number:要显示的中文个数
* usColor_Background :选择英文字符的背景色
* usColor_Foreground :选择英文字符的前景色
* font:字体选择
* 可选值:USB_FONT_16 :16号字体
* USB_FONT_24 :24号字体
* 返 回 值: 无
* 说 明:该函数必须与ascii.h内容对应使用
*/
void LCD_DispString_CH( uint16_t usX, uint16_t usY,uint8_t start,uint8_t number,uint16_t usColor_Background, uint16_t usColor_Foreground,USB_FONT_Typdef font)
{
uint8_t i=start;
/* 检查输入参数是否合法 */
assert_param(IS_FONT(font));
do
{
if(font==USB_FONT_16)
{
if((usX+16)>LCD_DEFAULT_WIDTH)
{
usX = 0;
usY += 16;
}
if((usY+16)>LCD_DEFAULT_HEIGTH)
{
usX=0;
usY=0;
}
LCD_DispCHAR_CH(usX,usY,i,usColor_Background,usColor_Foreground,USB_FONT_16);
usX+=16;
}
else
{
if((usX+24)>LCD_DEFAULT_WIDTH)
{
usX=0;
usY+=24;
}
if((usY+24)>LCD_DEFAULT_HEIGTH)
{
usX=0;
usY=0;
}
LCD_DispCHAR_CH(usX,usY,i,usColor_Background,usColor_Foreground,USB_FONT_24);
usX+=24;
}
i++;
}while(i<(start+number));
}