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

51 lines
1.4 KiB
C
Raw Normal View History

2024-01-14 19:28:00 +08:00
/***********************************************
<EFBFBD><EFBFBD>˾<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޹<EFBFBD>˾
Ʒ<EFBFBD>ƣ<EFBFBD>WHEELTEC
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>wheeltec.net
<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>̣<EFBFBD>shop114407458.taobao.com
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ: https://minibalance.aliexpress.com/store/4455017
<EFBFBD><EFBFBD><EFBFBD>5.7
<EFBFBD>޸<EFBFBD>ʱ<EFBFBD>2021-04-29
Brand: WHEELTEC
Website: wheeltec.net
Taobao shop: shop114407458.taobao.com
Aliexpress: https://minibalance.aliexpress.com/store/4455017
Version:5.7
Update<EFBFBD><EFBFBD>2021-04-29
All rights reserved
***********************************************/
#ifndef __OLED_H
#define __OLED_H
#include "sys.h"
//-----------------OLED<45>˿ڶ<CBBF><DAB6><EFBFBD>----------------
#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 //д<><D0B4><EFBFBD><EFBFBD>
#define OLED_DATA 1 //д<><D0B4><EFBFBD><EFBFBD>
//OLED<45><44><EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD><C3BA><EFBFBD>
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