Changeset 215 in xtideuniversalbios for trunk/Serial_Server/win32


Ignore:
Timestamp:
Jan 19, 2012, 9:17:04 AM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

More minor improvements to the serial server, in particular improved timeout recovery.

Location:
trunk/Serial_Server/win32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Serial_Server/win32/Win32.cpp

    r213 r215  
    4040        "                    With a 4x rate multiplier: 9600, 38400, 153600, 460800",
    4141        "                    Abbreviations also accepted (ie, '460K', '38.4K', etc)",
    42         "                    (default is 9600, 115200 in named pipe mode)",
     42        "                    (default is 38400, 115200 in named pipe mode)",
    4343        "",
    4444        "  -t                Disable timeout, useful for long delays when debugging",
     
    4747        "",
    4848        "  -v [level]        Reporting level 1-6, with increasing information",
     49        "",
     50        "On the client computer, a serial port can be configured for use as a hard disk",
     51        "with xtidecfg.com.  Or one can hold down the ALT key at the end of the normal",
     52        "IDE hard disk scan and the XTIDE Universal BIOS will scan COM1-7, at each of",
     53        "the four speeds given above for BaudRate.  Note that hardware rate multipliers",
     54        "must be taken into account on the server end, but are invisible on the client.",
    4955        NULL };
    5056
     
    6874    Serial *serial;
    6975    Image *img;
    70     struct baudRate *baudRate;
     76    struct baudRate *baudRate = NULL;
    7177
    7278    int timeoutEnabled = 1;
     
    8187    int imagecount = 0;
    8288    Image *images[2] = { NULL, NULL };
    83 
    84     baudRate = baudRateMatchString( "9600" );
    8589
    8690    for( int t = 1; t < argc; t++ )
     
    114118            case 'p': case 'P':
    115119                ComPort = "PIPE";
    116                 baudRate = baudRateMatchString( "115200" );
     120                if( !baudRate )
     121                    baudRate = baudRateMatchString( "115200" );
    117122                break;           
    118123            case 'g': case 'G':
     
    141146                if( !(baudRate = baudRateMatchString( argv[++t] )) )
    142147                {
    143                         fprintf( stderr, "Unknown Baud Rate %s\n\n", argv[t] );
    144                         usage();
     148                    fprintf( stderr, "Unknown Baud Rate %s\n\n", argv[t] );
     149                    usage();
    145150                }
    146151                break;
     
    163168        usage();
    164169
     170    if( !baudRate )
     171        baudRate = baudRateMatchString( "38400" );
     172
    165173    do
    166174    {
  • trunk/Serial_Server/win32/Win32Serial.cpp

    r211 r215  
    5353        if( !ConnectNamedPipe( pipe, NULL ) )
    5454            log( -1, "Could not ConnectNamedPipe" );
     55
     56        if( baudRate->divisor > 3 )
     57            log( -1, "Cannot simulate baud rates with hardware multipliers" );
    5558
    5659        speedEmulation = 1;
Note: See TracChangeset for help on using the changeset viewer.