AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
LCD.cpp
00001 #include "LCD.h" 00002 00003 LCD::LCD(PinName rs, PinName e, PinName d4, PinName d5, PinName d6, PinName d7, LCDType type) : TextLCD(rs, e, d4, d5, d6, d7, type) { 00004 //load special characters in memory 00005 load_special_chars(); 00006 } 00007 00008 void LCD::showLogo(const char** logo){ 00009 for(int line = 0; line < 4; line++){ 00010 this->locate(0,line); 00011 this->printf(logo[line]); 00012 } 00013 } 00014 00015 void LCD::load_special_chars(){ 00016 char special_chars[8][8] = { 00017 {0x0,0x8,0xc,0xe,0xc,0x8,0x0}, // [0] arrow right 00018 {0x0,0x2,0x6,0xe,0x6,0x2,0x0}, // [1] arrow left 00019 {0x0,0x0,0x4,0xe,0x1f,0x0,0x0}, // [2] arrow up 00020 {0x0,0x0,0x1f,0xe,0x4,0x0,0x0}, // [3] arrow down 00021 {0x0,0xe,0x15,0x17,0x11,0xe,0x0}, // [4] clock 00022 {0x1,0x3,0xf,0xf,0xf,0x3,0x1}, // [5] speaker 00023 {0x8,0x10,0x0,0x18,0x0,0x10,0x8}, // [6] speaker on 00024 {0x0,0x1,0x3,0x16,0x1c,0x8,0x0} // [7] check mark 00025 }; 00026 for(int i = 0; i < 8; i++){ 00027 this->putCustomChar(i,special_chars[i]); 00028 } 00029 }
Generated on Tue Jul 12 2022 21:04:09 by 1.7.2