mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
92 lines
2.8 KiB
C
92 lines
2.8 KiB
C
|
/*********************************************************************************************************************
|
|||
|
* COPYRIGHT NOTICE
|
|||
|
* Copyright (c) 2020,<EFBFBD><EFBFBD><EFBFBD>ɿƼ<EFBFBD>
|
|||
|
* All rights reserved.
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQȺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<EFBFBD><EFBFBD>824575535
|
|||
|
*
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɿƼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD>;<EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD>ӭ<EFBFBD><EFBFBD>λʹ<EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>뱣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɿƼ<EFBFBD><EFBFBD>İ<EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*
|
|||
|
* @file OLED
|
|||
|
* @company <EFBFBD>ɶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɿƼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾
|
|||
|
* @author <EFBFBD><EFBFBD><EFBFBD>ɿƼ<EFBFBD>(QQ3184284598)
|
|||
|
* @version <EFBFBD>鿴doc<EFBFBD><EFBFBD>version<EFBFBD>ļ<EFBFBD> <EFBFBD>汾˵<EFBFBD><EFBFBD>
|
|||
|
* @Software ADS v1.2.2
|
|||
|
* @Target core TC264D
|
|||
|
* @Taobao https://seekfree.taobao.com/
|
|||
|
* @date 2020-3-23
|
|||
|
* @note
|
|||
|
<EFBFBD><EFBFBD><EFBFBD>߶<EFBFBD><EFBFBD>壺
|
|||
|
------------------------------------
|
|||
|
OLEDҺ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>Ƭ<EFBFBD><EFBFBD>
|
|||
|
D0 <EFBFBD>鿴SEEKFREE_OLED<EFBFBD>ļ<EFBFBD><EFBFBD>ڵ<EFBFBD>OLED_SCL_PIN <EFBFBD>궨<EFBFBD><EFBFBD>
|
|||
|
D1 <EFBFBD>鿴SEEKFREE_OLED<EFBFBD>ļ<EFBFBD><EFBFBD>ڵ<EFBFBD>OLED_SDA_PIN <EFBFBD>궨<EFBFBD><EFBFBD>
|
|||
|
RES <EFBFBD>鿴SEEKFREE_OLED<EFBFBD>ļ<EFBFBD><EFBFBD>ڵ<EFBFBD>OLED_RST_PIN <EFBFBD>궨<EFBFBD><EFBFBD>
|
|||
|
DC <EFBFBD>鿴SEEKFREE_OLED<EFBFBD>ļ<EFBFBD><EFBFBD>ڵ<EFBFBD>OLED_DC_PIN <EFBFBD>궨<EFBFBD><EFBFBD>
|
|||
|
CS <EFBFBD>鿴SEEKFREE_OLED<EFBFBD>ļ<EFBFBD><EFBFBD>ڵ<EFBFBD>OLED_CS_PIN <EFBFBD>궨<EFBFBD><EFBFBD>
|
|||
|
------------------------------------
|
|||
|
********************************************************************************************************************/
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#ifndef _SEEKFREE_OLED_h
|
|||
|
#define _SEEKFREE_OLED_h
|
|||
|
|
|||
|
|
|||
|
#include "common.h"
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
//----<2D>궨<EFBFBD><EAB6A8>OLED<45><44><EFBFBD><EFBFBD>----
|
|||
|
#define OLED_SCL_PIN P15_3
|
|||
|
#define OLED_SDA_PIN P15_5
|
|||
|
#define OLED_RST_PIN P15_1
|
|||
|
#define OLED_DC_PIN P15_0
|
|||
|
#define OLED_CS_PIN P15_2
|
|||
|
|
|||
|
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|||
|
//0 <20><><EFBFBD><EFBFBD>ģʽ
|
|||
|
//1 <20><><EFBFBD><EFBFBD>ģʽ <20><>ת180
|
|||
|
#define OLED_DISPLAY_DIR 0
|
|||
|
|
|||
|
#if (0==OLED_DISPLAY_DIR || 1==OLED_DISPLAY_DIR)
|
|||
|
#define X_WIDTH 128
|
|||
|
#define Y_WIDTH 64
|
|||
|
|
|||
|
#else
|
|||
|
#error "OLED_DISPLAY_DIR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
|
|||
|
#endif
|
|||
|
|
|||
|
#define Brightness 0x7f //<2F><><EFBFBD><EFBFBD>OLED<45><44><EFBFBD><EFBFBD> Խ<><D4BD>Խ<EFBFBD><D4BD> <20><>Χ0-0XFF
|
|||
|
#define XLevelL 0x00
|
|||
|
#define XLevelH 0x10
|
|||
|
#define XLevel ((XLevelH&0x0F)*16+XLevelL)
|
|||
|
#define Max_Column 128
|
|||
|
#define Max_Row 64
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
void oled_init(void);
|
|||
|
void oled_fill(uint8 dat);
|
|||
|
void oled_set_pos(uint8 x, uint8 y);
|
|||
|
void oled_putpixel(uint8 x,uint8 y,uint8 data1);
|
|||
|
void oled_clrpixel(uint8 x,uint8 y);
|
|||
|
void oled_p6x8str(uint8 x,uint8 y,const int8 ch[]);
|
|||
|
void oled_p8x16str(uint8 x,uint8 y,const int8 ch[]);
|
|||
|
void oled_uint16(uint8 x, uint8 y, uint16 num);
|
|||
|
void oled_int16(uint8 x, uint8 y, int16 num);
|
|||
|
void oled_printf_int32(uint16 x,uint16 y,int32 dat,uint8 num);
|
|||
|
void oled_printf_float(uint16 x,uint16 y,double dat,uint8 num,uint8 pointnum);
|
|||
|
void oled_dis_bmp(uint16 high, uint16 width, uint8 *p,uint8 value);
|
|||
|
void oled_print_chinese(uint8 x, uint8 y, uint8 size, const uint8 *p, uint8 len);
|
|||
|
|
|||
|
|
|||
|
/********************************************************************/
|
|||
|
|
|||
|
#endif
|