init
This commit is contained in:
39
yaokon/Core/Inc/oled_ssd1306.h
Normal file
39
yaokon/Core/Inc/oled_ssd1306.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
@作者:你遇了我
|
||||
@联系邮箱:321640253@qq.com
|
||||
@文件:oled_ssd1306.h
|
||||
@描述:抽象ssd1306驱动 oled屏幕,最大分辨率128*64
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef _OLED_SSD1306_H
|
||||
#define _OLED_SSD1306_H
|
||||
|
||||
/*导入你的头文件*/
|
||||
#include "spi.h"
|
||||
#include "gpio.h"
|
||||
/*导入你的头文件*/
|
||||
|
||||
|
||||
#include "stdint.h"
|
||||
typedef uint8_t oled_uint8;
|
||||
|
||||
/*
|
||||
*OLED的状态
|
||||
*/
|
||||
typedef enum _OLED_STATE{
|
||||
OLED_OK, //状态正确
|
||||
OLED_ERROR, //状态异常
|
||||
} OLED_STATE;
|
||||
|
||||
/*
|
||||
*命令
|
||||
*/
|
||||
|
||||
|
||||
/*函数区*/
|
||||
OLED_STATE oled_write(oled_uint8 *data);
|
||||
OLED_STATE oled_init(void);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user