44 lines
1.7 KiB
C
44 lines
1.7 KiB
C
/*************************** (C) COPYRIGHT 2017 YNHB ****************************
|
||
* 文件名 :lcd12864.h
|
||
* 描 述 :lcd12864显示驱动程序
|
||
* 版 本 :V1.0
|
||
* 作 者 :XuZhongPing
|
||
* 日 期 :2017/10/16
|
||
*********************************************************************************/
|
||
#ifndef __LCD12864_H
|
||
#define __LCD12864_H
|
||
#include "stm32f10x.h"
|
||
#include "stdio.h"
|
||
|
||
#define CS_H GPIO_SetBits(GPIOB, GPIO_Pin_7) //RS(CS)
|
||
#define CS_L GPIO_ResetBits(GPIOB, GPIO_Pin_7)
|
||
#define SID_H GPIO_SetBits(GPIOB, GPIO_Pin_6) //R/W(SID)
|
||
#define SID_L GPIO_ResetBits(GPIOB, GPIO_Pin_6)
|
||
#define SCLK_H GPIO_SetBits(GPIOB, GPIO_Pin_5) //E(SCLK)
|
||
#define SCLK_L GPIO_ResetBits(GPIOB, GPIO_Pin_5)
|
||
// #define PSB_L GPIO_ResetBits(GPIOD, GPIO_Pin_4) //PSB
|
||
|
||
void LCD12864_Init(void);
|
||
void LCD12864_SendByte(uint8_t zdata);
|
||
uint8_t LCD12864_ReceiveByte(void);
|
||
void LCD12864_CheckBusy(void);
|
||
void LCD12864_WriteCommand(uint8_t cmdcode);
|
||
void LCD12864_WriteData(uint8_t dispdata);
|
||
uint8_t LCD12864_ReadData(void);
|
||
void LCD12864_SetPos(uint8_t x, uint8_t y);
|
||
void LCD12864_DrawPoint(uint16_t x, uint16_t y, uint8_t color);
|
||
void LCD12864_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
|
||
void LCD12864_DrawRectangle(uint16_t x1,uint16_t y1,uint16_t x2,uint16_t y2);
|
||
void LCD12864_Clear(void);
|
||
void LCD12864_DrawModeCtrl(uint8_t param);
|
||
|
||
void LCD12864_ShowChar(uint8_t num);
|
||
void LCD12864_ShowString(uint8_t x, uint8_t y, char *p);
|
||
void LCD12864_ShowNum(uint8_t num);
|
||
void LCD12864_ShowxNum(uint8_t x, uint8_t y, uint32_t num, uint8_t len);
|
||
void LCD12864_ShowSignal(uint8_t val);
|
||
|
||
#endif
|
||
|
||
/******************** (C) COPYRIGHT 2017 YNHB *****END OF FILE*******************/
|