mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
181 lines
7.0 KiB
C
181 lines
7.0 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 2.0<EFBFBD><EFBFBD>IPS<EFBFBD><EFBFBD>Ļ
|
|||
|
* @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>壺
|
|||
|
------------------------------------
|
|||
|
ģ<EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD> <EFBFBD><EFBFBD>Ƭ<EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD>
|
|||
|
D0 <EFBFBD>鿴SEEKFREE_IPS200_PARALLEL8.H<EFBFBD>ļ<EFBFBD><EFBFBD>ڵ<EFBFBD>IPS200_D0_PIN <EFBFBD>궨<EFBFBD><EFBFBD>
|
|||
|
D1 <EFBFBD>鿴SEEKFREE_IPS200_PARALLEL8.H<EFBFBD>ļ<EFBFBD><EFBFBD>ڵ<EFBFBD>IPS200_D1_PIN <EFBFBD>궨<EFBFBD><EFBFBD>
|
|||
|
D2 <EFBFBD>鿴SEEKFREE_IPS200_PARALLEL8.H<EFBFBD>ļ<EFBFBD><EFBFBD>ڵ<EFBFBD>IPS200_D2_PIN <EFBFBD>궨<EFBFBD><EFBFBD>
|
|||
|
D3 <EFBFBD>鿴SEEKFREE_IPS200_PARALLEL8.H<EFBFBD>ļ<EFBFBD><EFBFBD>ڵ<EFBFBD>IPS200_D3_PIN <EFBFBD>궨<EFBFBD><EFBFBD>
|
|||
|
D4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S_PIN <EFBFBD>궨<EFBFBD><EFBFBD>
|
|||
|
RST <EFBFBD>鿴SEEKFREE_IPS200_PARALLEL8.H<EFBFBD>ļ<EFBFBD><EFBFBD>ڵ<EFBFBD>IPS200_RST_PIN <EFBFBD>궨<EFBFBD><EFBFBD>
|
|||
|
|
|||
|
<EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
VCC 3.3V<EFBFBD><EFBFBD>Դ
|
|||
|
GND <EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD>240*320
|
|||
|
------------------------------------
|
|||
|
|
|||
|
********************************************************************************************************************/
|
|||
|
|
|||
|
#ifndef _SEEKFREE_IPS200PARALLEL8_H
|
|||
|
#define _SEEKFREE_IPS200PARALLEL8_H
|
|||
|
|
|||
|
#include "common.h"
|
|||
|
#include "SEEKFREE_FONT.h"
|
|||
|
|
|||
|
|
|||
|
//-------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB>SEEKFREE_FONT.h<>ļ<EFBFBD><C4BC>ж<EFBFBD><D0B6><EFBFBD>----------
|
|||
|
//#define RED 0xF800 //<2F><>ɫ
|
|||
|
//#define BLUE 0x001F //<2F><>ɫ
|
|||
|
//#define YELLOW 0xFFE0 //<2F><>ɫ
|
|||
|
//#define GREEN 0x07E0 //<2F><>ɫ
|
|||
|
//#define WHITE 0xFFFF //<2F><>ɫ
|
|||
|
//#define BLACK 0x0000 //<2F><>ɫ
|
|||
|
//#define GRAY 0X8430 //<2F><>ɫ
|
|||
|
//#define BROWN 0XBC40 //<2F><>ɫ
|
|||
|
//#define PURPLE 0XF81F //<2F><>ɫ
|
|||
|
//#define PINK 0XFE19 //<2F><>ɫ
|
|||
|
|
|||
|
|
|||
|
#define IPS200_BGCOLOR WHITE //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|||
|
#define IPS200_PENCOLOR RED //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|||
|
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ѡ<EFBFBD><D1A1>B C D<><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD><CBBF>е<EFBFBD><D0B5><EFBFBD><EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>GPIO<49><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>ٶ<EFBFBD>
|
|||
|
#define IPS200_RD_PIN P15_3
|
|||
|
#define IPS200_WR_PIN P15_5
|
|||
|
#define IPS200_RS_PIN P15_1
|
|||
|
#define IPS200_RST_PIN P15_0
|
|||
|
#define IPS200_CS_PIN P15_2
|
|||
|
#define IPS200_BL_PIN P15_4
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
//D0-D3<44>ĸ<EFBFBD><C4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><C5B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>C0-C3,C1-C4<43>ȵȣ<C8B5>
|
|||
|
//D4-D7<44>ĸ<EFBFBD><C4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><C5B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>B0-B3,B1-B4<42>ȵȡ<C8B5>
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD>ͬ<EFBFBD>˿ڵ<CBBF><DAB5><EFBFBD>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB>D0-D3<44><33>C1-C4<43><34><EFBFBD>ӣ<EFBFBD>D4-D7<44><37>B2-B5<42><35><EFBFBD>ӡ<EFBFBD>
|
|||
|
//<2F>л<EFBFBD><D0BB><EFBFBD><EFBFBD>ź<EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>IPS200_DATA_PORT1<54><31>IPS200_DATA_PORT2<54>궨<EFBFBD><EAB6A8>
|
|||
|
#define IPS200_D0_PIN P11_9
|
|||
|
#define IPS200_D1_PIN P11_10
|
|||
|
#define IPS200_D2_PIN P11_11
|
|||
|
#define IPS200_D3_PIN P11_12
|
|||
|
#define IPS200_D4_PIN P13_0
|
|||
|
#define IPS200_D5_PIN P13_1
|
|||
|
#define IPS200_D6_PIN P13_2
|
|||
|
#define IPS200_D7_PIN P13_3
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶ˿<DDB6><CBBF><EFBFBD><EFBFBD><EFBFBD>PORT<52><54><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD>ź<EFBFBD><C5BA><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>PORT<52><54><EFBFBD>и<EFBFBD><D0B8><EFBFBD>
|
|||
|
#define IPS200_DATA_PORT1 3 //0<><30>P00<30>˿<EFBFBD> 1<><31>P02<30>˿<EFBFBD> 2<><32>P10<31>˿<EFBFBD> 3<><33>P11<31>˿<EFBFBD> 4<><34>P13<31>˿<EFBFBD> 5<><35>P14<31>˿<EFBFBD> 6<><36>P15<31>˿<EFBFBD> 7<><37>P20<32>˿<EFBFBD> 8<><38>P21<32>˿<EFBFBD> 9<><39>P22<32>˿<EFBFBD> 10<31><30>P23<32>˿<EFBFBD> 11<31><31>P32<33>˿<EFBFBD> 12<31><32>P33<33>˿<EFBFBD>
|
|||
|
|
|||
|
#define IPS200_DATAPORT1 (((Ifx_P *)IfxPort_cfg_indexMap[IPS200_DATA_PORT1].module)->OUT.U) //<2F>궨<EFBFBD><EAB6A8><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>GPIO<49><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>
|
|||
|
#define DATA_START_NUM1 (IPS200_D0_PIN&0x1f) //<2F>궨<EFBFBD><EAB6A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
|
|||
|
#define IPS200_DATA_PORT2 4 //0<><30>P00<30>˿<EFBFBD> 1<><31>P02<30>˿<EFBFBD> 2<><32>P10<31>˿<EFBFBD> 3<><33>P11<31>˿<EFBFBD> 4<><34>P13<31>˿<EFBFBD> 5<><35>P14<31>˿<EFBFBD> 6<><36>P15<31>˿<EFBFBD> 7<><37>P20<32>˿<EFBFBD> 8<><38>P21<32>˿<EFBFBD> 9<><39>P22<32>˿<EFBFBD> 10<31><30>P23<32>˿<EFBFBD> 11<31><31>P32<33>˿<EFBFBD> 12<31><32>P33<33>˿<EFBFBD>
|
|||
|
|
|||
|
#define IPS200_DATAPORT2 (((Ifx_P *)IfxPort_cfg_indexMap[IPS200_DATA_PORT2].module)->OUT.U) //<2F>궨<EFBFBD><EAB6A8><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>GPIO<49><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>
|
|||
|
#define DATA_START_NUM2 (IPS200_D4_PIN&0x1f) //<2F>궨<EFBFBD><EAB6A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#define IPS200_BL(x) gpio_set(IPS200_BL_PIN,x)
|
|||
|
#define IPS200_CS(x) gpio_set(IPS200_CS_PIN,x)
|
|||
|
#define IPS200_RD(x) gpio_set(IPS200_RD_PIN,x)
|
|||
|
#define IPS200_WR(x) gpio_set(IPS200_WR_PIN,x)
|
|||
|
#define IPS200_RS(x) gpio_set(IPS200_RS_PIN,x)
|
|||
|
#define IPS200_RST(x) gpio_set(IPS200_RST_PIN,x)
|
|||
|
|
|||
|
|
|||
|
#define IPS200_W 240
|
|||
|
#define IPS200_H 320
|
|||
|
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|||
|
//0 <20><><EFBFBD><EFBFBD>ģʽ
|
|||
|
//1 <20><><EFBFBD><EFBFBD>ģʽ <20><>ת180<38><30>
|
|||
|
//2 <20><><EFBFBD><EFBFBD>ģʽ
|
|||
|
//3 <20><><EFBFBD><EFBFBD>ģʽ <20><>ת180<38><30>
|
|||
|
#define IPS200_DISPLAY_DIR 0
|
|||
|
|
|||
|
#if (0==IPS200_DISPLAY_DIR || 1==IPS200_DISPLAY_DIR)
|
|||
|
#define IPS200_X_MAX IPS200_W //Һ<><D2BA>X<EFBFBD><58><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define IPS200_Y_MAX IPS200_H //Һ<><D2BA>Y<EFBFBD><59><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
#elif (2==IPS200_DISPLAY_DIR || 3==IPS200_DISPLAY_DIR)
|
|||
|
#define IPS200_X_MAX IPS200_H //Һ<><D2BA>X<EFBFBD><58><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define IPS200_Y_MAX IPS200_W //Һ<><D2BA>Y<EFBFBD><59><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
#else
|
|||
|
#error "IPS200_DISPLAY_DIR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
void ips200_init(void); //<2F><>ʼ<EFBFBD><CABC>Ӳ<EFBFBD><D3B2>
|
|||
|
void ips200_w_data(uint8 dat);
|
|||
|
void ips200_wr_reg(uint8 com);
|
|||
|
void ips200_wr_data(uint8 dat);
|
|||
|
void ips200_wr_data16(uint16 dat);
|
|||
|
void ips200_w_reg(uint8 com,uint8 dat);
|
|||
|
void ips200_address_set(uint16 x1,uint16 y1,uint16 x2,uint16 y2);
|
|||
|
void ips200_clear(uint16 color);
|
|||
|
void ips200_drawpoint(uint16 x,uint16 y,uint16 color);
|
|||
|
void ips200_showchar(uint16 x,uint16 y,const int8 dat);
|
|||
|
void ips200_showstr(uint16 x,uint16 y,const int8 dat[]);
|
|||
|
|
|||
|
|
|||
|
void ips200_showint8(uint16 x,uint16 y,int8 dat);
|
|||
|
void ips200_showuint8(uint16 x,uint16 y,uint8 dat);
|
|||
|
void ips200_showint16(uint16 x,uint16 y,int16 dat);
|
|||
|
void ips200_showuint16(uint16 x,uint16 y,uint16 dat);
|
|||
|
void ips200_showint32(uint16 x,uint16 y,int dat,uint8 num);
|
|||
|
void ips200_showfloat(uint16 x,uint16 y,double dat,int8 num,int8 pointnum);
|
|||
|
void ips200_showimage(uint16 x,uint16 y,uint16 w,uint16 l,const unsigned char *p);
|
|||
|
|
|||
|
void ips200_displayimage032(uint8 *p, uint16 width, uint16 height);
|
|||
|
void ips200_displayimage032_zoom(uint8 *p, uint16 width, uint16 height, uint16 dis_width, uint16 dis_height);
|
|||
|
void ips200_displayimage032_zoom1(uint8 *p, uint16 width, uint16 height, uint16 start_x, uint16 start_y, uint16 dis_width, uint16 dis_height);
|
|||
|
void ips200_displayimage8660_zoom(uint16 *p, uint16 width, uint16 height, uint16 dis_width, uint16 dis_height);
|
|||
|
void ips200_displayimage8660_zoom1(uint16 *p, uint16 width, uint16 height, uint16 start_x, uint16 start_y, uint16 dis_width, uint16 dis_height);
|
|||
|
void ips200_displayimage8660_grayscale_zoom(uint16 *p, uint16 width, uint16 height, uint16 dis_width, uint16 dis_height);
|
|||
|
void ips200_displayimage7725(uint8 *p, uint16 width, uint16 height);
|
|||
|
void ips200_display_chinese(uint16 x, uint16 y, uint8 size, const uint8 *p, uint8 number, uint16 color);
|
|||
|
|
|||
|
#endif
|
|||
|
|