Brought over the files from the Freescale site and modified for mbed.

This code is only partially working for me. Not every download seems to be successful on Mac OS X. I just took the example files and hacked them around to get it working with mbed. If you want working code I think Erik Olieman's SLCD project is probably a better source.

main.cpp

//KL46Z try out
#include "mbed.h"
#include "TSISensor.h"
#include "MMA8451Q.h"
#include "MAG3110.h"
#include "vfnLCD.h"
#include <cstdlib>
#include <iostream>

Serial pc(USBTX, USBRX);

TSISensor tsi;
MMA8451Q acc51(PTE25, PTE24, 0x1D<<1);
MAG3110 mag(PTE25, PTE24, 0x0E<<1);
vfnLCD lcd;

PwmOut rled(PTE29);
PwmOut gled(PTD5);
AnalogIn lightSensor(PTE22);
//DigitalIn SW1(PTC3);
//DigitalIn SW3(PTC12);
//AnalogOut lcd03(PTB23);
//PwmOut lcd07(PTB7);

char chBufDisp[10];

int main()
{
    using namespace std;

    float onTime = 1.0;
    float offTime = 0.0;
    float holdTime = 1.0;
    bool on = true;
    bool off = false;
    int magX = 0, magY = 0, magZ = 0;
    int count=100;
 
    uint8_t message[]="1234";
    lcd.vfnLCD_All_Segments_ON();     

    while(true) {  
        cout << "I'm alive and running\n\r";              
        rled = onTime - abs(acc51.getAccX());
        gled = onTime - abs(acc51.getAccY());
        mag.getValues(&magX, &magY, &magZ);
        
        cout << "MMA8451: " << acc51.getAccX() << "\t" << acc51.getAccY() << "\t" << acc51.getAccZ() << "\n\r" << endl;
        cout << "MAG3110: " << magX << "\t" << magY << "\t" << magZ << "\n\r" << endl;
        cout << "MAG3110: " << mag.getHeading() << "\n\r" << endl;
        wait(holdTime);
        
        rled = tsi.readPercentage();
        gled = tsi.readPercentage();
        
        cout << "Touch: " << tsi.readPercentage() << "\n\r" << endl;
        cout << "SW1: " << SW1 << "\n\r" << endl;
        cout << "SW3: " << SW3 << "\n\r" << endl;
        cout << "Light Sensor: " << lightSensor << "\n\r" << endl;
        sprintf(chBufDisp,"%04i",count);
        lcd.vfnLCD_Write_Msg((uint8_t *)chBufDisp);
        count++;
        if (count>9999) count=0;
        wait(holdTime);
    }
    return 0;
}

Committer:
highroads
Date:
Mon Jan 13 22:32:43 2014 +0000
Revision:
0:c5fea5b6b339
Partially working version.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
highroads 0:c5fea5b6b339 1 #include "mbed.h"
highroads 0:c5fea5b6b339 2 #include "vfnLCD.h"
highroads 0:c5fea5b6b339 3 #include "LCDConfig.h"
highroads 0:c5fea5b6b339 4
highroads 0:c5fea5b6b339 5 /*used to indicate in which position of the LCD is the next character to write */
highroads 0:c5fea5b6b339 6 static uint8_t bLCD_CharPosition;
highroads 0:c5fea5b6b339 7 uint8_t lcd_alternate_mode; //this variable must be 0 or 4
highroads 0:c5fea5b6b339 8 uint8_t bflgLCD_Scroll = 0x01;
highroads 0:c5fea5b6b339 9
highroads 0:c5fea5b6b339 10 extern const uint32_t *LCD_TO_PORT[];
highroads 0:c5fea5b6b339 11 extern const uint32_t MASK_BIT[32];
highroads 0:c5fea5b6b339 12
highroads 0:c5fea5b6b339 13 char lcdBuffer[32]; // used for temporary storage for formating strings
highroads 0:c5fea5b6b339 14
highroads 0:c5fea5b6b339 15 /*
highroads 0:c5fea5b6b339 16 local functions
highroads 0:c5fea5b6b339 17
highroads 0:c5fea5b6b339 18 void vfnLCD_Init(void);
highroads 0:c5fea5b6b339 19 void vfnEnablePins(void); // Pin Enable/ BPEN / COM configurations
highroads 0:c5fea5b6b339 20 void vfnSetBackplanes(void); // reconfigure COM to default values
highroads 0:c5fea5b6b339 21 void vfnBP_VScroll(int8_t scroll_count);
highroads 0:c5fea5b6b339 22 void vfnLCD_Home (void);
highroads 0:c5fea5b6b339 23 void vfnLCD_Contrast (uint8_t lbContrast);
highroads 0:c5fea5b6b339 24 void vfnLCD_Write_MsgPlace (uint8_t *lbpMessage, uint8_t lbSize );
highroads 0:c5fea5b6b339 25 void vfnLCD_Write_Msg (uint8_t *lbpMessage);
highroads 0:c5fea5b6b339 26 void vfnLCD_All_Segments_ON (void);
highroads 0:c5fea5b6b339 27 void vfnLCD_All_Segments_Char (uint8_t val);
highroads 0:c5fea5b6b339 28 void vfnLCD_All_Segments_OFF (void);
highroads 0:c5fea5b6b339 29
highroads 0:c5fea5b6b339 30 void vfnLCD_Write_Char (uint8_t lbValue); // This function is dependent on the LCD panel
highroads 0:c5fea5b6b339 31 void PutPoint(uint8_t x, uint8_t y);
highroads 0:c5fea5b6b339 32 void ClrPoint(uint8_t x, uint8_t y);
highroads 0:c5fea5b6b339 33 void SetX(uint8_t x, uint8_t value);
highroads 0:c5fea5b6b339 34
highroads 0:c5fea5b6b339 35
highroads 0:c5fea5b6b339 36 void lcd_pinmux(uint8_t mux_val);
highroads 0:c5fea5b6b339 37
highroads 0:c5fea5b6b339 38 void vfnLCD_interrupt_init(void);
highroads 0:c5fea5b6b339 39 void vfnLCD_isrv(void);
highroads 0:c5fea5b6b339 40
highroads 0:c5fea5b6b339 41
highroads 0:c5fea5b6b339 42
highroads 0:c5fea5b6b339 43 void print_slcd_registers(void)
highroads 0:c5fea5b6b339 44 {
highroads 0:c5fea5b6b339 45 // printf("\n\r LCD_GCR ");
highroads 0:c5fea5b6b339 46 printf("\n\r LCD_GCR = %i",LCD_GCR);
highroads 0:c5fea5b6b339 47 printf("\n\r LCD_AR = %i",LCD_AR);
highroads 0:c5fea5b6b339 48 printf("\n\r LCD_FDCR = %i",LCD_FDCR);
highroads 0:c5fea5b6b339 49 printf("\n\r LCD_FDSR = %i",LCD_FDSR);
highroads 0:c5fea5b6b339 50 printf("\n\r LCD_PENL = %i",LCD_PENL);
highroads 0:c5fea5b6b339 51
highroads 0:c5fea5b6b339 52 printf("\n\r LCD_PENH = %i",LCD_PENH);
highroads 0:c5fea5b6b339 53 printf("\n\r LCD_BPENL = %i",LCD_BPENL);
highroads 0:c5fea5b6b339 54 printf("\n\r LCD_BPENH = %i",LCD_BPENH);
highroads 0:c5fea5b6b339 55 printf("\n\r LCD_WF3TO0 = %i",LCD_WF3TO0);
highroads 0:c5fea5b6b339 56 printf("\n\r LCD_WF7TO4 = %i",LCD_WF7TO4);
highroads 0:c5fea5b6b339 57 printf("\n\r LCD_WF11TO8 = %i",LCD_WF11TO8);
highroads 0:c5fea5b6b339 58 printf("\n\r LCD_WF15TO12 = %i",LCD_WF15TO12);
highroads 0:c5fea5b6b339 59 printf("\n\r LCD_WF19TO16 = %i",LCD_WF19TO16);
highroads 0:c5fea5b6b339 60 printf("\n\r LCD_WF23TO20 = %i",LCD_WF23TO20);
highroads 0:c5fea5b6b339 61 printf("\n\r LCD_WF27TO24 = %i",LCD_WF27TO24);
highroads 0:c5fea5b6b339 62 printf("\n\r LCD_WF31TO28 = %i",LCD_WF31TO28);
highroads 0:c5fea5b6b339 63 printf("\n\r LCD_WF35TO32 = %i",LCD_WF35TO32);
highroads 0:c5fea5b6b339 64 printf("\n\r LCD_WF39TO36 = %i",LCD_WF39TO36);
highroads 0:c5fea5b6b339 65 printf("\n\r LCD_WF43TO40 = %i",LCD_WF43TO40);
highroads 0:c5fea5b6b339 66 printf("\n\r LCD_WF47TO44 = %i",LCD_WF47TO44);
highroads 0:c5fea5b6b339 67 printf("\n\r LCD_WF51TO48 = %i",LCD_WF51TO48);
highroads 0:c5fea5b6b339 68 printf("\n\r LCD_WF55TO52 = %i",LCD_WF55TO52);
highroads 0:c5fea5b6b339 69 printf("\n\r LCD_WF59TO56 = %i",LCD_WF59TO56);
highroads 0:c5fea5b6b339 70 printf("\n\r LCD_WF63TO60 = %i",LCD_WF63TO60);
highroads 0:c5fea5b6b339 71 */
highroads 0:c5fea5b6b339 72
highroads 0:c5fea5b6b339 73 vfnLCD::vfnLCD() {
highroads 0:c5fea5b6b339 74
highroads 0:c5fea5b6b339 75 SIM->SCGC5 |= SIM_SCGC5_SLCD_MASK | SIM_SCGC5_PORTB_MASK | SIM_SCGC5_PORTC_MASK | SIM_SCGC5_PORTD_MASK | SIM_SCGC5_PORTE_MASK;
highroads 0:c5fea5b6b339 76
highroads 0:c5fea5b6b339 77 //* configure pins for LCD operation
highroads 0:c5fea5b6b339 78 PORTC->PCR[20] = 0x00000000; //VLL2
highroads 0:c5fea5b6b339 79 PORTC->PCR[21] = 0x00000000; //VLL1
highroads 0:c5fea5b6b339 80 PORTC->PCR[22] = 0x00000000; //VCAP2
highroads 0:c5fea5b6b339 81 PORTC->PCR[23] = 0x00000000; //VCAP1
highroads 0:c5fea5b6b339 82
highroads 0:c5fea5b6b339 83
highroads 0:c5fea5b6b339 84
highroads 0:c5fea5b6b339 85 // Enable IRCLK
highroads 0:c5fea5b6b339 86 MCG->C1 = MCG_C1_IRCLKEN_MASK | MCG_C1_IREFSTEN_MASK;
highroads 0:c5fea5b6b339 87 MCG->C2 &= ~MCG_C2_IRCS_MASK ; //0 32KHZ internal reference clock; 1= 4MHz irc
highroads 0:c5fea5b6b339 88
highroads 0:c5fea5b6b339 89
highroads 0:c5fea5b6b339 90 vfnLCD_interrupt_init();
highroads 0:c5fea5b6b339 91
highroads 0:c5fea5b6b339 92 LCD->GCR = 0x0;
highroads 0:c5fea5b6b339 93 LCD->AR = 0x0;
highroads 0:c5fea5b6b339 94
highroads 0:c5fea5b6b339 95 // lcd_pinmux(0);
highroads 0:c5fea5b6b339 96
highroads 0:c5fea5b6b339 97 /* LCD configurartion according to */
highroads 0:c5fea5b6b339 98 LCD->GCR = ( LCD_GCR_RVEN_MASK*_LCDRVEN
highroads 0:c5fea5b6b339 99 | LCD_GCR_RVTRIM(_LCDRVTRIM) //0-15
highroads 0:c5fea5b6b339 100 | LCD_GCR_CPSEL_MASK*_LCDCPSEL
highroads 0:c5fea5b6b339 101 | LCD_GCR_LADJ(_LCDLOADADJUST) //0-3*/
highroads 0:c5fea5b6b339 102 | LCD_GCR_VSUPPLY_MASK*_LCDSUPPLY //0-1*/
highroads 0:c5fea5b6b339 103 |!LCD_GCR_FDCIEN_MASK
highroads 0:c5fea5b6b339 104 | LCD_GCR_ALTDIV(_LCDALTDIV) //0-3
highroads 0:c5fea5b6b339 105 |!LCD_GCR_LCDDOZE_MASK
highroads 0:c5fea5b6b339 106 |!LCD_GCR_LCDSTP_MASK
highroads 0:c5fea5b6b339 107 |!LCD_GCR_LCDEN_MASK //WILL BE ENABLE ON SUBSEQUENT STEP
highroads 0:c5fea5b6b339 108 | LCD_GCR_SOURCE_MASK*_LCDCLKSOURCE
highroads 0:c5fea5b6b339 109 | LCD_GCR_ALTSOURCE_MASK*_LCDALRCLKSOURCE
highroads 0:c5fea5b6b339 110 | LCD_GCR_LCLK(_LCDLCK) //0-7
highroads 0:c5fea5b6b339 111 | LCD_GCR_DUTY(_LCDDUTY) //0-7
highroads 0:c5fea5b6b339 112 );
highroads 0:c5fea5b6b339 113
highroads 0:c5fea5b6b339 114 lcd_alternate_mode = LCD_NORMAL_MODE; //Message will be written to default backplanes if = 4
highroads 0:c5fea5b6b339 115
highroads 0:c5fea5b6b339 116 vfnEnablePins(); // Enable LCD pins and Configure BackPlanes
highroads 0:c5fea5b6b339 117
highroads 0:c5fea5b6b339 118
highroads 0:c5fea5b6b339 119 LCD->GCR |= LCD_GCR_LCDEN_MASK;
highroads 0:c5fea5b6b339 120 /* LCD_GCR |= LCD_GCR_LCDIEN_MASK; // Enable interrupts */
highroads 0:c5fea5b6b339 121
highroads 0:c5fea5b6b339 122
highroads 0:c5fea5b6b339 123 /* Configure LCD Auxiliar Register*/
highroads 0:c5fea5b6b339 124 LCD->AR = LCD_AR_BRATE(_LCDBLINKRATE); // all other flags set as zero
highroads 0:c5fea5b6b339 125 // print_slcd_registers();
highroads 0:c5fea5b6b339 126 }
highroads 0:c5fea5b6b339 127
highroads 0:c5fea5b6b339 128
highroads 0:c5fea5b6b339 129 /* Enable pins according WF_ORDERING_TABLE, BP_ORDERING_TABLE
highroads 0:c5fea5b6b339 130 //Enable the LCD module frontplane waveform output (FP[39:0])
highroads 0:c5fea5b6b339 131 LCD_PENH = 0xFFFFFFFF;
highroads 0:c5fea5b6b339 132 LCD_PENL = 0xFFFFFFFF;
highroads 0:c5fea5b6b339 133
highroads 0:c5fea5b6b339 134 */
highroads 0:c5fea5b6b339 135
highroads 0:c5fea5b6b339 136 void vfnLCD::vfnEnablePins (void)
highroads 0:c5fea5b6b339 137 {
highroads 0:c5fea5b6b339 138 uint8_t i;
highroads 0:c5fea5b6b339 139 uint32_t *p_pen;
highroads 0:c5fea5b6b339 140 uint8_t pen_offset; // 0 or 1
highroads 0:c5fea5b6b339 141 uint8_t pen_bit; //0 to 31
highroads 0:c5fea5b6b339 142
highroads 0:c5fea5b6b339 143 LCD->PEN[0]= 0x00;
highroads 0:c5fea5b6b339 144 LCD->PEN[1] = 0x0;
highroads 0:c5fea5b6b339 145 LCD->BPEN[0] = 0x00;
highroads 0:c5fea5b6b339 146 LCD->BPEN[1] = 0x00;
highroads 0:c5fea5b6b339 147
highroads 0:c5fea5b6b339 148 p_pen = (uint32_t *)LCD->PEN;
highroads 0:c5fea5b6b339 149
highroads 0:c5fea5b6b339 150 for (i=0;i<_LCDUSEDPINS;i++)
highroads 0:c5fea5b6b339 151 {
highroads 0:c5fea5b6b339 152 pen_offset = WF_ORDERING_TABLE[i]/32;
highroads 0:c5fea5b6b339 153 pen_bit = WF_ORDERING_TABLE[i]%32;
highroads 0:c5fea5b6b339 154 p_pen[pen_offset] |= MASK_BIT[pen_bit];
highroads 0:c5fea5b6b339 155 if (i>= _LCDFRONTPLANES) // Pin is a backplane
highroads 0:c5fea5b6b339 156 {
highroads 0:c5fea5b6b339 157 p_pen[pen_offset+2] |= MASK_BIT[pen_bit]; // Enable BPEN
highroads 0:c5fea5b6b339 158 LCD->WF8B[WF_ORDERING_TABLE[i]] = MASK_BIT[i - _LCDFRONTPLANES]; // fill with 0x01, 0x02, etc
highroads 0:c5fea5b6b339 159 }
highroads 0:c5fea5b6b339 160 }
highroads 0:c5fea5b6b339 161 }
highroads 0:c5fea5b6b339 162
highroads 0:c5fea5b6b339 163 /*
highroads 0:c5fea5b6b339 164 Fill Backplanes with normal mask for 0x01, 0x02, according to BP_ORDERING_TABLE;
highroads 0:c5fea5b6b339 165 */
highroads 0:c5fea5b6b339 166 void vfnLCD::vfnSetBackplanes(void)
highroads 0:c5fea5b6b339 167 {
highroads 0:c5fea5b6b339 168 uint8_t i;
highroads 0:c5fea5b6b339 169 for (i=0;i<_LCDBACKPLANES;i++)
highroads 0:c5fea5b6b339 170 {
highroads 0:c5fea5b6b339 171 LCD->WF8B[WF_ORDERING_TABLE[i+_LCDFRONTPLANES]]=0x01<<i;
highroads 0:c5fea5b6b339 172 }
highroads 0:c5fea5b6b339 173 };
highroads 0:c5fea5b6b339 174
highroads 0:c5fea5b6b339 175
highroads 0:c5fea5b6b339 176 /*
highroads 0:c5fea5b6b339 177
highroads 0:c5fea5b6b339 178 rotate Backplanes scroll_y units
highroads 0:c5fea5b6b339 179 if scroll_y>0 rotate to the right
highroads 0:c5fea5b6b339 180 if scroll_y<0 rotate to the left
highroads 0:c5fea5b6b339 181 if scroll_y=0 set normal configuration
highroads 0:c5fea5b6b339 182
highroads 0:c5fea5b6b339 183 */
highroads 0:c5fea5b6b339 184 void vfnLCD::vfnBP_VScroll(int8_t scroll_count)
highroads 0:c5fea5b6b339 185 {
highroads 0:c5fea5b6b339 186 uint8_t bp_count;
highroads 0:c5fea5b6b339 187 if (scroll_count != 0)
highroads 0:c5fea5b6b339 188 {
highroads 0:c5fea5b6b339 189 for (bp_count=0;bp_count< _LCDBACKPLANES; bp_count++)
highroads 0:c5fea5b6b339 190 {
highroads 0:c5fea5b6b339 191 if (scroll_count>0)
highroads 0:c5fea5b6b339 192 LCD->WF8B[0]=((uint8_t)WF_ORDERING_TABLE[_LCDFRONTPLANES +bp_count]);
highroads 0:c5fea5b6b339 193 else //(scroll_count<0)
highroads 0:c5fea5b6b339 194 {
highroads 0:c5fea5b6b339 195 LCD->WF8B[0]=((uint8_t)WF_ORDERING_TABLE[_LCDFRONTPLANES +bp_count]);
highroads 0:c5fea5b6b339 196 }
highroads 0:c5fea5b6b339 197 }
highroads 0:c5fea5b6b339 198 }
highroads 0:c5fea5b6b339 199 else vfnSetBackplanes();
highroads 0:c5fea5b6b339 200 }
highroads 0:c5fea5b6b339 201
highroads 0:c5fea5b6b339 202
highroads 0:c5fea5b6b339 203
highroads 0:c5fea5b6b339 204 void vfnLCD::vfnLCD_Home (void)
highroads 0:c5fea5b6b339 205 {
highroads 0:c5fea5b6b339 206 bLCD_CharPosition = 0;
highroads 0:c5fea5b6b339 207 }
highroads 0:c5fea5b6b339 208
highroads 0:c5fea5b6b339 209 void vfnLCD::vfnLCD_Contrast (uint8_t lbContrast)
highroads 0:c5fea5b6b339 210 {
highroads 0:c5fea5b6b339 211 lbContrast &= 0x0F; //Forced to the only values accepted
highroads 0:c5fea5b6b339 212 LCD->GCR |= LCD_GCR_RVTRIM(lbContrast);
highroads 0:c5fea5b6b339 213 }
highroads 0:c5fea5b6b339 214
highroads 0:c5fea5b6b339 215 void vfnLCD::vfnLCD_Write_MsgPlace (uint8_t *lbpMessage, uint8_t lbSize )
highroads 0:c5fea5b6b339 216 {
highroads 0:c5fea5b6b339 217
highroads 0:c5fea5b6b339 218 if (lbSize > _CHARNUM)
highroads 0:c5fea5b6b339 219 {
highroads 0:c5fea5b6b339 220 vfnLCD_Scroll(lbpMessage, lbSize);
highroads 0:c5fea5b6b339 221 }
highroads 0:c5fea5b6b339 222 else
highroads 0:c5fea5b6b339 223 {
highroads 0:c5fea5b6b339 224 do
highroads 0:c5fea5b6b339 225 {
highroads 0:c5fea5b6b339 226 vfnLCD_Write_Char (*lbpMessage);
highroads 0:c5fea5b6b339 227 lbpMessage ++;
highroads 0:c5fea5b6b339 228 }while (--lbSize);
highroads 0:c5fea5b6b339 229 }
highroads 0:c5fea5b6b339 230
highroads 0:c5fea5b6b339 231 }
highroads 0:c5fea5b6b339 232
highroads 0:c5fea5b6b339 233
highroads 0:c5fea5b6b339 234
highroads 0:c5fea5b6b339 235 /*
highroads 0:c5fea5b6b339 236 vfnLCD_Write_Msg. Display a Message starting at the first character of display
highroads 0:c5fea5b6b339 237 until _CHARNUM or End of string.
highroads 0:c5fea5b6b339 238 */
highroads 0:c5fea5b6b339 239
highroads 0:c5fea5b6b339 240 void vfnLCD::vfnLCD_Write_Msg (uint8_t *lbpMessage) {
highroads 0:c5fea5b6b339 241 uint8_t lbSize = 0;
highroads 0:c5fea5b6b339 242 bLCD_CharPosition = 0; //Home display
highroads 0:c5fea5b6b339 243 while (lbSize<_CHARNUM && *lbpMessage!='\0') {
highroads 0:c5fea5b6b339 244 vfnLCD_Write_Char(*lbpMessage++);
highroads 0:c5fea5b6b339 245 lbSize++;
highroads 0:c5fea5b6b339 246 }
highroads 0:c5fea5b6b339 247 if (lbSize<_CHARNUM) {
highroads 0:c5fea5b6b339 248 while (lbSize++< _CHARNUM) {
highroads 0:c5fea5b6b339 249 vfnLCD_Write_Char(BLANK_CHARACTER); // complete data with blanks
highroads 0:c5fea5b6b339 250 }
highroads 0:c5fea5b6b339 251 }
highroads 0:c5fea5b6b339 252 }
highroads 0:c5fea5b6b339 253
highroads 0:c5fea5b6b339 254 void vfnLCD::vfnLCD_All_Segments_ON (void)
highroads 0:c5fea5b6b339 255 {
highroads 0:c5fea5b6b339 256 uint8_t lbTotalBytes = _CHARNUM * _LCDTYPE;
highroads 0:c5fea5b6b339 257 uint8_t lbCounter=0;
highroads 0:c5fea5b6b339 258 uint8_t *lbpLCDWF;
highroads 0:c5fea5b6b339 259
highroads 0:c5fea5b6b339 260 lbpLCDWF = (uint8_t *)&LCD->WF;
highroads 0:c5fea5b6b339 261
highroads 0:c5fea5b6b339 262 while (lbCounter < lbTotalBytes)
highroads 0:c5fea5b6b339 263 {
highroads 0:c5fea5b6b339 264 lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[lbCounter++]]=_ALLON;
highroads 0:c5fea5b6b339 265 }
highroads 0:c5fea5b6b339 266
highroads 0:c5fea5b6b339 267 }
highroads 0:c5fea5b6b339 268
highroads 0:c5fea5b6b339 269
highroads 0:c5fea5b6b339 270 void vfnLCD::vfnLCD_All_Segments_Char (uint8_t val)
highroads 0:c5fea5b6b339 271 {
highroads 0:c5fea5b6b339 272 uint8_t lbTotalBytes = _CHARNUM * _LCDTYPE;
highroads 0:c5fea5b6b339 273 uint8_t lbCounter=0;
highroads 0:c5fea5b6b339 274 uint8_t *lbpLCDWF;
highroads 0:c5fea5b6b339 275 lbpLCDWF = (uint8_t *)&LCD->WF;
highroads 0:c5fea5b6b339 276 while (lbCounter < lbTotalBytes)
highroads 0:c5fea5b6b339 277 {
highroads 0:c5fea5b6b339 278 lbpLCDWF[WF_ORDERING_TABLE[lbCounter++]]=val;
highroads 0:c5fea5b6b339 279 }
highroads 0:c5fea5b6b339 280
highroads 0:c5fea5b6b339 281 }
highroads 0:c5fea5b6b339 282
highroads 0:c5fea5b6b339 283
highroads 0:c5fea5b6b339 284 void vfnLCD::vfnLCD_All_Segments_OFF (void)
highroads 0:c5fea5b6b339 285 {
highroads 0:c5fea5b6b339 286 uint8_t lbTotalBytes = _CHARNUM * _LCDTYPE;
highroads 0:c5fea5b6b339 287 uint8_t lbCounter=0;
highroads 0:c5fea5b6b339 288 uint8_t *lbpLCDWF;
highroads 0:c5fea5b6b339 289
highroads 0:c5fea5b6b339 290 lbpLCDWF = (uint8_t *)&LCD->WF;
highroads 0:c5fea5b6b339 291 while (lbCounter < lbTotalBytes)
highroads 0:c5fea5b6b339 292 {
highroads 0:c5fea5b6b339 293 lbpLCDWF[WF_ORDERING_TABLE[lbCounter++]]=0;
highroads 0:c5fea5b6b339 294 }
highroads 0:c5fea5b6b339 295 }
highroads 0:c5fea5b6b339 296
highroads 0:c5fea5b6b339 297
highroads 0:c5fea5b6b339 298
highroads 0:c5fea5b6b339 299 /*
highroads 0:c5fea5b6b339 300
highroads 0:c5fea5b6b339 301 Write a Char at position bLCD_CharPosition;
highroads 0:c5fea5b6b339 302 After write is complete bLCD_CharPosition point to next position
highroads 0:c5fea5b6b339 303
highroads 0:c5fea5b6b339 304 Verify Char is a Valid character between '0' and 'z'
highroads 0:c5fea5b6b339 305 in this case char is between 'a' to 'z' are taken as upper case
highroads 0:c5fea5b6b339 306
highroads 0:c5fea5b6b339 307 If the char is a invalid char it is taken as ':' code, in this case as SPACE
highroads 0:c5fea5b6b339 308
highroads 0:c5fea5b6b339 309 Aug-16 LP arrayOffset was added due that array size with matrix symbols is greater than uint8
highroads 0:c5fea5b6b339 310
highroads 0:c5fea5b6b339 311 */
highroads 0:c5fea5b6b339 312 #ifdef DOT_MATRIX
highroads 0:c5fea5b6b339 313
highroads 0:c5fea5b6b339 314 void vfnLCD::vfnLCD_Write_Char (uint8_t lbValue)
highroads 0:c5fea5b6b339 315 {
highroads 0:c5fea5b6b339 316 uint8_t char_val, temp; //for test only
highroads 0:c5fea5b6b339 317 uint8_t *lbpLCDWF;
highroads 0:c5fea5b6b339 318 uint8_t lbCounter;
highroads 0:c5fea5b6b339 319
highroads 0:c5fea5b6b339 320 uint16_t arrayOffset;
highroads 0:c5fea5b6b339 321 uint8_t position;
highroads 0:c5fea5b6b339 322
highroads 0:c5fea5b6b339 323
highroads 0:c5fea5b6b339 324 lbpLCDWF = (uint8_t *)&LCD_WF3TO0;
highroads 0:c5fea5b6b339 325
highroads 0:c5fea5b6b339 326
highroads 0:c5fea5b6b339 327 /*only ascci character if value not writeable write as @*/
highroads 0:c5fea5b6b339 328
highroads 0:c5fea5b6b339 329 if (lbValue>='a' && lbValue<='z') lbValue -= 32; // UpperCase
highroads 0:c5fea5b6b339 330 if (lbValue<ASCCI_TABLE_START || lbValue >ASCCI_TABLE_END) lbValue = BLANK_CHARACTER; // default value as space
highroads 0:c5fea5b6b339 331
highroads 0:c5fea5b6b339 332 lbValue -=ASCCI_TABLE_START; // Remove the offset to search in the ascci table
highroads 0:c5fea5b6b339 333
highroads 0:c5fea5b6b339 334 arrayOffset = (lbValue * _CHAR_SIZE); // Compensate matrix offset
highroads 0:c5fea5b6b339 335
highroads 0:c5fea5b6b339 336
highroads 0:c5fea5b6b339 337
highroads 0:c5fea5b6b339 338 // ensure bLCD position is in valid limit
highroads 0:c5fea5b6b339 339
highroads 0:c5fea5b6b339 340 lbCounter =0; //number of writings to complete one char
highroads 0:c5fea5b6b339 341 while (lbCounter<_CHAR_SIZE && bLCD_CharPosition < _CHARNUM )
highroads 0:c5fea5b6b339 342 {
highroads 0:c5fea5b6b339 343 // position = (bLCD_CharPosition) *_CHAR_SIZE + lbCounter; //-1 to compensate first incomplete character
highroads 0:c5fea5b6b339 344 // position = (bLCD_CharPosition) *_LCDTYPE + lbCounter; //-1 to compensate first incomplete character
highroads 0:c5fea5b6b339 345 position = bLCD_CharPosition; // for DOt matrix
highroads 0:c5fea5b6b339 346
highroads 0:c5fea5b6b339 347
highroads 0:c5fea5b6b339 348 char_val = ASCII_TO_WF_CODIFICATION_TABLE[arrayOffset + lbCounter];
highroads 0:c5fea5b6b339 349 if (bLCD_CharPosition==0) //write complete character
highroads 0:c5fea5b6b339 350 {
highroads 0:c5fea5b6b339 351 lbpLCDWF[WF_ORDERING_TABLE[position]] = char_val; //all 4 bits correspond to 7 digit character
highroads 0:c5fea5b6b339 352 }
highroads 0:c5fea5b6b339 353 else //bit0 of second character is a symbol (DP o COL on the LCD) and must not be written
highroads 0:c5fea5b6b339 354 {
highroads 0:c5fea5b6b339 355
highroads 0:c5fea5b6b339 356 temp = lbpLCDWF[WF_ORDERING_TABLE[position]] & 0x01; //bit 0 correspond to a Symbol
highroads 0:c5fea5b6b339 357 lbpLCDWF[WF_ORDERING_TABLE[position]] = char_val | temp; //only bit 1,2,3 correspond to 7 digit character
highroads 0:c5fea5b6b339 358 }
highroads 0:c5fea5b6b339 359
highroads 0:c5fea5b6b339 360 if (char_val==0) lbCounter = _CHAR_SIZE; //end of this character
highroads 0:c5fea5b6b339 361 lbCounter++;
highroads 0:c5fea5b6b339 362 bLCD_CharPosition++;
highroads 0:c5fea5b6b339 363 }
highroads 0:c5fea5b6b339 364
highroads 0:c5fea5b6b339 365 }
highroads 0:c5fea5b6b339 366
highroads 0:c5fea5b6b339 367 #else
highroads 0:c5fea5b6b339 368
highroads 0:c5fea5b6b339 369 // For 7 Segment LCD
highroads 0:c5fea5b6b339 370 void vfnLCD::vfnLCD_Write_Char (uint8_t lbValue) {
highroads 0:c5fea5b6b339 371 uint8_t char_val;
highroads 0:c5fea5b6b339 372 uint8_t temp;
highroads 0:c5fea5b6b339 373 uint8_t *lbpLCDWF;
highroads 0:c5fea5b6b339 374 uint8_t lbCounter;
highroads 0:c5fea5b6b339 375 uint16_t arrayOffset;
highroads 0:c5fea5b6b339 376 uint8_t position;
highroads 0:c5fea5b6b339 377
highroads 0:c5fea5b6b339 378 lbpLCDWF = (uint8_t *)LCD->WF;
highroads 0:c5fea5b6b339 379 /* only ascii character if value not writeable write as @ */
highroads 0:c5fea5b6b339 380 if (lbValue>='a' && lbValue<='z') {
highroads 0:c5fea5b6b339 381 lbValue -= 32; // UpperCase
highroads 0:c5fea5b6b339 382 }
highroads 0:c5fea5b6b339 383 if (lbValue<ASCCI_TABLE_START || lbValue >ASCCI_TABLE_END) {
highroads 0:c5fea5b6b339 384 lbValue = BLANK_CHARACTER; // default value as space
highroads 0:c5fea5b6b339 385 }
highroads 0:c5fea5b6b339 386 lbValue -=ASCCI_TABLE_START; // Remove the offset to search in the ascci table
highroads 0:c5fea5b6b339 387 arrayOffset = (lbValue * _CHAR_SIZE); // Compensate matrix offset
highroads 0:c5fea5b6b339 388 // ensure bLCD position is in valid limit
highroads 0:c5fea5b6b339 389 lbCounter = 0; //number of writings to complete one char
highroads 0:c5fea5b6b339 390 while (lbCounter<_CHAR_SIZE && bLCD_CharPosition < _CHARNUM) {
highroads 0:c5fea5b6b339 391 position = (bLCD_CharPosition) *_LCDTYPE + lbCounter;
highroads 0:c5fea5b6b339 392 temp=0;
highroads 0:c5fea5b6b339 393 if (lbCounter==1) {
highroads 0:c5fea5b6b339 394 temp = lbpLCDWF[WF_ORDERING_TABLE[position]] & 0x01;//bit 0 has the special symbol information
highroads 0:c5fea5b6b339 395 }
highroads 0:c5fea5b6b339 396 char_val = ASCII_TO_WF_CODIFICATION_TABLE[arrayOffset + lbCounter];
highroads 0:c5fea5b6b339 397 lbpLCDWF[WF_ORDERING_TABLE[position]] = char_val | temp;
highroads 0:c5fea5b6b339 398 // if (char_val==0) lbCounter = _CHAR_SIZE; //end of this character
highroads 0:c5fea5b6b339 399 lbCounter++;
highroads 0:c5fea5b6b339 400 }
highroads 0:c5fea5b6b339 401 bLCD_CharPosition++;
highroads 0:c5fea5b6b339 402 }
highroads 0:c5fea5b6b339 403
highroads 0:c5fea5b6b339 404 #endif
highroads 0:c5fea5b6b339 405
highroads 0:c5fea5b6b339 406 void vfnLCD::vfnLCD_Scroll(uint8_t *lbpMessage, uint8_t lbSize)
highroads 0:c5fea5b6b339 407 {
highroads 0:c5fea5b6b339 408 }
highroads 0:c5fea5b6b339 409
highroads 0:c5fea5b6b339 410 void vfnLCD::PutPoint(uint8_t x, uint8_t y)
highroads 0:c5fea5b6b339 411 {
highroads 0:c5fea5b6b339 412 uint8_t *lbpLCDWF;
highroads 0:c5fea5b6b339 413 lbpLCDWF = (uint8_t *)LCD->WF;
highroads 0:c5fea5b6b339 414
highroads 0:c5fea5b6b339 415 if (x>= _CHARNUM || y>7) return;
highroads 0:c5fea5b6b339 416 lbpLCDWF[WF_ORDERING_TABLE[x]] |= (1<<y);
highroads 0:c5fea5b6b339 417
highroads 0:c5fea5b6b339 418 }
highroads 0:c5fea5b6b339 419
highroads 0:c5fea5b6b339 420
highroads 0:c5fea5b6b339 421 void vfnLCD::ClrPoint(uint8_t x, uint8_t y)
highroads 0:c5fea5b6b339 422 {
highroads 0:c5fea5b6b339 423 uint8_t *lbpLCDWF;
highroads 0:c5fea5b6b339 424 lbpLCDWF = (uint8_t *)LCD->WF;
highroads 0:c5fea5b6b339 425 if (x>= _CHARNUM || y>7) return;
highroads 0:c5fea5b6b339 426 lbpLCDWF[WF_ORDERING_TABLE[x]] &= ~(1<<y);
highroads 0:c5fea5b6b339 427
highroads 0:c5fea5b6b339 428 }
highroads 0:c5fea5b6b339 429
highroads 0:c5fea5b6b339 430
highroads 0:c5fea5b6b339 431
highroads 0:c5fea5b6b339 432 void vfnLCD::SetX(uint8_t x, uint8_t value)
highroads 0:c5fea5b6b339 433 {
highroads 0:c5fea5b6b339 434 uint8_t *lbpLCDWF;
highroads 0:c5fea5b6b339 435 lbpLCDWF = (uint8_t *)LCD->WF;
highroads 0:c5fea5b6b339 436
highroads 0:c5fea5b6b339 437 if (x>= _CHARNUM) return;
highroads 0:c5fea5b6b339 438 lbpLCDWF[WF_ORDERING_TABLE[x]] = value;
highroads 0:c5fea5b6b339 439
highroads 0:c5fea5b6b339 440 }
highroads 0:c5fea5b6b339 441
highroads 0:c5fea5b6b339 442
highroads 0:c5fea5b6b339 443
highroads 0:c5fea5b6b339 444 /*
highroads 0:c5fea5b6b339 445 Configure LCD used pins as MUX=0 for LCD normal operation (analog operation)
highroads 0:c5fea5b6b339 446 Configure LCD used pins as MUX=7 for LCD Fault detectionoperation (pull resistor control enabled)
highroads 0:c5fea5b6b339 447 only 0 or 7 is allowed for LCD operation
highroads 0:c5fea5b6b339 448 */
highroads 0:c5fea5b6b339 449
highroads 0:c5fea5b6b339 450 void vfnLCD::lcd_pinmux(uint8_t mux_val)
highroads 0:c5fea5b6b339 451 {
highroads 0:c5fea5b6b339 452 uint8_t i;
highroads 0:c5fea5b6b339 453
highroads 0:c5fea5b6b339 454 for (i=0;i< _LCDUSEDPINS; i++)
highroads 0:c5fea5b6b339 455 {
highroads 0:c5fea5b6b339 456 *(uint32_t *)LCD_TO_PORT[WF_ORDERING_TABLE[i]] &= ~PORT_PCR_MUX_MASK; //Clear previos value
highroads 0:c5fea5b6b339 457 *(uint32_t *)LCD_TO_PORT[WF_ORDERING_TABLE[i]] |= PORT_PCR_MUX(mux_val); // Set new value
highroads 0:c5fea5b6b339 458 }
highroads 0:c5fea5b6b339 459 }
highroads 0:c5fea5b6b339 460
highroads 0:c5fea5b6b339 461 /*
highroads 0:c5fea5b6b339 462 vfnLCD_interrupt_init
highroads 0:c5fea5b6b339 463 for kinetis NVIC must be initialized in order to
highroads 0:c5fea5b6b339 464
highroads 0:c5fea5b6b339 465 */
highroads 0:c5fea5b6b339 466 void vfnLCD::vfnLCD_interrupt_init(void)
highroads 0:c5fea5b6b339 467 {
highroads 0:c5fea5b6b339 468
highroads 0:c5fea5b6b339 469 }
highroads 0:c5fea5b6b339 470
highroads 0:c5fea5b6b339 471 /*
highroads 0:c5fea5b6b339 472
highroads 0:c5fea5b6b339 473
highroads 0:c5fea5b6b339 474 */
highroads 0:c5fea5b6b339 475 void vfnLCD::vfnLCD_isrv(void)
highroads 0:c5fea5b6b339 476 {
highroads 0:c5fea5b6b339 477 // LcdInterruptCallBack(); // User defined function
highroads 0:c5fea5b6b339 478 }
highroads 0:c5fea5b6b339 479
highroads 0:c5fea5b6b339 480
highroads 0:c5fea5b6b339 481 /*
highroads 0:c5fea5b6b339 482 This table relates LCD_Px to PORT Control Pin
highroads 0:c5fea5b6b339 483 in used for pinmux function
highroads 0:c5fea5b6b339 484 */
highroads 0:c5fea5b6b339 485
highroads 0:c5fea5b6b339 486
highroads 0:c5fea5b6b339 487 const uint32_t *LCD_TO_PORT[60] =
highroads 0:c5fea5b6b339 488 {
highroads 0:c5fea5b6b339 489 (uint32_t *) PORTB->PCR[0], //LCD_P00
highroads 0:c5fea5b6b339 490 (uint32_t *) PORTB->PCR[1], //LCD_P01
highroads 0:c5fea5b6b339 491 (uint32_t *) PORTB->PCR[2], //LCD_P02
highroads 0:c5fea5b6b339 492 (uint32_t *) PORTB->PCR[3], //LCD_P03
highroads 0:c5fea5b6b339 493 (uint32_t *) PORTC->PCR[20], //LCD_P04
highroads 0:c5fea5b6b339 494 (uint32_t *) PORTC->PCR[21], //LCD_P05
highroads 0:c5fea5b6b339 495 //(uint32 *) PORTC->PCR[22], //LCD_P06
highroads 0:c5fea5b6b339 496 (uint32_t *) PORTB->PCR[0], //LCD_P00 test
highroads 0:c5fea5b6b339 497
highroads 0:c5fea5b6b339 498 (uint32_t *) PORTB->PCR[7], //LCD_P07
highroads 0:c5fea5b6b339 499 (uint32_t *) PORTB->PCR[8], //LCD_P08
highroads 0:c5fea5b6b339 500 (uint32_t *) PORTB->PCR[9], //LCD_P09
highroads 0:c5fea5b6b339 501 (uint32_t *) PORTB->PCR[10], //LCD_P10
highroads 0:c5fea5b6b339 502 (uint32_t *) PORTB->PCR[11], //LCD_P11
highroads 0:c5fea5b6b339 503 (uint32_t *) PORTB->PCR[16], //LCD_P12
highroads 0:c5fea5b6b339 504 (uint32_t *) PORTB->PCR[17], //LCD_P13
highroads 0:c5fea5b6b339 505 (uint32_t *) PORTB->PCR[18], //LCD_P14
highroads 0:c5fea5b6b339 506 (uint32_t *) PORTB->PCR[19], //LCD_P15
highroads 0:c5fea5b6b339 507 (uint32_t *) PORTB->PCR[20], //LCD_P16
highroads 0:c5fea5b6b339 508 (uint32_t *) PORTB->PCR[21], //LCD_P17
highroads 0:c5fea5b6b339 509 (uint32_t *) PORTB->PCR[22], //LCD_P18
highroads 0:c5fea5b6b339 510 (uint32_t *) PORTB->PCR[23], //LCD_P19
highroads 0:c5fea5b6b339 511 (uint32_t *) PORTC->PCR[0], //LCD_P20
highroads 0:c5fea5b6b339 512 (uint32_t *) PORTC->PCR[1], //LCD_P21
highroads 0:c5fea5b6b339 513 (uint32_t *) PORTC->PCR[2], //LCD_P22
highroads 0:c5fea5b6b339 514 (uint32_t *) PORTC->PCR[3], //LCD_P23
highroads 0:c5fea5b6b339 515 (uint32_t *) PORTC->PCR[4], //LCD_P24
highroads 0:c5fea5b6b339 516 (uint32_t *) PORTC->PCR[5], //LCD_P25
highroads 0:c5fea5b6b339 517 (uint32_t *) PORTC->PCR[6], //LCD_P26
highroads 0:c5fea5b6b339 518 (uint32_t *) PORTC->PCR[7], //LCD_P27
highroads 0:c5fea5b6b339 519 (uint32_t *) PORTC->PCR[8], //LCD_P28
highroads 0:c5fea5b6b339 520 (uint32_t *) PORTC->PCR[9], //LCD_P29
highroads 0:c5fea5b6b339 521 (uint32_t *) PORTC->PCR[10], //LCD_P30
highroads 0:c5fea5b6b339 522 (uint32_t *) PORTC->PCR[11], //LCD_P31
highroads 0:c5fea5b6b339 523 (uint32_t *) PORTC->PCR[12], //LCD_P32
highroads 0:c5fea5b6b339 524 (uint32_t *) PORTC->PCR[13], //LCD_P33
highroads 0:c5fea5b6b339 525 (uint32_t *) PORTC->PCR[16], //LCD_P36
highroads 0:c5fea5b6b339 526 (uint32_t *) PORTC->PCR[17], //LCD_P37
highroads 0:c5fea5b6b339 527 (uint32_t *) PORTC->PCR[18], //LCD_P38
highroads 0:c5fea5b6b339 528 (uint32_t *) PORTC->PCR[23], //LCD_P39
highroads 0:c5fea5b6b339 529 (uint32_t *) PORTD->PCR[0], //LCD_P40
highroads 0:c5fea5b6b339 530 (uint32_t *) PORTD->PCR[1], //LCD_P41
highroads 0:c5fea5b6b339 531 (uint32_t *) PORTD->PCR[2], //LCD_P42
highroads 0:c5fea5b6b339 532 (uint32_t *) PORTD->PCR[3], //LCD_P43
highroads 0:c5fea5b6b339 533 (uint32_t *) PORTD->PCR[4], //LCD_P44
highroads 0:c5fea5b6b339 534 (uint32_t *) PORTD->PCR[5], //LCD_P45
highroads 0:c5fea5b6b339 535 (uint32_t *) PORTD->PCR[6], //LCD_P46
highroads 0:c5fea5b6b339 536 (uint32_t *) PORTD->PCR[7], //LCD_P47
highroads 0:c5fea5b6b339 537 (uint32_t *) PORTE->PCR[0], //LCD_P48
highroads 0:c5fea5b6b339 538 (uint32_t *) PORTE->PCR[1], //LCD_P49
highroads 0:c5fea5b6b339 539 (uint32_t *) PORTE->PCR[2], //LCD_P50
highroads 0:c5fea5b6b339 540 (uint32_t *) PORTE->PCR[3], //LCD_P51
highroads 0:c5fea5b6b339 541 (uint32_t *) PORTE->PCR[4], //LCD_P52
highroads 0:c5fea5b6b339 542 (uint32_t *) PORTE->PCR[5], //LCD_P53
highroads 0:c5fea5b6b339 543 (uint32_t *) PORTE->PCR[6], //LCD_P54
highroads 0:c5fea5b6b339 544 (uint32_t *) PORTE->PCR[16], //LCD_P55
highroads 0:c5fea5b6b339 545 (uint32_t *) PORTE->PCR[17], //LCD_P56
highroads 0:c5fea5b6b339 546 (uint32_t *) PORTE->PCR[18], //LCD_P57
highroads 0:c5fea5b6b339 547 (uint32_t *) PORTE->PCR[19], //LCD_P58
highroads 0:c5fea5b6b339 548 (uint32_t *) PORTE->PCR[20], //LCD_P59
highroads 0:c5fea5b6b339 549 (uint32_t *) PORTE->PCR[21], //LCD_P60
highroads 0:c5fea5b6b339 550
highroads 0:c5fea5b6b339 551
highroads 0:c5fea5b6b339 552 };
highroads 0:c5fea5b6b339 553
highroads 0:c5fea5b6b339 554 const uint32_t MASK_BIT[32] =
highroads 0:c5fea5b6b339 555 {
highroads 0:c5fea5b6b339 556 0x00000001 ,
highroads 0:c5fea5b6b339 557 0x00000002 ,
highroads 0:c5fea5b6b339 558 0x00000004 ,
highroads 0:c5fea5b6b339 559 0x00000008 ,
highroads 0:c5fea5b6b339 560 0x00000010 ,
highroads 0:c5fea5b6b339 561 0x00000020 ,
highroads 0:c5fea5b6b339 562 0x00000040 ,
highroads 0:c5fea5b6b339 563 0x00000080 ,
highroads 0:c5fea5b6b339 564 0x00000100 ,
highroads 0:c5fea5b6b339 565 0x00000200 ,
highroads 0:c5fea5b6b339 566 0x00000400 ,
highroads 0:c5fea5b6b339 567 0x00000800 ,
highroads 0:c5fea5b6b339 568 0x00001000 ,
highroads 0:c5fea5b6b339 569 0x00002000 ,
highroads 0:c5fea5b6b339 570 0x00004000 ,
highroads 0:c5fea5b6b339 571 0x00008000 ,
highroads 0:c5fea5b6b339 572 0x00010000 ,
highroads 0:c5fea5b6b339 573 0x00020000 ,
highroads 0:c5fea5b6b339 574 0x00040000 ,
highroads 0:c5fea5b6b339 575 0x00080000 ,
highroads 0:c5fea5b6b339 576 0x00100000 ,
highroads 0:c5fea5b6b339 577 0x00200000 ,
highroads 0:c5fea5b6b339 578 0x00400000 ,
highroads 0:c5fea5b6b339 579 0x00800000 ,
highroads 0:c5fea5b6b339 580 0x01000000 ,
highroads 0:c5fea5b6b339 581 0x02000000 ,
highroads 0:c5fea5b6b339 582 0x04000000 ,
highroads 0:c5fea5b6b339 583 0x08000000 ,
highroads 0:c5fea5b6b339 584 0x10000000 ,
highroads 0:c5fea5b6b339 585 0x20000000 ,
highroads 0:c5fea5b6b339 586 0x40000000 ,
highroads 0:c5fea5b6b339 587 0x80000000 ,
highroads 0:c5fea5b6b339 588 };