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,<2C><><EFBFBD>ɿƼ<C9BF>
|
||
* All rights reserved.
|
||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQȺ<51><C8BA><EFBFBD><EFBFBD>Ⱥ<EFBFBD><C8BA>824575535
|
||
*
|
||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɿƼ<C9BF><C6BC><EFBFBD><EFBFBD>У<EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>;<EFBFBD><CDBE>
|
||
* <20><>ӭ<EFBFBD><D3AD>λʹ<CEBB>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>뱣<EFBFBD><EBB1A3><EFBFBD><EFBFBD><EFBFBD>ɿƼ<C9BF><C6BC>İ<EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
*
|
||
* @file OLED
|
||
* @company <09>ɶ<EFBFBD><C9B6><EFBFBD><EFBFBD>ɿƼ<C9BF><C6BC><EFBFBD><EFBFBD><EFBFBD>˾
|
||
* @author <09><><EFBFBD>ɿƼ<C9BF>(QQ3184284598)
|
||
* @version <09>鿴doc<6F><63>version<6F>ļ<EFBFBD> <20>汾˵<E6B1BE><CBB5>
|
||
* @Software ADS v1.2.2
|
||
* @Target core TC264D
|
||
* @Taobao https://seekfree.taobao.com/
|
||
* @date 2020-3-23
|
||
* @note
|
||
<09><><EFBFBD>߶<EFBFBD><DFB6>壺
|
||
------------------------------------
|
||
OLEDҺ<44><D2BA> <20><>Ƭ<EFBFBD><C6AC>
|
||
D0 <09>鿴SEEKFREE_OLED<45>ļ<EFBFBD><C4BC>ڵ<EFBFBD>OLED_SCL_PIN <20>궨<EFBFBD><EAB6A8>
|
||
D1 <09>鿴SEEKFREE_OLED<45>ļ<EFBFBD><C4BC>ڵ<EFBFBD>OLED_SDA_PIN <20>궨<EFBFBD><EAB6A8>
|
||
RES <09>鿴SEEKFREE_OLED<45>ļ<EFBFBD><C4BC>ڵ<EFBFBD>OLED_RST_PIN <20>궨<EFBFBD><EAB6A8>
|
||
DC <09>鿴SEEKFREE_OLED<45>ļ<EFBFBD><C4BC>ڵ<EFBFBD>OLED_DC_PIN <20>궨<EFBFBD><EAB6A8>
|
||
CS <09>鿴SEEKFREE_OLED<45>ļ<EFBFBD><C4BC>ڵ<EFBFBD>OLED_CS_PIN <20>궨<EFBFBD><EAB6A8>
|
||
------------------------------------
|
||
********************************************************************************************************************/
|
||
|
||
|
||
|
||
#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
|