GeBalanceBot/4.WHEELTEC B570 平衡小车源码(库函数精.../MiniBalance_HARDWARE/OLED/oled.h

51 lines
1.4 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/***********************************************
公司:轮趣科技(东莞)有限公司
品牌WHEELTEC
官网wheeltec.net
淘宝店铺shop114407458.taobao.com
速卖通: https://minibalance.aliexpress.com/store/4455017
版本5.7
修改时间2021-04-29
Brand: WHEELTEC
Website: wheeltec.net
Taobao shop: shop114407458.taobao.com
Aliexpress: https://minibalance.aliexpress.com/store/4455017
Version:5.7
Update2021-04-29
All rights reserved
***********************************************/
#ifndef __OLED_H
#define __OLED_H
#include "sys.h"
//-----------------OLED端口定义----------------
#define OLED_RST_Clr() PBout(3)=0 //RST
#define OLED_RST_Set() PBout(3)=1 //RST
#define OLED_RS_Clr() PAout(15)=0 //DC
#define OLED_RS_Set() PAout(15)=1 //DC
#define OLED_SCLK_Clr() PBout(5)=0 //SCL
#define OLED_SCLK_Set() PBout(5)=1 //SCL
#define OLED_SDIN_Clr() PBout(4)=0 //SDA
#define OLED_SDIN_Set() PBout(4)=1 //SDA
#define OLED_CMD 0 //写命令
#define OLED_DATA 1 //写数据
//OLED控制用函数
void OLED_WR_Byte(u8 dat,u8 cmd);
void OLED_Display_On(void);
void OLED_Display_Off(void);
void OLED_Refresh_Gram(void);
void OLED_Init(void);
void OLED_Clear(void);
void OLED_DrawPoint(u8 x,u8 y,u8 t);
void OLED_ShowChar(u8 x,u8 y,u8 chr,u8 size,u8 mode);
void OLED_ShowNumber(u8 x,u8 y,u32 num,u8 len,u8 size);
void OLED_ShowString(u8 x,u8 y,const u8 *p);
#endif