Changeset 233 in xtideuniversalbios for trunk/Serial_Server/library/Serial.cpp


Ignore:
Timestamp:
Feb 4, 2012, 6:21:22 PM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Serial Port: split single byte port and baud into two bytes, taking advantage of the two bytes in DPT_SERIAL, which supports more serial baud rates and in particular fixed a bug where a 4x client machine couldn't talk to a 115.2K server machine. This is a wide change, touching lots of files, but most are shallow changes. DetectPrint.asm took the most significant changes, now it calculates the baud rate to display instead of using characters provided by the Configurator. The Configurator now has a new menu flag, FLG_MENUITEM_CHOICESTRINGS, for specifying that values are not linear and they should be lookedup rather than indexed. Finally, another important bug fixed here is that in some error cases, the serial port code could get into an infinite loop waiting ont the hardware; now it has a timeout.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Serial_Server/library/Serial.cpp

    r215 r233  
    1212struct baudRate supportedBaudRates[] =
    1313{
    14     {   2400,  0x0,   "2400" },
    15     {   4800, 0xff,   "4800" },
    16     {   9600,  0x1,   "9600" },
    17     {  19200, 0xff,  "19.2K" },
    18     {  38400,  0x2,  "38.4K" },
    19     {  76800, 0xff,  "76.8K" },
    20     { 115200,  0x3, "115.2K" },
    21     { 153600, 0xff, "153.6K" },
    22     { 230400, 0xff, "230.4K" },
    23     { 460800, 0xff, "460.8K" },
    24     {      0,    0,     NULL }
     14    {   2400,  0x30,    "2400" },
     15    {   4800,  0x18,    "4800" },
     16    {   9600,   0xc,    "9600" },
     17    {  19200,  0xff,   "19.2K" },
     18    {  28800,   0x4,   "28.8K" },
     19    {  38400,  0xff,   "38.4K" },
     20    {  57600,   0x2,   "57.6K" },
     21    {  76800,  0xff,   "76.8K" },
     22    { 115200,   0x1,  "115.2K" },
     23    { 153600,  0xff,  "153.6K" },
     24    { 230400,  0xff,  "230.4K" },
     25    { 460800,  0xff,  "460.8K" },
     26    {      0,     0, "Unknown" },
    2527};
    2628
     
    3739    }
    3840
    39     return( NULL );
     41    return( b );
    4042}
    4143
     
    4749        ;
    4850
    49     return( b->rate ? b : NULL );
     51    return( b );
    5052}
    5153
Note: See TracChangeset for help on using the changeset viewer.