📄 lcd.h
字号:
/*****************************************************/
/* 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 DDRF
#define LCD_RS_PORT PORTF
#define LCD_RS_BIT 0
#define LCD_E_DDR DDRF
#define LCD_E_PORT PORTF
#define LCD_E_BIT 2
#define LCD_RST_DDR DDRF
#define LCD_RST_PORT PORTF
#define LCD_RST_BIT 3
#define LCD_SCK_DDR DDRB
#define LCD_SCK_PORT PORTB
#define LCD_SCK_BIT 1
#define LCD_MOSI_DDR DDRB
#define LCD_MOSI_PORT PORTB
#define LCD_MOSI_BIT 2
/********************************************************************/
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -