Initial import of STM32 IoT sensor node
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
#ifndef __OLED_H
|
||||
#define __OLED_H
|
||||
|
||||
#include "stdlib.h"
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned int u32;
|
||||
|
||||
// 打开显示屏
|
||||
void oled_display_on(void);
|
||||
|
||||
// 关闭显示屏(省电)
|
||||
void oled_display_off(void);
|
||||
|
||||
// 初始化 OLED
|
||||
void oled_init(void);
|
||||
|
||||
// 清空屏幕
|
||||
void oled_clear_frame_buffer(void);
|
||||
|
||||
void oled_clear(void);
|
||||
|
||||
// 绘制点
|
||||
void oled_draw_point(u8 x, u8 y, u8 val);
|
||||
|
||||
// 绘制矩形
|
||||
void oled_draw_rect(u8 x0, u8 y0, u8 x1, u8 y1);
|
||||
|
||||
// 绘制填充矩形
|
||||
void oled_fill_rect(u8 x0, u8 y0, u8 x1, u8 y1);
|
||||
|
||||
// 绘制填充圆形
|
||||
void oled_fill_circle(u8 x, u8 y, u8 r);
|
||||
|
||||
// 使用某个值填充屏幕
|
||||
void oled_fill(u8 fill_Data);
|
||||
|
||||
// 在屏幕绘制图片
|
||||
void oled_draw_picture(const u8 * buf);
|
||||
|
||||
// 将FrameBuffer复制到屏幕上
|
||||
void oled_refresh_framebuffer(void);
|
||||
|
||||
// 写6x8的英文
|
||||
void oled_draw_text8(u8 x, u8 y, const char *text);
|
||||
|
||||
// 写8x16的英文或8x16的中文
|
||||
void oled_draw_text16(u8 x, u8 y, const char *text);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user