Generate the maximum sampling rate

Dependencies:   MAG31101 mbed

Committer:
mja054
Date:
Sat Feb 15 01:05:44 2014 +0000
Revision:
0:d62b58e30f71
Generate the maximum sampling rate

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mja054 0:d62b58e30f71 1 #include "SLCD.h"
mja054 0:d62b58e30f71 2 #include "LCDconfig.h"
mja054 0:d62b58e30f71 3
mja054 0:d62b58e30f71 4
mja054 0:d62b58e30f71 5 const uint8_t WF_ORDERING_TABLE[ ] =
mja054 0:d62b58e30f71 6 {
mja054 0:d62b58e30f71 7 CHAR1a, // LCD81 --- Pin:5 LCDnAddress=51
mja054 0:d62b58e30f71 8 CHAR1b, // LCD82 --- Pin:6 LCDnAddress=52
mja054 0:d62b58e30f71 9 CHAR2a, // LCD83 --- Pin:7 LCDnAddress=53
mja054 0:d62b58e30f71 10 CHAR2b, // LCD84 --- Pin:8 LCDnAddress=54
mja054 0:d62b58e30f71 11 CHAR3a, // LCD85 --- Pin:9 LCDnAddress=55
mja054 0:d62b58e30f71 12 CHAR3b, // LCD86 --- Pin:10 LCDnAddress=56
mja054 0:d62b58e30f71 13 CHAR4a, // LCD87 --- Pin:11 LCDnAddress=57
mja054 0:d62b58e30f71 14 CHAR4b, // LCD88 --- Pin:12 LCDnAddress=58
mja054 0:d62b58e30f71 15 CHARCOM0, // LCD77 --- Pin:1 LCDnAddress=4D
mja054 0:d62b58e30f71 16 CHARCOM1, // LCD78 --- Pin:2 LCDnAddress=4E
mja054 0:d62b58e30f71 17 CHARCOM2, // LCD79 --- Pin:3 LCDnAddress=4F
mja054 0:d62b58e30f71 18 CHARCOM3, // LCD80 --- Pin:4 LCDnAddress=50
mja054 0:d62b58e30f71 19 };
mja054 0:d62b58e30f71 20
mja054 0:d62b58e30f71 21 const char ASCII_TO_WF_CODIFICATION_TABLE [ ] =
mja054 0:d62b58e30f71 22 {
mja054 0:d62b58e30f71 23
mja054 0:d62b58e30f71 24 /*
mja054 0:d62b58e30f71 25 segA
mja054 0:d62b58e30f71 26 ________
mja054 0:d62b58e30f71 27 | |
mja054 0:d62b58e30f71 28 segF | | segB
mja054 0:d62b58e30f71 29 | |
mja054 0:d62b58e30f71 30 -segG--
mja054 0:d62b58e30f71 31 | |
mja054 0:d62b58e30f71 32 segE | | segC
mja054 0:d62b58e30f71 33 |________|
mja054 0:d62b58e30f71 34 segD
mja054 0:d62b58e30f71 35 */
mja054 0:d62b58e30f71 36
mja054 0:d62b58e30f71 37 ( SEGD+ SEGE+ SEGF+!SEGG) , ( SEGC+ SEGB+ SEGA) ,//Char = 0, offset=0
mja054 0:d62b58e30f71 38 (!SEGD+!SEGE+!SEGF+!SEGG) , ( SEGC+ SEGB+!SEGA) ,//Char = 1, offset=4
mja054 0:d62b58e30f71 39 ( SEGD+ SEGE+!SEGF+ SEGG) , (!SEGC+ SEGB+ SEGA) ,//Char = 2, offset=8
mja054 0:d62b58e30f71 40 ( SEGD+!SEGE+!SEGF+ SEGG) , ( SEGC+ SEGB+ SEGA) ,//Char = 3, offset=12
mja054 0:d62b58e30f71 41 (!SEGD+!SEGE+ SEGF+ SEGG) , ( SEGC+ SEGB+!SEGA) ,//Char = 4, offset=16
mja054 0:d62b58e30f71 42 ( SEGD+!SEGE+ SEGF+ SEGG) , ( SEGC+!SEGB+ SEGA) ,//Char = 5, offset=20
mja054 0:d62b58e30f71 43 ( SEGD+ SEGE+ SEGF+ SEGG) , ( SEGC+!SEGB+ SEGA) ,//Char = 6, offset=24
mja054 0:d62b58e30f71 44 (!SEGD+!SEGE+!SEGF+!SEGG) , ( SEGC+ SEGB+ SEGA) ,//Char = 7, offset=28
mja054 0:d62b58e30f71 45 ( SEGD+ SEGE+ SEGF+ SEGG) , ( SEGC+ SEGB+ SEGA) ,//Char = 8, offset=32
mja054 0:d62b58e30f71 46 ( SEGD+!SEGE+ SEGF+ SEGG) , ( SEGC+ SEGB+ SEGA) ,//Char = 9, offset=36
mja054 0:d62b58e30f71 47 (!SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+!SEGA) ,//Char = :, offset=40
mja054 0:d62b58e30f71 48 (!SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+!SEGA) ,//Char = ;, offset=44
mja054 0:d62b58e30f71 49 (!SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+!SEGA) ,//Char = <, offset=48
mja054 0:d62b58e30f71 50 ( SEGD+!SEGE+!SEGF+ SEGG) , (!SEGC+!SEGB+!SEGA) ,//Char = =, offset=52
mja054 0:d62b58e30f71 51 (!SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+!SEGA) ,//Char = >, offset=56
mja054 0:d62b58e30f71 52 (!SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = ?, offset=60
mja054 0:d62b58e30f71 53 ( SEGD+ SEGE+ SEGF+ SEGG) , ( SEGC+ SEGB+ SEGA) ,//Char = @, offset=64
mja054 0:d62b58e30f71 54 (!SEGD+ SEGE+ SEGF+ SEGG) , ( SEGC+ SEGB+ SEGA) ,//Char = A, offset=68
mja054 0:d62b58e30f71 55 ( SEGD+ SEGE+ SEGF+ SEGG) , ( SEGC+!SEGB+!SEGA) ,//Char = B, offset=72
mja054 0:d62b58e30f71 56 ( SEGD+ SEGE+ SEGF+!SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = C, offset=76
mja054 0:d62b58e30f71 57 ( SEGD+ SEGE+!SEGF+ SEGG) , ( SEGC+ SEGB+!SEGA) ,//Char = D, offset=80
mja054 0:d62b58e30f71 58 ( SEGD+ SEGE+ SEGF+ SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = E, offset=84
mja054 0:d62b58e30f71 59 (!SEGD+ SEGE+ SEGF+ SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = F, offset=88
mja054 0:d62b58e30f71 60 ( SEGD+ SEGE+ SEGF+ SEGG) , ( SEGC+!SEGB+ SEGA) ,//Char = G, offset=92
mja054 0:d62b58e30f71 61 (!SEGD+ SEGE+ SEGF+ SEGG) , ( SEGC+ SEGB+!SEGA) ,//Char = H, offset=96
mja054 0:d62b58e30f71 62 (!SEGD+!SEGE+!SEGF+!SEGG) , ( SEGC+!SEGB+!SEGA) ,//Char = I, offset=100
mja054 0:d62b58e30f71 63 ( SEGD+ SEGE+!SEGF+!SEGG) , ( SEGC+ SEGB+!SEGA) ,//Char = J, offset=104
mja054 0:d62b58e30f71 64 (!SEGD+ SEGE+ SEGF+ SEGG) , ( SEGC+!SEGB+ SEGA) ,//Char = K, offset=108
mja054 0:d62b58e30f71 65 ( SEGD+ SEGE+ SEGF+!SEGG) , (!SEGC+!SEGB+!SEGA) ,//Char = L, offset=112
mja054 0:d62b58e30f71 66 (!SEGD+ SEGE+ SEGF+!SEGG) , ( SEGC+ SEGB+ SEGA) ,//Char = M, offset=116
mja054 0:d62b58e30f71 67 (!SEGD+ SEGE+!SEGF+ SEGG) , ( SEGC+!SEGB+!SEGA) ,//Char = N, offset=120
mja054 0:d62b58e30f71 68 ( SEGD+ SEGE+!SEGF+ SEGG) , ( SEGC+!SEGB+!SEGA) ,//Char = O, offset=124
mja054 0:d62b58e30f71 69 (!SEGD+ SEGE+ SEGF+ SEGG) , (!SEGC+ SEGB+ SEGA) ,//Char = P, offset=128
mja054 0:d62b58e30f71 70 ( SEGD+!SEGE+ SEGF+ SEGG) , ( SEGC+ SEGB+ SEGA) ,//Char = Q, offset=132
mja054 0:d62b58e30f71 71 (!SEGD+ SEGE+!SEGF+ SEGG) , (!SEGC+!SEGB+!SEGA) ,//Char = R, offset=136
mja054 0:d62b58e30f71 72 ( SEGD+!SEGE+ SEGF+ SEGG) , ( SEGC+!SEGB+ SEGA) ,//Char = S, offset=140
mja054 0:d62b58e30f71 73 ( SEGD+ SEGE+ SEGF+ SEGG) , (!SEGC+!SEGB+!SEGA) ,//Char = T, offset=144
mja054 0:d62b58e30f71 74 ( SEGD+ SEGE+ SEGF+!SEGG) , ( SEGC+ SEGB+!SEGA) ,//Char = U, offset=148
mja054 0:d62b58e30f71 75 ( SEGD+ SEGE+!SEGF+!SEGG) , ( SEGC+!SEGB+!SEGA) ,//Char = V, offset=152
mja054 0:d62b58e30f71 76 ( SEGD+ SEGE+ SEGF+!SEGG) , ( SEGC+ SEGB+!SEGA) ,//Char = W, offset=156
mja054 0:d62b58e30f71 77 (!SEGD+ SEGE+ SEGF+ SEGG) , ( SEGC+ SEGB+!SEGA) ,//Char = X, offset=160
mja054 0:d62b58e30f71 78 ( SEGD+!SEGE+ SEGF+ SEGG) , ( SEGC+ SEGB+!SEGA) ,//Char = Y, offset=164
mja054 0:d62b58e30f71 79 ( SEGD+!SEGE+!SEGF+ SEGG) , (!SEGC+!SEGB+!SEGA) ,//Char = Z, offset=168
mja054 0:d62b58e30f71 80 ( SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = [, offset=172
mja054 0:d62b58e30f71 81 ( SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = \, offset=176
mja054 0:d62b58e30f71 82 ( SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = ], offset=180
mja054 0:d62b58e30f71 83 ( SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = ^, offset=184
mja054 0:d62b58e30f71 84 ( SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = _, offset=188
mja054 0:d62b58e30f71 85 ( SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = `, offset=192
mja054 0:d62b58e30f71 86 };
mja054 0:d62b58e30f71 87
mja054 0:d62b58e30f71 88 SLCD::SLCD() {
mja054 0:d62b58e30f71 89 init();
mja054 0:d62b58e30f71 90 CharPosition = 0;
mja054 0:d62b58e30f71 91 }
mja054 0:d62b58e30f71 92
mja054 0:d62b58e30f71 93 void SLCD::init(){
mja054 0:d62b58e30f71 94 SIM->SCGC5 |= SIM_SCGC5_SLCD_MASK | SIM_SCGC5_PORTB_MASK | SIM_SCGC5_PORTC_MASK | SIM_SCGC5_PORTD_MASK | SIM_SCGC5_PORTE_MASK;
mja054 0:d62b58e30f71 95
mja054 0:d62b58e30f71 96 // configure pins for LCD operation
mja054 0:d62b58e30f71 97 PORTC->PCR[20] = 0x00000000; //VLL2
mja054 0:d62b58e30f71 98 PORTC->PCR[21] = 0x00000000; //VLL1
mja054 0:d62b58e30f71 99 PORTC->PCR[22] = 0x00000000; //VCAP2
mja054 0:d62b58e30f71 100 PORTC->PCR[23] = 0x00000000; //VCAP1
mja054 0:d62b58e30f71 101 // Enable IRCLK
mja054 0:d62b58e30f71 102 MCG->C1 = MCG_C1_IRCLKEN_MASK | MCG_C1_IREFSTEN_MASK;
mja054 0:d62b58e30f71 103 MCG->C2 &= ~MCG_C2_IRCS_MASK ; //0 32KHZ internal reference clock; 1= 4MHz irc
mja054 0:d62b58e30f71 104 LCD->GCR = 0x0;
mja054 0:d62b58e30f71 105 LCD->AR = 0x0;
mja054 0:d62b58e30f71 106 // LCD configurartion
mja054 0:d62b58e30f71 107 LCD->GCR = ( LCD_GCR_RVEN_MASK*_LCDRVEN
mja054 0:d62b58e30f71 108 | LCD_GCR_RVTRIM(_LCDRVTRIM) //0-15
mja054 0:d62b58e30f71 109 | LCD_GCR_CPSEL_MASK*_LCDCPSEL
mja054 0:d62b58e30f71 110 | LCD_GCR_LADJ(_LCDLOADADJUST) //0-3
mja054 0:d62b58e30f71 111 | LCD_GCR_VSUPPLY_MASK*_LCDSUPPLY //0-1
mja054 0:d62b58e30f71 112 |!LCD_GCR_FDCIEN_MASK
mja054 0:d62b58e30f71 113 | LCD_GCR_ALTDIV(_LCDALTDIV) //0-3
mja054 0:d62b58e30f71 114 |!LCD_GCR_LCDDOZE_MASK
mja054 0:d62b58e30f71 115 |!LCD_GCR_LCDSTP_MASK
mja054 0:d62b58e30f71 116 |!LCD_GCR_LCDEN_MASK //WILL BE ENABLE ON SUBSEQUENT STEP
mja054 0:d62b58e30f71 117 | LCD_GCR_SOURCE_MASK*_LCDCLKSOURCE
mja054 0:d62b58e30f71 118 | LCD_GCR_ALTSOURCE_MASK*_LCDALRCLKSOURCE
mja054 0:d62b58e30f71 119 | LCD_GCR_LCLK(_LCDLCK) //0-7
mja054 0:d62b58e30f71 120 | LCD_GCR_DUTY(_LCDDUTY) //0-7
mja054 0:d62b58e30f71 121 );
mja054 0:d62b58e30f71 122 uint8_t i;
mja054 0:d62b58e30f71 123 uint32_t *p_pen;
mja054 0:d62b58e30f71 124 uint8_t pen_offset; // 0 or 1
mja054 0:d62b58e30f71 125 uint8_t pen_bit; // 0 to 31
mja054 0:d62b58e30f71 126 LCD->PEN[0] = 0x0;
mja054 0:d62b58e30f71 127 LCD->PEN[1] = 0x0;
mja054 0:d62b58e30f71 128 LCD->BPEN[0] = 0x0;
mja054 0:d62b58e30f71 129 LCD->BPEN[1] = 0x0;
mja054 0:d62b58e30f71 130 p_pen = (uint32_t *)&LCD->PEN[0];
mja054 0:d62b58e30f71 131 for (i=0;i<_LCDUSEDPINS;i++)
mja054 0:d62b58e30f71 132 {
mja054 0:d62b58e30f71 133 pen_offset = WF_ORDERING_TABLE[i]/32;
mja054 0:d62b58e30f71 134 pen_bit = WF_ORDERING_TABLE[i]%32;
mja054 0:d62b58e30f71 135 p_pen[pen_offset] |= 1 << pen_bit;
mja054 0:d62b58e30f71 136 if (i>= _LCDFRONTPLANES) // Pin is a backplane
mja054 0:d62b58e30f71 137 {
mja054 0:d62b58e30f71 138 p_pen[pen_offset+2] |= 1 << pen_bit; // Enable BPEN
mja054 0:d62b58e30f71 139 LCD->WF8B[(uint8_t)WF_ORDERING_TABLE[i]] = 1 << (i - _LCDFRONTPLANES); // fill with 0x01, 0x02, etc
mja054 0:d62b58e30f71 140 }
mja054 0:d62b58e30f71 141 }
mja054 0:d62b58e30f71 142 LCD->GCR |= LCD_GCR_LCDEN_MASK;
mja054 0:d62b58e30f71 143 }
mja054 0:d62b58e30f71 144
mja054 0:d62b58e30f71 145 int SLCD::_putc(int c) {
mja054 0:d62b58e30f71 146 Write_Char(c);
mja054 0:d62b58e30f71 147 return 0;
mja054 0:d62b58e30f71 148 }
mja054 0:d62b58e30f71 149
mja054 0:d62b58e30f71 150 void SLCD::Write_Char (char lbValue) {
mja054 0:d62b58e30f71 151 uint8_t char_val;
mja054 0:d62b58e30f71 152 uint8_t temp;
mja054 0:d62b58e30f71 153 uint8_t *lbpLCDWF;
mja054 0:d62b58e30f71 154 uint8_t lbCounter;
mja054 0:d62b58e30f71 155 uint16_t arrayOffset;
mja054 0:d62b58e30f71 156 uint8_t position;
mja054 0:d62b58e30f71 157
mja054 0:d62b58e30f71 158 if (CharPosition >= _CHARNUM)
mja054 0:d62b58e30f71 159 CharPosition = 0;
mja054 0:d62b58e30f71 160 lbpLCDWF = (uint8_t *)&LCD->WF8B[0];
mja054 0:d62b58e30f71 161 /* only ascii character if value not writeable write as @ */
mja054 0:d62b58e30f71 162 if (lbValue>='a' && lbValue<='z') {
mja054 0:d62b58e30f71 163 lbValue -= 32; // UpperCase
mja054 0:d62b58e30f71 164 }
mja054 0:d62b58e30f71 165 if (lbValue<ASCCI_TABLE_START || lbValue >ASCCI_TABLE_END) {
mja054 0:d62b58e30f71 166 lbValue = BLANK_CHARACTER; // default value as space
mja054 0:d62b58e30f71 167 }
mja054 0:d62b58e30f71 168 lbValue -=ASCCI_TABLE_START; // Remove the offset to search in the ascci table
mja054 0:d62b58e30f71 169 arrayOffset = (lbValue * _CHAR_SIZE); // Compensate matrix offset
mja054 0:d62b58e30f71 170 // ensure bLCD position is in valid limit
mja054 0:d62b58e30f71 171 lbCounter = 0; //number of writings to complete one char
mja054 0:d62b58e30f71 172 while (lbCounter<_CHAR_SIZE) {
mja054 0:d62b58e30f71 173 position = (CharPosition) *_LCDTYPE + lbCounter;
mja054 0:d62b58e30f71 174 temp=0;
mja054 0:d62b58e30f71 175 if (lbCounter==1) {
mja054 0:d62b58e30f71 176 temp = lbpLCDWF[WF_ORDERING_TABLE[position]] & 0x01;//bit 0 has the special symbol information
mja054 0:d62b58e30f71 177 }
mja054 0:d62b58e30f71 178 char_val = ASCII_TO_WF_CODIFICATION_TABLE[arrayOffset + lbCounter];
mja054 0:d62b58e30f71 179 lbpLCDWF[WF_ORDERING_TABLE[position]] = char_val | temp;
mja054 0:d62b58e30f71 180 // if (char_val==0) lbCounter = _CHAR_SIZE; //end of this character
mja054 0:d62b58e30f71 181 lbCounter++;
mja054 0:d62b58e30f71 182 }
mja054 0:d62b58e30f71 183 CharPosition++;
mja054 0:d62b58e30f71 184 }
mja054 0:d62b58e30f71 185
mja054 0:d62b58e30f71 186 void SLCD::Home (void)
mja054 0:d62b58e30f71 187 {
mja054 0:d62b58e30f71 188 CharPosition = 0;
mja054 0:d62b58e30f71 189 }
mja054 0:d62b58e30f71 190
mja054 0:d62b58e30f71 191 void SLCD::Contrast (uint8_t lbContrast)
mja054 0:d62b58e30f71 192 {
mja054 0:d62b58e30f71 193 lbContrast &= 0x0F; //Forced to the only values accepted
mja054 0:d62b58e30f71 194 LCD->GCR |= LCD_GCR_RVTRIM(lbContrast);
mja054 0:d62b58e30f71 195 }
mja054 0:d62b58e30f71 196
mja054 0:d62b58e30f71 197 void SLCD::All_Segments (int mode)
mja054 0:d62b58e30f71 198 {
mja054 0:d62b58e30f71 199 uint8_t lbTotalBytes = _CHARNUM * _LCDTYPE;
mja054 0:d62b58e30f71 200 uint8_t lbCounter=0;
mja054 0:d62b58e30f71 201 uint8_t *lbpLCDWF;
mja054 0:d62b58e30f71 202
mja054 0:d62b58e30f71 203 lbpLCDWF = (uint8_t *)&LCD->WF8B[0];
mja054 0:d62b58e30f71 204 while (lbCounter < lbTotalBytes)
mja054 0:d62b58e30f71 205 {
mja054 0:d62b58e30f71 206 if (mode==1){lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[lbCounter++]]=_ALLON;}
mja054 0:d62b58e30f71 207 else {lbpLCDWF[WF_ORDERING_TABLE[lbCounter++]]=0;}
mja054 0:d62b58e30f71 208 }
mja054 0:d62b58e30f71 209 }
mja054 0:d62b58e30f71 210
mja054 0:d62b58e30f71 211 void SLCD::DP1 (int mode)
mja054 0:d62b58e30f71 212 {
mja054 0:d62b58e30f71 213 uint8_t *lbpLCDWF;
mja054 0:d62b58e30f71 214 lbpLCDWF = (uint8_t *)&LCD->WF8B[0];
mja054 0:d62b58e30f71 215 if (mode==1){lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[1]]|=1;}
mja054 0:d62b58e30f71 216 else {lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[1]]&=~1;}
mja054 0:d62b58e30f71 217 }
mja054 0:d62b58e30f71 218
mja054 0:d62b58e30f71 219 void SLCD::DP2 (int mode)
mja054 0:d62b58e30f71 220 {
mja054 0:d62b58e30f71 221 uint8_t *lbpLCDWF;
mja054 0:d62b58e30f71 222 lbpLCDWF = (uint8_t *)&LCD->WF8B[0];
mja054 0:d62b58e30f71 223 if (mode==1){lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[3]]|=1;}
mja054 0:d62b58e30f71 224 else {lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[3]]&=~1;}
mja054 0:d62b58e30f71 225 }
mja054 0:d62b58e30f71 226
mja054 0:d62b58e30f71 227 void SLCD::DP3 (int mode)
mja054 0:d62b58e30f71 228 {
mja054 0:d62b58e30f71 229 uint8_t *lbpLCDWF;
mja054 0:d62b58e30f71 230 lbpLCDWF = (uint8_t *)&LCD->WF8B[0];
mja054 0:d62b58e30f71 231 if (mode==1){lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[5]]|=1;}
mja054 0:d62b58e30f71 232 else {lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[5]]&=~1;}
mja054 0:d62b58e30f71 233 }
mja054 0:d62b58e30f71 234
mja054 0:d62b58e30f71 235 void SLCD::Colon (int mode)
mja054 0:d62b58e30f71 236 {
mja054 0:d62b58e30f71 237 uint8_t *lbpLCDWF;
mja054 0:d62b58e30f71 238 lbpLCDWF = (uint8_t *)&LCD->WF8B[0];
mja054 0:d62b58e30f71 239 if (mode==1){lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[7]]|=1;}
mja054 0:d62b58e30f71 240 else {lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[7]]&=~1;}
mja054 0:d62b58e30f71 241 }
mja054 0:d62b58e30f71 242
mja054 0:d62b58e30f71 243