ButterflyMP3
|
00001 //***************************************************************************** 00002 // 00003 // File........: LCD_Driver.h 00004 // 00005 // Author(s)...: ATMEL Norway 00006 // 00007 // Target(s)...: ATmega169 00008 // 00009 // Description.: Defines and prototypes for LCD_Driver.c 00010 // 00011 // Revisions...: 1.0 00012 // 00013 // YYYYMMDD - VER. - COMMENT - SIGN. 00014 // 00015 // 20020606 - 0.10 - File created - RM 00016 // 20021010 - 1.0 - Clean up - JLL 00017 // 20031009 port to avr-gcc/avr-libc - M.Thomas 00018 // 00019 //***************************************************************************** 00020 00021 00022 /************************************************************************/ 00023 // Definitions 00024 /************************************************************************/ 00025 #define LCD_INITIAL_CONTRAST 0x0F 00026 #define LCD_TIMER_SEED 3 00027 #define LCD_FLASH_SEED 10 00028 #define LCD_REGISTER_COUNT 20 00029 #define TEXTBUFFER_SIZE 16 ///< FIXME: overwrites the FatCACHE!! when big(25 or so) 00030 00031 #define SCROLLMODE_ONCE 0x01 00032 #define SCROLLMODE_LOOP 0x02 00033 #define SCROLLMODE_WAVE 0x03 00034 00035 /************************************************************************/ 00036 //MACROS 00037 /************************************************************************/ 00038 //active = [TRUE;FALSE] 00039 #define LCD_SET_COLON(active) LCD_Data[8] = active 00040 00041 // DEVICE SPECIFIC!!! (ATmega169) 00042 #define pLCDREG ((unsigned char *)(0xEC)) 00043 00044 // DEVICE SPECIFIC!!! (ATmega169) First LCD segment register 00045 #define LCD_CONTRAST_LEVEL(level) LCDCCR=(0x0F & level) 00046 00047 00048 /************************************************************************/ 00049 // Global variables 00050 /************************************************************************/ 00051 // mt: volatiles added (based on jw patch) 00052 extern volatile char gLCD_Update_Required; 00053 extern char LCD_Data[LCD_REGISTER_COUNT]; 00054 extern char gTextBuffer[TEXTBUFFER_SIZE]; 00055 extern volatile char gScrollMode; 00056 extern char gFlashTimer; 00057 extern char gColon; 00058 extern char gShowFilename; 00059 extern volatile signed char gScroll; 00060 00061 00062 /************************************************************************/ 00063 // Global functions 00064 /************************************************************************/ 00065 void LCD_Init (void); 00066 void LCD_WriteDigit(char input, char digit); 00067 void LCD_AllSegments(char show);