123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /****************************************Copyright (c)**************************************************
- * File Name: Lcd.h
- * Function Describe: Header file for Lcd.c
- * Explain:
- * Writer: ShiLiangWen
- * Date: 2016-1-8
- ********************************************************************************************************/
- #ifndef __LCD_H
- #define __LCD_H
- //-------------------------------------------------------------------------------------------------------
- #include "stm32f10x.h"
- #define LCD_WIDTH 160
- #define LCD_HEIGHT 128
- #define LCD_CS_PIN GPIO_Pin_12
- #define LCD_CS_PORT GPIOB
- #define LCD_CS_HIGH LCD_CS_PORT->BSRR = LCD_CS_PIN
- #define LCD_CS_LOW LCD_CS_PORT->BRR = LCD_CS_PIN
- #define LCD_SCK_PIN GPIO_Pin_13
- #define LCD_SCK_PORT GPIOB
- #define LCD_SCK_HIGH LCD_SCK_PORT->BSRR = LCD_SCK_PIN
- #define LCD_SCK_LOW LCD_SCK_PORT->BRR = LCD_SCK_PIN
- #define LCD_DCX_PIN GPIO_Pin_14
- #define LCD_DCX_PORT GPIOB
- #define LCD_DCX_HIGH LCD_DCX_PORT->BSRR = LCD_DCX_PIN
- #define LCD_DCX_LOW LCD_DCX_PORT->BRR = LCD_DCX_PIN
- #define LCD_SDA_PIN GPIO_Pin_15
- #define LCD_SDA_PORT GPIOB
- #define LCD_SDA_HIGH LCD_SDA_PORT->BSRR = LCD_SDA_PIN
- #define LCD_SDA_LOW LCD_SDA_PORT->BRR = LCD_SDA_PIN
- #define LCD_RESET_PIN GPIO_Pin_6
- #define LCD_RESET_PORT GPIOC
- #define LCD_RESET_HIGH LCD_RESET_PORT->BSRR = LCD_RESET_PIN
- #define LCD_RESET_LOW LCD_RESET_PORT->BRR = LCD_RESET_PIN
- #define LCD_BL_PIN GPIO_Pin_7
- #define LCD_BL_PORT GPIOC
- #define LCD_BL_HIGH LCD_BL_PORT->BSRR = LCD_BL_PIN
- #define LCD_BL_LOW LCD_BL_PORT->BRR = LCD_BL_PIN
- void LcdInit(void);
- void LcdBlockWrite(u16 x1,u16 y1,u16 x2,u16 y2);
- void LcdSendData(unsigned char Data);
- void LcdSendCommand(unsigned char Cmd);
- void LcdSendData(unsigned char Data);
- void LCDTimeOut(int Ct);
- extern unsigned char showApn;
- //-------------------------------------------------------------------------------------------------------
- #endif
- /*********************************************************************************************************
- END FILE
- *********************************************************************************************************/
|