1 Star 4 Fork 8

vtor3478/vtor_elec_module

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
oled.h 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
#ifndef __OLED_H__
#define __OLED_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "vtor_elec_module_config.h"
#ifdef __VTOR_OLED__
#define OLED_CMD 0x80 //写命令
#define OLED_DATA 0x40 //写数据
#define OLED_PAINT_MODE_NORMAL 1
#define OLED_PAINT_MODE_INVERT 0
struct OLED_PAINT
{
unsigned char size;
unsigned char mode;
};
extern struct OLED_PAINT* pOledPaint;
#ifdef __OLED_GRAM__
void OLED_ClearPoint(unsigned char x,unsigned char y);
#endif
void OLED_ColorTurn(unsigned char i);
void OLED_DisplayTurn(unsigned char i);
void OLED_WR_Byte(unsigned char regData,unsigned char regAddr);
void OLED_DisPlay_On(void);
void OLED_DisPlay_Off(void);
#ifdef __OLED_GRAM__
void OLED_Refresh(void);
void OLED_ClearGRam(void);
#endif
void OLED_Clear(void);
#ifdef __OLED_GRAPH__
void OLED_DrawPoint(unsigned char x,unsigned char y,unsigned char t);
void OLED_DrawLine(unsigned char x1,unsigned char y1,unsigned char x2,unsigned char y2);
void OLED_DrawCircle(unsigned char x,unsigned char y,unsigned char r);
#endif
void OLED_ShowChar(unsigned char x,unsigned char y,unsigned char chr);
void OLED_ShowString(unsigned char x,unsigned char y,unsigned char *chr);
#ifdef __OLED_HZK__
void OLED_ShowChinese(unsigned char x,unsigned char y,unsigned char num);
#endif
#ifdef __OLED_EXTRA__
void OLED_ScrollDisplay(unsigned char num,unsigned char space);
void OLED_ShowPicture(unsigned char x,unsigned char y,unsigned char sizex,unsigned char sizey,unsigned char BMP[]);
#endif
void OLED_Init(void);
#ifdef __OLED_PRINTF__
void OLED_ShowNum(unsigned char x,unsigned char y,unsigned int num,unsigned char len);
void OLED_Printf(unsigned char x,unsigned char y,char* fmt,...);
void OLED_Printf00(char* fmt,...);
#endif
#ifdef __OLED_LOG__
void OLED_PushLog(unsigned char *log);
void OLED_RefreshLog(void);
#endif
#endif // __VTOR_OLED__
#ifdef __cplusplus
}
#endif
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/vtor3478/vtor_elec_module.git
git@gitee.com:vtor3478/vtor_elec_module.git
vtor3478
vtor_elec_module
vtor_elec_module
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385