|
#include "stm32f10x.h"
#include "OLED_I2C.h"
#include "delay.h"
int main(void)
{
unsigned char i;
extern const unsigned char BMP1[];
extern const unsigned char BMP2[];
DelayInit();
I2C_Configuration();
OLED_Init();
while(1)
{
OLED_Fill(0xFF);//全屏點(diǎn)亮
DelayS(1);
OLED_Fill(0x00);//全屏滅
DelayS(1);
for(i=0;i<5;i++)
{
OLED_ShowCN(22+i*16,0,i);//測試顯示中文
}
DelayS(1);
OLED_ShowStr(0,4,"Youth time is fleet.",1);//測試6*8字符
OLED_ShowStr(80,6,"Horace",2); //測試8*16字符
DelayS(2);
OLED_CLS();//清屏
OLED_OFF();//測試OLED休眠
DelayS(2);
OLED_ON();//測試OLED休眠后喚醒
OLED_DrawBMP(0,0,128,8,(unsigned char *)BMP2);//測試BMP位圖顯示
DelayS(2);
while(1)
{
for(i=0;i<5;i++)
{
OLED_ShowCN(22+i*16,0,i);//測試顯示中文
}
}
}
}
|
|