dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] pnetlib/System/IO/Ports SerialPort.cs, 1.1, 1.2


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] pnetlib/System/IO/Ports SerialPort.cs, 1.1, 1.2
Date: Sat, 08 Nov 2003 05:52:57 +0000

Update of /cvsroot/dotgnu-pnet/pnetlib/System/IO/Ports
In directory subversions:/tmp/cvs-serv2720/System/IO/Ports

Modified Files:
        SerialPort.cs 
Log Message:


Some small adjustments to the serial port classes.


Index: SerialPort.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/IO/Ports/SerialPort.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SerialPort.cs       4 Nov 2003 07:00:27 -0000       1.1
--- SerialPort.cs       8 Nov 2003 05:52:55 -0000       1.2
***************
*** 50,54 ****
                 115200, 230400, 460800, 500000, 576000, 921600,
                 1000000, 1152000, 1500000, 2000000, 2500000,
!                3000000, 2500000, 4000000};
  
        // Timeout value that indicates an infinite timeout.
--- 50,54 ----
                 115200, 230400, 460800, 500000, 576000, 921600,
                 1000000, 1152000, 1500000, 2000000, 2500000,
!                3000000, 3500000, 4000000};
  
        // Timeout value that indicates an infinite timeout.
***************
*** 492,498 ****
  
        // Get or set the name of the port.  We only allow port names
!       // of the form "COMn", "COMn:", "IRCOMMn", or "IRCOMMn:" in this
!       // implementation.  "COM" ports are regular serial ports, and
!       // "IRCOMM" ports are infrared ports.
        public String PortName
                        {
--- 492,499 ----
  
        // Get or set the name of the port.  We only allow port names
!       // of the form "COMn", "COMn:", "IRCOMMn", "IRCOMMn:", "USBn",
!       // and "USBn:" in this implementation.  "COM" ports are regular
!       // serial ports, "IRCOMM" ports are infrared ports, and "USB"
!       // are ports on the USB bus.  The numbers are 1-based.
        public String PortName
                        {
***************
*** 527,530 ****
--- 528,539 ----
                                                posn = 6;
                                                type = 
PortMethods.SERIAL_INFRARED;
+                                       }
+                                       else if(value.Length > 3 &&
+                                               (value[0] == 'u' || value[0] == 
'U') &&
+                                               (value[1] == 's' || value[1] == 
'S') &&
+                                               (value[2] == 'b' || value[2] == 
'B'))
+                                       {
+                                               posn = 3;
+                                               type = PortMethods.SERIAL_USB;
                                        }
                                        else





reply via email to

[Prev in Thread] Current Thread [Next in Thread]