Changeset 843

Show
Ignore:
Timestamp:
10/01/07 17:04:49 (14 months ago)
Author:
michael
Message:

driver for Pertelian display by Andy Powell

Location:
trunk
Files:
7 modified
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r801 r843  
    8888drv_Noritake.c                \ 
    8989drv_NULL.c                    \ 
     90drv_Pertelian                 \ 
    9091drv_picoLCD.c                 \ 
    9192drv_RouterBoard.c             \ 
  • trunk/Makefile.in

    r801 r843  
    283283drv_Noritake.c                \ 
    284284drv_NULL.c                    \ 
     285drv_Pertelian                 \ 
    285286drv_picoLCD.c                 \ 
    286287drv_RouterBoard.c             \ 
  • trunk/config.h.in

    r803 r843  
    465465#undef WITH_PARPORT 
    466466 
     467/* Pertelian driver */ 
     468#undef WITH_PERTELIAN 
     469 
     470/* picoLCD driver */ 
     471#undef WITH_PICOLCD 
     472 
    467473/* PNG driver */ 
    468474#undef WITH_PNG 
     
    503509/* X11 driver */ 
    504510#undef WITH_X11 
    505  
    506 /* picoLCD driver */ 
    507 #undef WITH_picoLCD 
    508511 
    509512/* Define to 1 if the X Window System is missing or not being used. */ 
  • trunk/configure

    r803 r843  
    13451345                          G15, HD44780, LCD2USB LCDLinux, LCDTerm, LPH7508, 
    13461346                          LUIse, M50530, MatrixOrbital, MilfordInstruments, 
    1347                           Noritake, NULL, PNG, PPM, picoLCD, RouterBoard, Sample, 
    1348                           serdisplib, SimpleLCD, T6963, Trefon, USBLCD, 
     1347                          Noritake, NULL, PNG, PPM, Pertelian, picoLCD, RouterBoard, 
     1348                          Sample, serdisplib, SimpleLCD, T6963, Trefon, USBLCD, 
    13491349                          USBHUB, WincorNixdorf, X11 
    13501350  --with-plugins=<list>   choose which plugins to compile. 
     
    73897389         NORITAKE="yes" 
    73907390         NULL="yes" 
    7391          picoLCD="yes" 
     7391         PERTELIAN="yes" 
     7392         PICOLCD="yes" 
    73927393         PNG="yes" 
    73937394         PPM="yes" 
     
    74637464         NULL=$val; 
    74647465         ;; 
     7466      Pertelian) 
     7467         PERTELIAN=$val 
     7468         ;; 
    74657469      picoLCD) 
    7466          picoLCD=$val 
     7470         PICOLCD=$val 
    74677471         ;; 
    74687472      PNG) 
     
    77937797fi 
    77947798 
    7795 if test "$picoLCD" = "yes"; then 
     7799if test "$PERTELIAN" = "yes"; then 
     7800   # select either text or graphics mode 
     7801   TEXT="yes" 
     7802   # select bus: serial (including USB), parallel or i2c 
     7803   SERIAL="yes" 
     7804   DRIVERS="$DRIVERS drv_Pertelian.o" 
     7805 
     7806cat >>confdefs.h <<\_ACEOF 
     7807#define WITH_PERTELIAN 1 
     7808_ACEOF 
     7809 
     7810fi 
     7811 
     7812 
     7813 
     7814if test "$PICOLCD" = "yes"; then 
    77967815   if test "$has_usb" = "true"; then 
    77977816      TEXT="yes" 
     
    78027821 
    78037822cat >>confdefs.h <<\_ACEOF 
    7804 #define WITH_picoLCD 1 
     7823#define WITH_PICOLCD 1 
    78057824_ACEOF 
    78067825 
  • trunk/drivers.m4

    r840 r843  
    3636  [                        G15, HD44780, LCD2USB LCDLinux, LCDTerm, LPH7508,] 
    3737  [                        LUIse, M50530, MatrixOrbital, MilfordInstruments,] 
    38   [                        Noritake, NULL, PNG, PPM, picoLCD, RouterBoard, Sample,] 
    39   [                        serdisplib, SimpleLCD, T6963, Trefon, USBLCD,] 
     38  [                        Noritake, NULL, PNG, PPM, Pertelian, picoLCD, RouterBoard,] 
     39  [                        Sample, serdisplib, SimpleLCD, T6963, Trefon, USBLCD,] 
    4040  [                        USBHUB, WincorNixdorf, X11], 
    4141  drivers=$withval,  
     
    7878         NORITAKE="yes"  
    7979         NULL="yes"  
    80          picoLCD="yes" 
     80         PERTELIAN="yes" 
     81         PICOLCD="yes" 
    8182         PNG="yes" 
    8283         PPM="yes" 
     
    152153         NULL=$val; 
    153154         ;; 
     155      Pertelian) 
     156         PERTELIAN=$val 
     157         ;; 
    154158      picoLCD) 
    155          picoLCD=$val 
     159         PICOLCD=$val 
    156160         ;;          
    157161      PNG) 
     
    393397fi 
    394398 
    395 if test "$picoLCD" = "yes"; then 
     399if test "$PERTELIAN" = "yes"; then 
     400   # select either text or graphics mode 
     401   TEXT="yes" 
     402   # select bus: serial (including USB), parallel or i2c 
     403   SERIAL="yes" 
     404   DRIVERS="$DRIVERS drv_Pertelian.o" 
     405   AC_DEFINE(WITH_PERTELIAN,1,[Pertelian driver]) 
     406fi 
     407 
     408 
     409 
     410if test "$PICOLCD" = "yes"; then 
    396411   if test "$has_usb" = "true"; then 
    397412      TEXT="yes" 
     
    400415      LIBUSB="yes" 
    401416      DRIVERS="$DRIVERS drv_picoLCD.o" 
    402       AC_DEFINE(WITH_picoLCD,1,[picoLCD driver]) 
     417      AC_DEFINE(WITH_PICOLCD,1,[picoLCD driver]) 
    403418   else 
    404419      AC_MSG_WARN(usb.h not found: picoLCD driver disabled) 
  • trunk/drv.c

    r840 r843  
    6868extern DRIVER drv_Noritake; 
    6969extern DRIVER drv_NULL; 
     70extern DRIVER drv_Pertelian; 
    7071extern DRIVER drv_picoLCD; 
    7172extern DRIVER drv_RouterBoard; 
     
    146147#ifdef WITH_NULL 
    147148    &drv_NULL, 
     149#endif 
     150#ifdef WITH_PERTELIAN 
     151    &drv_Pertelian, 
    148152#endif 
    149153#ifdef WITH_picoLCD 
  • trunk/drv_Pertelian.c

    r840 r843  
    22 * $URL$ 
    33 * 
    4  * sample lcd4linux driver 
     4 * Pertelian lcd4linux driver 
     5 * Copyright (C) 2007 Andy Powell <lcd4linux@automted.it>  
    56 * 
    67 * Copyright (C) 2005 Michael Reinelt <michael@reinelt.co.at> 
     
    2930 * exported fuctions: 
    3031 * 
    31  * struct DRIVER drv_Sample 
     32 * struct DRIVER drv_Pertelian 
    3233 * 
    3334 */ 
     
    5253#include "drv.h" 
    5354 
    54 /* text mode display? */ 
    5555#include "drv_generic_text.h" 
    56  
    57 /* graphic display? */ 
    58 #include "drv_generic_graphic.h" 
    59  
    60 /* GPO's? */ 
    61 #include "drv_generic_gpio.h" 
    62  
    63 /* serial port? */ 
    6456#include "drv_generic_serial.h" 
    6557 
    66 /* parallel port? */ 
    67 #include "drv_generic_parport.h" 
    68  
    69 /* i2c bus? */ 
    70 #ifdef WITH_I2C 
    71 #include "drv_generic_i2c.h" 
    72 #endif 
    73  
    74  
    75 static char Name[] = "Sample"; 
    76  
    77  
    78 /* for parallel port displays only */ 
    79 /* use whatever lines you need */ 
    80 static unsigned char SIGNAL_RS; 
    81 static unsigned char SIGNAL_EX; 
    82  
    83  
     58static char Name[] = "Pertelian"; 
     59 
     60static unsigned char rowoffset[4] = { 0x80, 0x80 + 0x40, 0x80 + 0x14, 0x80 + 0x40 + 0x14 }; 
     61 
     62#define PERTELIAN_LCDCOMMAND 0xfe 
    8463 
    8564/****************************************/ 
     
    8766/****************************************/ 
    8867 
    89 /* low-level parallel port stuff */ 
    90 /* example for sending one byte over the wire */ 
    91 static void drv_Sample_bang(const unsigned int data) 
    92 { 
    93     /* put data on DB1..DB8 */ 
    94     drv_generic_parport_data(data & 0xff); 
    95  
    96     /* set/clear some signals */ 
    97     drv_generic_parport_control(SIGNAL_RS, SIGNAL_RS); 
    98  
    99     /* data setup time (e.g. 200 ns) */ 
    100     ndelay(200); 
    101  
    102     /* send byte */ 
    103     /* signal pulse width 500ns */ 
    104     drv_generic_parport_toggle(SIGNAL_EX, 1, 500); 
    105  
    106     /* wait for command completion (e.g. 100 us) */ 
    107     udelay(100); 
    108 } 
    109  
    110  
    111 static int drv_Sample_open(const char *section) 
    112 { 
    113     /* open serial port */ 
    114     /* don't mind about device, speed and stuff, this function will take care of */ 
    115  
     68 
     69static int drv_Pertelian_open(const char *section) 
     70{ 
    11671    if (drv_generic_serial_open(section, Name, 0) < 0) 
    11772  return -1; 
    118  
    119  
    120     /* opening the parallel port is a bit more tricky: */ 
    121     /* you have to do all the bit-banging yourself... */ 
    122  
    123     if (drv_generic_parport_open(section, Name) != 0) { 
    124   error("%s: could not initialize parallel port!", Name); 
    125   return -1; 
    126     } 
    127  
    128     /* read the wiring from config */ 
    129     if ((SIGNAL_EX = drv_generic_parport_wire_ctrl("EX", "STROBE")) == 0xff) 
    130   return -1; 
    131     if ((SIGNAL_RS = drv_generic_parport_wire_ctrl("RS", "INIT")) == 0xff) 
    132   return -1; 
    133  
    134     /* clear all signals */ 
    135     drv_generic_parport_control(SIGNAL_EX | SIGNAL_RS, 0); 
    136  
    137     /* set direction: write */ 
    138     drv_generic_parport_direction(0); 
    139  
    140     return 0; 
    141 } 
    142  
    143  
    144 static int drv_Sample_close(void) 
    145 { 
    146     /* close whatever port you've opened */ 
    147     drv_generic_parport_close(); 
     73    return 0; 
     74} 
     75 
     76 
     77static int drv_Pertelian_close(void) 
     78{ 
    14879    drv_generic_serial_close(); 
    149  
    150     return 0; 
    151 } 
    152  
    153  
    154 /* dummy function that sends something to the display */ 
    155 static void drv_Sample_send(const char *data, const unsigned int len) 
     80    return 0; 
     81} 
     82 
     83static void drv_Pertelian_send(const char *data, const unsigned int len) 
    15684{ 
    15785    unsigned int i; 
    15886 
    159     /* send data to the serial port is easy... */ 
    160     drv_generic_serial_write(data, len); 
    161  
    162     /* sending data to the parallel port is a bit more tricky... */ 
     87    /* Pertelian interface seems to offer no buffering at all 
     88       so we have to slow things down a tad yes 1usec is enough  */ 
     89 
    16390    for (i = 0; i < len; i++) { 
    164   drv_Sample_bang(*data++); 
     91  drv_generic_serial_write(&data[i], 1); 
     92  usleep(1); 
    16593    } 
    16694} 
     
    16896 
    16997/* text mode displays only */ 
    170 static void drv_Sample_clear(void) 
    171 { 
    172     char cmd[1]; 
    173  
    174     /* do whatever is necessary to clear the display */ 
    175     /* assume 0x01 to be a 'clear display' command */ 
    176     cmd[0] = 0x01; 
    177     drv_Sample_send(cmd, 1); 
     98static void drv_Pertelian_clear(void) 
     99{ 
     100    char cmd[2]; 
     101 
     102    cmd[0] = PERTELIAN_LCDCOMMAND; 
     103    cmd[1] = 0x01; 
     104    drv_Pertelian_send(cmd, 2); 
    178105} 
    179106 
    180107 
    181108/* text mode displays only */ 
    182 static void drv_Sample_write(const int row, const int col, const char *data, int len) 
     109static void drv_Pertelian_write(const int row, const int col, const char *data, int len) 
    183110{ 
    184111    char cmd[3]; 
    185112 
    186     /* do the cursor positioning here */ 
    187     /* assume 0x02 to be a 'Goto' command */ 
    188     cmd[0] = 0x02; 
    189     cmd[1] = row; 
    190     cmd[2] = col; 
    191     drv_Sample_send(cmd, 3); 
    192  
    193     /* send string to the display */ 
    194     drv_Sample_send(data, len); 
    195  
     113    cmd[0] = PERTELIAN_LCDCOMMAND; 
     114    cmd[1] = ((rowoffset[row]) + (col)); 
     115    drv_Pertelian_send(cmd, 2); 
     116    drv_Pertelian_send(data, len); 
    196117} 
    197118 
    198119/* text mode displays only */ 
    199 static void drv_Sample_defchar(const int ascii, const unsigned char *matrix) 
    200 { 
    201     char cmd[10]; 
     120static void drv_Pertelian_defchar(const int ascii, const unsigned char *matrix) 
     121{ 
     122    char cmd[11] = ""; 
    202123    int i; 
    203124 
    204     /* call the 'define character' function */ 
    205     /* assume 0x03 to be the 'defchar' command */ 
    206     cmd[0] = 0x03; 
    207     cmd[1] = ascii; 
    208  
    209     /* send bitmap to the display */ 
     125    cmd[0] = PERTELIAN_LCDCOMMAND; 
     126    cmd[1] = (0x40 + (8 * ascii)); 
    210127    for (i = 0; i < 8; i++) { 
    211   cmd[i + 2] = *matrix++; 
    212     } 
    213     drv_Sample_send(cmd, 10); 
    214 } 
    215  
    216  
    217 /* for graphic displays only */ 
    218 static void drv_Sample_blit(const int row, const int col, const int height, const int width) 
    219 { 
    220     int r, c; 
    221  
    222     for (r = row; r < row + height; r++) { 
    223   for (c = col; c < col + width; c++) { 
    224       /* drv_generic_graphic_black() returns 1 if pixel is black */ 
    225       /* drv_generic_graphic_gray() returns a gray value 0..255 */ 
    226       /* drv_generic_graphic_rgb() returns a RGB color */ 
    227       if (drv_generic_graphic_black(r, c)) { 
    228     /* set bit */ 
    229       } else { 
    230     /* clear bit */ 
    231       } 
    232   } 
    233     } 
    234 } 
    235  
    236  
    237 /* remove unless you have GPO's */ 
    238 static int drv_Sample_GPO(const int num, const int val) 
    239 { 
    240     char cmd[4]; 
    241  
    242     /* assume 0x42 to be the 'GPO' command */ 
    243     cmd[0] = 0x42; 
    244     cmd[1] = num; 
    245     cmd[2] = (val > 0) ? 1 : 0; 
    246  
    247     drv_Sample_send(cmd, 3); 
    248  
    249     return 0; 
    250 } 
    251  
    252  
    253 /* example function used in a plugin */ 
    254 static int drv_Sample_contrast(int contrast) 
     128  cmd[i + 2] = matrix[i] & 0x1f; 
     129    } 
     130    drv_Pertelian_send(cmd, 10); 
     131} 
     132 
     133static int drv_Pertelian_backlight(int backlight) 
    255134{ 
    256135    char cmd[2]; 
    257136 
    258     /* adjust limits according to the display */ 
    259     if (contrast < 0) 
    260   contrast = 0; 
    261     if (contrast > 255) 
    262   contrast = 255; 
    263  
    264     /* call a 'contrast' function */ 
    265     /* assume 0x04 to be the 'set contrast' command */ 
    266     cmd[0] = 0x04; 
    267     cmd[1] = contrast; 
    268     drv_Sample_send(cmd, 2); 
    269  
    270     return contrast; 
     137    if (backlight <= 0) 
     138  backlight = 2; 
     139    else if (backlight >= 1) 
     140  backlight = 3; 
     141 
     142    cmd[0] = PERTELIAN_LCDCOMMAND; 
     143    cmd[1] = backlight; 
     144 
     145    drv_Pertelian_send(cmd, 2); 
     146 
     147    return backlight; 
    271148} 
    272149 
    273150 
    274151/* start text mode display */ 
    275 static int drv_Sample_start(const char *section) 
    276 { 
    277     int contrast; 
     152static int drv_Pertelian_start(const char *section) 
     153{ 
     154    int backlight; 
    278155    int rows = -1, cols = -1; 
    279156    char *s; 
    280     char cmd[1]; 
     157    char cmd[12] = ""; 
    281158 
    282159    s = cfg_get(section, "Size", NULL); 
     
    294171    DCOLS = cols; 
    295172 
    296     /* number of GPO's; remove if you don't have them */ 
    297     GPOS = 8; 
    298  
    299173    /* open communication with the display */ 
    300     if (drv_Sample_open(section) < 0) { 
     174    if (drv_Pertelian_open(section) < 0) { 
    301175  return -1; 
    302176    } 
    303177 
    304178    /* reset & initialize display */ 
    305     /* assume 0x00 to be a 'reset' command */ 
    306     cmd[0] = 0x00; 
    307     drv_Sample_send(cmd, 0); 
    308  
    309     if (cfg_number(section, "Contrast", 0, 0, 255, &contrast) > 0) { 
    310   drv_Sample_contrast(contrast); 
    311     } 
    312  
    313     drv_Sample_clear();   /* clear display */ 
    314  
    315     return 0; 
    316 } 
    317  
    318  
    319 /* start graphic display */ 
    320 static int drv_Sample_start2(const char *section) 
    321 { 
    322     char *s; 
    323     char cmd[1]; 
    324     int contrast; 
    325  
    326     /* read display size from config */ 
    327     s = cfg_get(section, "Size", NULL); 
    328     if (s == NULL || *s == '\0') { 
    329   error("%s: no '%s.Size' entry from %s", Name, section, cfg_source()); 
    330   return -1; 
    331     } 
    332  
    333     DROWS = -1; 
    334     DCOLS = -1; 
    335     if (sscanf(s, "%dx%d", &DCOLS, &DROWS) != 2 || DCOLS < 1 || DROWS < 1) { 
    336   error("%s: bad Size '%s' from %s", Name, s, cfg_source()); 
    337   return -1; 
    338     } 
    339  
    340     s = cfg_get(section, "Font", "6x8"); 
    341     if (s == NULL || *s == '\0') { 
    342   error("%s: no '%s.Font' entry from %s", Name, section, cfg_source()); 
    343   return -1; 
    344     } 
    345  
    346     XRES = -1; 
    347     YRES = -1; 
    348     if (sscanf(s, "%dx%d", &XRES, &YRES) != 2 || XRES < 1 || YRES < 1) { 
    349   error("%s: bad Font '%s' from %s", Name, s, cfg_source()); 
    350   return -1; 
    351     } 
    352  
    353     /* Fixme: provider other fonts someday... */ 
    354     if (XRES != 6 && YRES != 8) { 
    355   error("%s: bad Font '%s' from %s (only 6x8 at the moment)", Name, s, cfg_source()); 
    356   return -1; 
    357     } 
    358  
    359     /* you surely want to allocate a framebuffer or something... */ 
    360  
    361     /* open communication with the display */ 
    362     if (drv_Sample_open(section) < 0) { 
    363   return -1; 
    364     } 
    365  
    366     /* reset & initialize display */ 
    367     /* assume 0x00 to be a 'reset' command */ 
    368     cmd[0] = 0x00; 
    369     drv_Sample_send(cmd, 1); 
    370  
    371     if (cfg_number(section, "Contrast", 0, 0, 255, &contrast) > 0) { 
    372   drv_Sample_contrast(contrast); 
    373     } 
     179    cmd[0] = PERTELIAN_LCDCOMMAND; 
     180    cmd[1] = 0x38; 
     181    cmd[2] = PERTELIAN_LCDCOMMAND; 
     182    cmd[3] = 0x06; 
     183    cmd[4] = PERTELIAN_LCDCOMMAND; 
     184    cmd[5] = 0x10;    /* move cursor on data write */ 
     185    cmd[6] = PERTELIAN_LCDCOMMAND; 
     186    cmd[7] = 0x0c; 
     187    cmd[8] = 0x0c; 
     188 
     189    drv_Pertelian_send(cmd, 8); 
     190 
     191    if (cfg_number(section, "Backlight", 0, 0, 1, &backlight) > 0) { 
     192  drv_Pertelian_backlight(backlight); 
     193    } 
     194 
     195    drv_Pertelian_clear();  /* clear display */ 
    374196 
    375197    return 0; 
     
    380202/***            plugins               ***/ 
    381203/****************************************/ 
    382  
    383 static void plugin_contrast(RESULT * result, RESULT * arg1) 
    384 { 
    385     double contrast; 
    386  
    387     contrast = drv_Sample_contrast(R2N(arg1)); 
    388     SetResult(&result, R_NUMBER, &contrast); 
    389 } 
    390204 
    391205 
     
    407221 
    408222/* list models */ 
    409 int drv_Sample_list(void) 
     223int drv_Pertelian_list(void) 
    410224{ 
    411225    printf("generic"); 
     
    416230/* initialize driver & display */ 
    417231/* use this function for a text display */ 
    418 int drv_Sample_init(const char *section, const int quiet) 
     232int drv_Pertelian_init(const char *section, const int quiet) 
    419233{ 
    420234    WIDGET_CLASS wc; 
     
    431245 
    432246    /* real worker functions */ 
    433     drv_generic_text_real_write = drv_Sample_write; 
    434     drv_generic_text_real_defchar = drv_Sample_defchar; 
    435  
    436     /* remove unless you have GPO's */ 
    437     drv_generic_gpio_real_set = drv_Sample_GPO; 
     247    drv_generic_text_real_write = drv_Pertelian_write; 
     248    drv_generic_text_real_defchar = drv_Pertelian_defchar; 
    438249 
    439250 
    440251    /* start display */ 
    441     if ((ret = drv_Sample_start(section)) != 0) 
     252    if ((ret = drv_Pertelian_start(section)) != 0) 
    442253  return ret; 
    443254 
     
    445256  char buffer[40]; 
    446257  qprintf(buffer, sizeof(buffer), "%s %dx%d", Name, DCOLS, DROWS); 
    447   if (drv_generic_text_greet(buffer, "www.bwct.de")) { 
     258  if (drv_generic_text_greet(buffer, "LinITX.com")) { 
    448259      sleep(3); 
    449       drv_Sample_clear(); 
     260      drv_Pertelian_clear(); 
    450261  } 
    451262    } 
     
    466277    drv_generic_text_bar_add_segment(0, 0, 255, 32);  /* ASCII  32 = blank */ 
    467278 
    468  
    469     /* initialize generic GPIO driver */ 
    470     /* remove unless you have GPO's */ 
    471     if ((ret = drv_generic_gpio_init(section, Name)) != 0) 
    472   return ret; 
    473279 
    474280    /* register text widget */ 
     
    487293    widget_register(&wc); 
    488294 
    489     /* register plugins */ 
    490     AddFunction("LCD::contrast", 1, plugin_contrast); 
    491  
    492     return 0; 
    493 } 
    494  
    495  
    496 /* initialize driver & display */ 
    497 /* use this function for a graphic display */ 
    498 int drv_Sample_init2(const char *section, const int quiet) 
    499 { 
    500     int ret; 
    501  
    502     /* real worker functions */ 
    503     drv_generic_graphic_real_blit = drv_Sample_blit; 
    504  
    505     /* remove unless you have GPO's */ 
    506     drv_generic_gpio_real_set = drv_Sample_GPO; 
    507  
    508     /* start display */ 
    509     if ((ret = drv_Sample_start2(section)) != 0) 
    510   return ret; 
    511  
    512     /* initialize generic graphic driver */ 
    513     if ((ret = drv_generic_graphic_init(section, Name)) != 0) 
    514   return ret; 
    515  
    516     if (!quiet) { 
    517   char buffer[40]; 
    518   qprintf(buffer, sizeof(buffer), "%s %dx%d", Name, DCOLS, DROWS); 
    519   if (drv_generic_graphic_greet(buffer, NULL)) { 
    520       sleep(3); 
    521       drv_generic_graphic_clear(); 
    522   } 
    523     } 
    524  
    525     /* register plugins */ 
    526     AddFunction("LCD::contrast", 1, plugin_contrast); 
    527295 
    528296    return 0; 
     
    532300 
    533301/* close driver & display */ 
    534 /* use this function for a text display */ 
    535 int drv_Sample_quit(const int quiet) 
     302int drv_Pertelian_quit(const int quiet) 
    536303{ 
    537304 
     
    540307    drv_generic_text_quit(); 
    541308 
    542