lcd.h

来自「手持式GPS导航系统-源码」· C头文件 代码 · 共 60 行

H
60
字号
/*****************************************************/
/*            File name : LCD.h                                                   */
/* Description : Header file of LCD.h for Nokia 3310LCD            */
/* Platform     : AVRStudio4.13 + WinAVR20070525  for AVR     */
/* Author       : Michael Zhang - 章其波                            */
/* Email         : sudazqb@163.com                                          */
/* MSN          : zhangqibo_1985@hotmail.com                          */
/* Date          : 2007-10-21                                                    */
/* NOT FOR COMMERCIAL USE,     ALL RIGHT RESERVED!         */
/*****************************************************/
/* Change Log:                                                                      */
/*                   20071021: original version                                 */
/*****************************************************/


#ifndef __LCD_H__
#define __LCD_H__


#include<avr/io.h>
#include<util/delay.h>
#include<avr/pgmspace.h>

/************************* SPI ***********************************/
/* 1: means use hardware SPI, while 0 means use GPIO to simulate SPI       */
#define HW_SPI 1

/******************* Hardware pins definition **********************/
#define LCD_RS_DDR  DDRB
#define LCD_RS_PORT PORTB
#define LCD_RS_BIT  1

#define LCD_E_DDR  DDRB
#define LCD_E_PORT PORTB
#define LCD_E_BIT  2

#define LCD_RST_DDR  DDRB
#define LCD_RST_PORT PORTB
#define LCD_RST_BIT  0

#define LCD_SCK_DDR  DDRB
#define LCD_SCK_PORT PORTB
#define LCD_SCK_BIT  5

#define LCD_MOSI_DDR  DDRB
#define LCD_MOSI_PORT PORTB
#define LCD_MOSI_BIT  3
/********************************************************************/


extern void lcdInit();
extern void lcdClrDisBuf(void);
extern void lcdUpdateDisplay(void);
extern void OnePixel(unsigned char x,unsigned char y,unsigned char val);
extern unsigned char ReadPixel(unsigned char x,unsigned char y);

#endif

/* This is the end line of LCD.h */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?