0.96寸4针OLED驱动(模拟iic协议)STM32HAL库

【0.96寸4针OLED驱动(模拟iic协议)STM32HAL库】OLED
采用4针,IIC通信协议的0.96寸OLED屏幕;显示中文需要取模软件;

  • Function List:
    1. void I2C_Configuration(void) – 配置CPU的硬件I2C
    1. void I2C_WriteByte(uint8_t addr,uint8_t data) – 向寄存器地址写一个byte的数据
    1. void WriteCmd(unsigned char I2C_Command) – 写命令
    1. void WriteDat(unsigned char I2C_Data) – 写数据
    1. void OLED_Init(void) – OLED屏初始化
    1. void OLED_SetPos(unsigned char x, unsigned char y) – 设置起始点坐标
    1. void OLED_Fill(unsigned char fill_Data) – 全屏填充
    1. void OLED_CLS(void) – 清屏
    1. void OLED_ON(void) – 唤醒
    1. void OLED_OFF(void) – 睡眠
    1. void OLED_ShowStr(unsigned char x, unsigned char y, unsigned char ch[], unsigned char TextSize) – 显示字符串(字体大小有68和816两种)
    1. void OLED_ShowCN(unsigned char x, unsigned char y, unsigned char N) – 显示中文(中文需要先取模,然后放到codetab.h中)
    1. void OLED_DrawBMP(unsigned char x0,unsigned char y0,unsigned char x1,unsigned char y1,unsigned char BMP[]) – BMP图片
在这里插入代码片

    推荐阅读