[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnetlib/System/Platform PortMethods.cs, 1.1, 1.2
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnetlib/System/Platform PortMethods.cs, 1.1, 1.2 |
Date: |
Sat, 08 Nov 2003 05:52:57 +0000 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System/Platform
In directory subversions:/tmp/cvs-serv2720/System/Platform
Modified Files:
PortMethods.cs
Log Message:
Some small adjustments to the serial port classes.
Index: PortMethods.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Platform/PortMethods.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PortMethods.cs 4 Nov 2003 07:00:27 -0000 1.1
--- PortMethods.cs 8 Nov 2003 05:52:55 -0000 1.2
***************
*** 23,26 ****
--- 23,27 ----
using System;
+ using System.Threading;
using System.Runtime.CompilerServices;
***************
*** 48,51 ****
--- 49,53 ----
public const int SERIAL_REGULAR = 0;
public const int SERIAL_INFRARED = 1;
+ public const int SERIAL_USB = 2;
// Bits for various serial pins.
***************
*** 82,86 ****
extern public static int GetBytesToRead(IntPtr handle);
! // Get the number of bytes of space that are available to write to the
port.
[MethodImpl(MethodImplOptions.InternalCall)]
extern public static int GetBytesToWrite(IntPtr handle);
--- 84,88 ----
extern public static int GetBytesToRead(IntPtr handle);
! // Get the number of bytes that remain to the written to the port.
[MethodImpl(MethodImplOptions.InternalCall)]
extern public static int GetBytesToWrite(IntPtr handle);
***************
*** 121,124 ****
--- 123,142 ----
extern public static void Write
(IntPtr handle, byte[] buffer, int offset, int count);
+
+ // Wait for a change in pin status. Returns non-zero when a pin
+ // change occurs, zero if the thread was interrupted, and -1
+ // if pin status changes cannot be monitored.
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ extern public static int WaitForPinChange(IntPtr handle);
+
+ // Wait for input to become available on a port. Returns non-zero
+ // when input is available, zero if the thread was interrupted,
+ // and -1 if input cannot be monitored.
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ extern public static int WaitForInput(IntPtr handle);
+
+ // Interrupt a thread that is waiting for pin changes or input.
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ extern public static void Interrupt(Thread thread);
}; // class PortMethods
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnetlib/System/Platform PortMethods.cs, 1.1, 1.2,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] pnetlib/System/IO/Ports SerialPort.cs, 1.1, 1.2
- Next by Date:
[Dotgnu-pnet-commits] pnet/include il_serial.h, NONE, 1.1 Makefile.am, 1.15, 1.16
- Previous by thread:
[Dotgnu-pnet-commits] pnetlib/System/IO/Ports SerialPort.cs, 1.1, 1.2
- Next by thread:
[Dotgnu-pnet-commits] pnet/include il_serial.h, NONE, 1.1 Makefile.am, 1.15, 1.16
- Index(es):