Changeset 293 in xtideuniversalbios for trunk/Serial_Server/win32/Win32Serial.h


Ignore:
Timestamp:
Mar 4, 2012, 1:33:52 AM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Commit 1/2 (Library, Configurators and Serial Server):

  • Changed Emulate.inc so that making 286 and 386 versions now works. Additionally, only one processor type define is needed in the makefile.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Serial_Server/win32/Win32Serial.h

    r284 r293  
    1212#define PIPENAME "\\\\.\\pipe\\xtide"
    1313
    14 class SerialAccess 
     14class SerialAccess
    1515{
    1616public:
     
    2222
    2323        pipe = NULL;
    24    
     24
    2525        if( !name )
    2626        {
     
    3838        {
    3939            log( 0, "Opening named pipe %s (simulating %s baud)", name, baudRate->display );
    40        
     40
    4141            pipe = CreateNamedPipeA( name, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE|PIPE_REJECT_REMOTE_CLIENTS, 2, 1024, 1024, 0, NULL );
    4242            if( pipe == INVALID_HANDLE_VALUE )
    4343                log( -1, "Could not CreateNamedPipe " PIPENAME );
    44        
     44
    4545            if( !ConnectNamedPipe( pipe, NULL ) )
    4646                log( -1, "Could not ConnectNamedPipe" );
     
    6060
    6161                log( 0, "Opening %s (%s baud)", name, baudRate->display );
    62            
     62
    6363                pipe = CreateFileA( name, GENERIC_READ|GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 );
    6464                if( pipe == INVALID_HANDLE_VALUE )
    6565                    log( -1, "Could not Open \"%s\"", name );
    66            
     66
    6767                FillMemory(&dcb, sizeof(dcb), 0);
    6868                FillMemory(&timeouts, sizeof(timeouts), 0);
     
    8383                            msg = "\n    On this COM port, baud rate is limited to 115.2K";
    8484                    }
    85                     log( -1, "Could not SetCommState: baud rate selected may not be availabele%s", msg );
     85                    log( -1, "Could not SetCommState: baud rate selected may not be available%s", msg );
    8686                }
    8787
     
    9494
    9595                EnumerateCOMPorts( logbuff, 1024 );
    96                
     96
    9797                log( -1, "Serial port '%s' not found, detected COM ports: %s", name, logbuff );
    9898            }
Note: See TracChangeset for help on using the changeset viewer.