Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: 10A_ClassProject_MegnaticGame
Fork of LCD4884 by
LCD4884.h
00001 /* 00002 Modified by COX 00003 version 0.1 00004 00005 Editor : COX 00006 Date : 06.03.2013 00007 00008 * 00009 * Update DFRobot source to work on FRDM KL25Z 00010 * 00011 */ 00012 00013 #ifndef LCD4884_h 00014 #define LCD4884_h 00015 00016 #include "mbed.h" 00017 00018 // SPI Interface --- (on arduino Arduino Digital Pin 2,3,4,5,6) 00019 #define SPI_SCK PC_10 //Serial Clock(Master Output) 00020 #define SPI_MOSI PC_12 //Master Output,Slave Input 00021 #define LCD_DC PC_11 //Data/Command(command active low) 00022 #define SPI_CS PD_2 //Chip Select,Slave Transmit Enable(active low,Master Output) 00023 #define LCD_RST D8 //One Reset button 00024 #define LCD_BL D2 //PWM Backlit control (Arduino DIO Pin 7) 00025 00026 00027 //display mode -- normal / highlight 00028 #define MENU_NORMAL 0 00029 #define MENU_HIGHLIGHT 1 00030 #define OFF 0 00031 #define ON 1 00032 #define LOW 0 00033 #define HIGH 1 00034 #define ONE_US 0.000001 00035 #define LCD_INITIAL_BRIGHTNESS 1 00036 00037 namespace mbed { 00038 00039 class LCD4884 00040 { 00041 public: 00042 LCD4884(); 00043 void LCD_init(void); 00044 void backlight(float dat); 00045 void LCD_write_byte(unsigned char dat, unsigned char dat_type); 00046 void LCD_draw_bmp_pixel(unsigned char X,unsigned char Y,unsigned char *map,unsigned char Pix_x,unsigned char Pix_y); 00047 void LCD_write_string(unsigned char X,unsigned char Y,char *s, char mode); 00048 void LCD_prop_write_string(unsigned char X,unsigned char Y,char *s, char mode); 00049 void LCD_write_chinese(unsigned char X, unsigned char Y,unsigned char *c,unsigned char ch_with,unsigned char num,unsigned char line,unsigned char row); 00050 void LCD_write_string_big ( unsigned char X,unsigned char Y, char *string, char mode ); 00051 void LCD_write_char_big (unsigned char X,unsigned char Y, unsigned char ch, char mode); 00052 void LCD_write_char(unsigned char c, char mode); 00053 unsigned char LCD_prop_write_char(unsigned char c, char mode); 00054 void LCD_set_XY(unsigned char X, unsigned char Y); 00055 void LCD_clear(void); 00056 }; 00057 } 00058 extern LCD4884 lcd; 00059 00060 #endif 00061
Generated on Mon Jul 18 2022 07:51:55 by
1.7.2
