📄 oled_ssd1339.h
字号:
#include "..\shortcut.h"
typedef struct
{
uchar x0;
uchar x1;
uchar y0;
uchar y1;
}Oled_Type_Rect;
typedef struct
{
uchar x;
uchar y;
}Oled_Type_Point;
#define RED 0xf800
#define GREEN 0x07e0
#define BLUE 0x001f
#define WHITE 0xffff
#define BLACK 0x0000
//======================================================
//LCM的控制脚定义
#define LCD_IO_DIR_OUT IODIR0 = IODIR0 | 0x00ffff00
#define LCD_RESET_1 IOSET0 = IOSET0 | (1<<17) //RES
#define LCD_RS_1 IOSET0 = IOSET0 | (1<<18) //D/C
#define LCD_DS_1 IOSET0 = IOSET0 | (1<<19) //RD
#define LCD_CS_1 IOSET0 = IOSET0 | (1<<16) //CS
#define LCD_WR_1 IOSET0 = IOSET0 | (1<<20) //WR
#define LCD_RESET_0 IOCLR0 = IOCLR0 | (1<<17) //RES
#define LCD_RS_0 IOCLR0 = IOCLR0 | (1<<18) //D/C
#define LCD_DS_0 IOCLR0 = IOCLR0 | (1<<19) //RD
#define LCD_CS_0 IOCLR0 = IOCLR0 | (1<<16) //CS
#define LCD_WR_0 IOCLR0 = IOCLR0 | (1<<20) //WR
#define LCD_DATA(ch) IOCLR0 = IOCLR0 | 0x0000ff00;\
IOSET0 = IOSET0 | ((0x000000ff & ch) << 8)
// IOSET0 = IOSET0 | ((0x000000ff & ch) << 16)
//========================================================
//定义函数原型
void Oled_Init(void);
void Delay(uint k);
void Oled_DispOn(void);
void Oled_DispOff(void);
void Oled_DispOneColor(int Color);
void Oled_DispClear(void);
void Oled_DispPic65K(uchar *str);
void Oled_DrawCircle(Oled_Type_Point *pPoint,uchar Radius,uint LineColor,uint FillColor,uchar FillFlag);
void Oled_DrawRect(Oled_Type_Rect *pRect,uint LineColor,uint FillColor,uchar FillFlag);
void Oled_DrawLine(Oled_Type_Point *pPoint0, Oled_Type_Point *pPoint1,uint LineColor);
#ifndef _LPC213X_LCF_H_
#define _LPC213X_LCF_H_
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -