ssss

Committer:
irsanjul
Date:
Tue Aug 18 14:57:10 2020 +0000
Revision:
0:d51588bf1724
ssss

Who changed what in which revision?

UserRevisionLine numberNew contents of line
irsanjul 0:d51588bf1724 1 /* mbed TextLCD Library, for LCDs based on HD44780 controllers
irsanjul 0:d51588bf1724 2 * Copyright (c) 2014, WH
irsanjul 0:d51588bf1724 3 * 2014, v01: WH, Extracted from TextLCD.cpp as of v14
irsanjul 0:d51588bf1724 4 * 2015, v02: WH, Added some UDC definitions and commented out several UDCs
irsanjul 0:d51588bf1724 5 * 2015, v03: WH, Added some UDC definitions
irsanjul 0:d51588bf1724 6 *
irsanjul 0:d51588bf1724 7 * Permission is hereby granted, free of charge, to any person obtaining a copy
irsanjul 0:d51588bf1724 8 * of this software and associated documentation files (the "Software"), to deal
irsanjul 0:d51588bf1724 9 * in the Software without restriction, including without limitation the rights
irsanjul 0:d51588bf1724 10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
irsanjul 0:d51588bf1724 11 * copies of the Software, and to permit persons to whom the Software is
irsanjul 0:d51588bf1724 12 * furnished to do so, subject to the following conditions:
irsanjul 0:d51588bf1724 13 *
irsanjul 0:d51588bf1724 14 * The above copyright notice and this permission notice shall be included in
irsanjul 0:d51588bf1724 15 * all copies or substantial portions of the Software.
irsanjul 0:d51588bf1724 16 *
irsanjul 0:d51588bf1724 17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
irsanjul 0:d51588bf1724 18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
irsanjul 0:d51588bf1724 19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
irsanjul 0:d51588bf1724 20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
irsanjul 0:d51588bf1724 21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
irsanjul 0:d51588bf1724 22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
irsanjul 0:d51588bf1724 23 * THE SOFTWARE.
irsanjul 0:d51588bf1724 24 */
irsanjul 0:d51588bf1724 25 #include "TextLCD_Config.h"
irsanjul 0:d51588bf1724 26
irsanjul 0:d51588bf1724 27 #if(LCD_UDC == 1)
irsanjul 0:d51588bf1724 28 // User Defined Characters (UDCs) are defined by an 8 byte bitpattern. The P0..P5 form the character pattern.
irsanjul 0:d51588bf1724 29 // P7 P6 P5 P4 P3 P2 P1 P0
irsanjul 0:d51588bf1724 30 // 0 B1 B0 x 0 1 1 1 0
irsanjul 0:d51588bf1724 31 // 1 B1 B0 x 1 0 0 0 1
irsanjul 0:d51588bf1724 32 // . .............
irsanjul 0:d51588bf1724 33 // 7 B1 B0 x 1 0 0 0 1
irsanjul 0:d51588bf1724 34 //
irsanjul 0:d51588bf1724 35 // Blinking UDCs are enabled when a specific controlbit (BE) is set.
irsanjul 0:d51588bf1724 36 // The blinking pixels in the UDC can be controlled by setting additional bits in the UDC bitpattern.
irsanjul 0:d51588bf1724 37 // Bit 6 and Bit 7 in the pattern will control the blinking mode when Blink is enabled through BE.
irsanjul 0:d51588bf1724 38 // B1 B0 Mode
irsanjul 0:d51588bf1724 39 // 0 0 No Blinking in this row of the UDC
irsanjul 0:d51588bf1724 40 // 0 1 Enabled pixels in P4 will blink
irsanjul 0:d51588bf1724 41 // 1 x Enabled pixels in P0..P4 will blink
irsanjul 0:d51588bf1724 42
irsanjul 0:d51588bf1724 43 /** Some sample User Defined Chars 5x7 dots */
irsanjul 0:d51588bf1724 44 //const char udc_ae[] = {0x00, 0x00, 0x1B, 0x05, 0x1F, 0x14, 0x1F, 0x00}; //æ
irsanjul 0:d51588bf1724 45 //const char udc_0e[] = {0x00, 0x00, 0x0E, 0x13, 0x15, 0x19, 0x0E, 0x00}; //ø
irsanjul 0:d51588bf1724 46 //const char udc_ao[] = {0x0E, 0x0A, 0x0E, 0x01, 0x0F, 0x11, 0x0F, 0x00}; //å
irsanjul 0:d51588bf1724 47 //const char udc_AE[] = {0x0F, 0x14, 0x14, 0x1F, 0x14, 0x14, 0x17, 0x00}; //Æ
irsanjul 0:d51588bf1724 48 //const char udc_0E[] = {0x0E, 0x13, 0x15, 0x15, 0x15, 0x19, 0x0E, 0x00}; //Ø
irsanjul 0:d51588bf1724 49 //const char udc_Ao[] = {0x0E, 0x0A, 0x0E, 0x11, 0x1F, 0x11, 0x11, 0x00}; //Å
irsanjul 0:d51588bf1724 50 //const char udc_PO[] = {0x04, 0x0A, 0x0A, 0x1F, 0x1B, 0x1B, 0x1F, 0x00}; //Padlock Open
irsanjul 0:d51588bf1724 51 //const char udc_PC[] = {0x1C, 0x10, 0x08, 0x1F, 0x1B, 0x1B, 0x1F, 0x00}; //Padlock Closed
irsanjul 0:d51588bf1724 52
irsanjul 0:d51588bf1724 53 //const char udc_alpha[] = {0x00, 0x00, 0x0D, 0x12, 0x12, 0x12, 0x0D, 0x00}; //alpha
irsanjul 0:d51588bf1724 54 //const char udc_ohm[] = {0x0E, 0x11, 0x11, 0x11, 0x0A, 0x0A, 0x1B, 0x00}; //ohm
irsanjul 0:d51588bf1724 55 //const char udc_sigma[] = {0x1F, 0x08, 0x04, 0x02, 0x04, 0x08, 0x1F, 0x00}; //sigma
irsanjul 0:d51588bf1724 56 //const char udc_pi[] = {0x1F, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x00}; //pi
irsanjul 0:d51588bf1724 57 //const char udc_root[] = {0x07, 0x04, 0x04, 0x04, 0x14, 0x0C, 0x04, 0x00}; //root
irsanjul 0:d51588bf1724 58
irsanjul 0:d51588bf1724 59 const char udc_0[] = {0x18, 0x14, 0x12, 0x11, 0x12, 0x14, 0x18, 0x00}; // |>
irsanjul 0:d51588bf1724 60 const char udc_1[] = {0x03, 0x05, 0x09, 0x11, 0x09, 0x05, 0x03, 0x00}; // <|
irsanjul 0:d51588bf1724 61 const char udc_2[] = {0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00}; // |
irsanjul 0:d51588bf1724 62 const char udc_3[] = {0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00}; // ||
irsanjul 0:d51588bf1724 63 const char udc_4[] = {0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x00}; // |||
irsanjul 0:d51588bf1724 64 const char udc_5[] = {0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00}; // =
irsanjul 0:d51588bf1724 65 const char udc_6[] = {0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x00}; // checkerboard
irsanjul 0:d51588bf1724 66 const char udc_7[] = {0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x10, 0x00}; // \
irsanjul 0:d51588bf1724 67
irsanjul 0:d51588bf1724 68 //const char udc_degr[] = {0x06, 0x09, 0x09, 0x06, 0x00, 0x00, 0x00, 0x00}; // Degree symbol
irsanjul 0:d51588bf1724 69
irsanjul 0:d51588bf1724 70 //const char udc_TM_T[] = {0x1F, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00}; // Trademark T
irsanjul 0:d51588bf1724 71 //const char udc_TM_M[] = {0x11, 0x1B, 0x15, 0x11, 0x00, 0x00, 0x00, 0x00}; // Trademark M
irsanjul 0:d51588bf1724 72
irsanjul 0:d51588bf1724 73 //const char udc_Bat_Hi[] = {0x0E, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00}; // Battery Full
irsanjul 0:d51588bf1724 74 //const char udc_Bat_Ha[] = {0x0E, 0x11, 0x13, 0x17, 0x1F, 0x1F, 0x1F, 0x00}; // Battery Half
irsanjul 0:d51588bf1724 75 //const char udc_Bat_Lo[] = {0x0E, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1F, 0x00}; // Battery Low
irsanjul 0:d51588bf1724 76 //const char udc_Bat_Hi[] = {0x0E, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00}; // Battery Full
irsanjul 0:d51588bf1724 77 //const char udc_Bat_Ha[] = {0x0E, 0x11, 0x11, 0x1F, 0x1F, 0x1F, 0x1F, 0x00}; // Battery Half
irsanjul 0:d51588bf1724 78 //const char udc_Bat_Lo[] = {0x0E, 0x11, 0x11, 0x11, 0x11, 0x1F, 0x1F, 0x00}; // Battery Low
irsanjul 0:d51588bf1724 79 const char udc_Bat_Hi[] = {0x8E, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x00}; // Battery Full, Blink
irsanjul 0:d51588bf1724 80 const char udc_Bat_Ha[] = {0x8E, 0x91, 0x91, 0x9F, 0x9F, 0x9F, 0x9F, 0x00}; // Battery Half, Blink
irsanjul 0:d51588bf1724 81 const char udc_Bat_Lo[] = {0x8E, 0x91, 0x91, 0x91, 0x91, 0x9F, 0x9F, 0x00}; // Battery Low, Blink
irsanjul 0:d51588bf1724 82 const char udc_AC[] = {0x0A, 0x0A, 0x1F, 0x11, 0x0E, 0x04, 0x04, 0x00}; // AC Power
irsanjul 0:d51588bf1724 83
irsanjul 0:d51588bf1724 84 //const char udc_smiley[] = {0x00, 0x0A, 0x00, 0x04, 0x11, 0x0E, 0x00, 0x00}; // Smiley
irsanjul 0:d51588bf1724 85 //const char udc_droopy[] = {0x00, 0x0A, 0x00, 0x04, 0x00, 0x0E, 0x11, 0x00}; // Droopey
irsanjul 0:d51588bf1724 86 //const char udc_note[] = {0x01, 0x03, 0x05, 0x09, 0x0B, 0x1B, 0x18, 0x00}; // Note
irsanjul 0:d51588bf1724 87 //const char udc_note[] = {0x06, 0x04, 0x04, 0x04, 0x0C, 0x1C, 0x08, 0x00}; // Note
irsanjul 0:d51588bf1724 88 //const char udc_note_off[] = {0x16, 0x04, 0x04, 0x06, 0x0D, 0x1C, 0x08, 0x00}; // Note Off
irsanjul 0:d51588bf1724 89
irsanjul 0:d51588bf1724 90 //const char udc_bar_1[] = {0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00}; // Bar 1
irsanjul 0:d51588bf1724 91 //const char udc_bar_2[] = {0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00}; // Bar 11
irsanjul 0:d51588bf1724 92 //const char udc_bar_3[] = {0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x00}; // Bar 111
irsanjul 0:d51588bf1724 93 //const char udc_bar_4[] = {0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x00}; // Bar 1111
irsanjul 0:d51588bf1724 94 //const char udc_bar_5[] = {0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00}; // Bar 11111
irsanjul 0:d51588bf1724 95
irsanjul 0:d51588bf1724 96 //const char udc_ch_1[] = {0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00}; // Hor bars 4
irsanjul 0:d51588bf1724 97 //const char udc_ch_2[] = {0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f}; // Hor bars 4 (inverted)
irsanjul 0:d51588bf1724 98 //const char udc_ch_3[] = {0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15}; // Ver bars 3
irsanjul 0:d51588bf1724 99 //const char udc_ch_4[] = {0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a}; // Ver bars 3 (inverted)
irsanjul 0:d51588bf1724 100 //const char udc_ch_yr[] = {0x08, 0x0f, 0x12, 0x0f, 0x0a, 0x1f, 0x02, 0x02}; // Year (kana)
irsanjul 0:d51588bf1724 101 //const char udc_ch_mo[] = {0x0f, 0x09, 0x0f, 0x09, 0x0f, 0x09, 0x09, 0x13}; // Month (kana)
irsanjul 0:d51588bf1724 102 //const char udc_ch_dy[] = {0x1f, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x11, 0x1F}; // Day (kana)
irsanjul 0:d51588bf1724 103 //const char udc_ch_mi[] = {0x0C, 0x0a, 0x11, 0x1f, 0x09, 0x09, 0x09, 0x13}; // minute (kana)
irsanjul 0:d51588bf1724 104
irsanjul 0:d51588bf1724 105 //const char udc_bell[] = {0x04, 0x0E, 0x0E, 0x0E, 0x1F, 0x00, 0x04, 0x00};
irsanjul 0:d51588bf1724 106 //const char udc_note[] = {0x02, 0x03, 0x02, 0x0E, 0x1E, 0x0C, 0x00, 0x00};
irsanjul 0:d51588bf1724 107 //const char udc_clock[] = {0x00, 0x0E, 0x15, 0x17, 0x11, 0x0E, 0x00, 0x00};
irsanjul 0:d51588bf1724 108 //const char udc_heart[] = {0x00, 0x0a, 0x1F, 0x1F, 0x0E, 0x04, 0x00, 0x00};
irsanjul 0:d51588bf1724 109 //const char udc_duck[] = {0x00, 0x0c, 0x1D, 0x0F, 0x0F, 0x06, 0x00, 0x00};
irsanjul 0:d51588bf1724 110 //const char udc_check[] = {0x00, 0x01, 0x03, 0x16, 0x1C, 0x08, 0x00, 0x00};
irsanjul 0:d51588bf1724 111 //const char udc_cross[] = {0x00, 0x1B, 0x0E, 0x04, 0x0E, 0x1B, 0x00, 0x00};
irsanjul 0:d51588bf1724 112 //const char udc_retarrow[] = {0x01, 0x01, 0x05, 0x09, 0x1f, 0x08, 0x04, 0x00};
irsanjul 0:d51588bf1724 113 //const char udc_OK[] = {0x08, 0x14, 0x14, 0x08, 0x05, 0x06, 0x05, 0x05}; // OK
irsanjul 0:d51588bf1724 114 //const char udc_1_2[] = {0x11, 0x12, 0x17, 0x09, 0x13, 0x04, 0x07, 0x00}; // 1/2
irsanjul 0:d51588bf1724 115 //const char udc_Euro[] = {0x06, 0x09, 0x08, 0x1E, 0x1E, 0x08, 0x09, 0x06}; // Euro symbol
irsanjul 0:d51588bf1724 116 //const char udc_key[] = {0x07, 0x07, 0x04, 0x04, 0x0E, 0x11, 0x0E, 0x00}; // Key symbol
irsanjul 0:d51588bf1724 117
irsanjul 0:d51588bf1724 118 //const char udc_None[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
irsanjul 0:d51588bf1724 119 //const char udc_All[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
irsanjul 0:d51588bf1724 120 #endif /* UDC_EXAMPLES */