Class PS2Controller
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Cosmos.HAL
Assembly: Cosmos.HAL2.dll
Syntax
public class PS2Controller : Device
Fields
| Improve this Doc View SourceAck
Declaration
public const byte Ack = 250
Field Value
Type | Description |
---|---|
System.Byte |
FirstDevice
Declaration
public Device FirstDevice
Field Value
Type | Description |
---|---|
Device |
FirstPortTestPassed
Declaration
public bool FirstPortTestPassed
Field Value
Type | Description |
---|---|
System.Boolean |
IsDualChannel
Declaration
public bool IsDualChannel
Field Value
Type | Description |
---|---|
System.Boolean |
SecondDevice
Declaration
public Device SecondDevice
Field Value
Type | Description |
---|---|
Device |
SecondPortTestPassed
Declaration
public bool SecondPortTestPassed
Field Value
Type | Description |
---|---|
System.Boolean |
SelfTestPassed
Declaration
public bool SelfTestPassed
Field Value
Type | Description |
---|---|
System.Boolean |
WAIT_TIMEOUT
Declaration
public const uint WAIT_TIMEOUT = 100000U
Field Value
Type | Description |
---|---|
System.UInt32 |
Methods
| Improve this Doc View SourceInitialize(Boolean)
Initializes the PS/2 controller.
Declaration
public void Initialize(bool InitScrollWheel)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | InitScrollWheel |
PrepareSecondPortWrite()
Prepares the controller to write a command in the second PS/2 device port.
Declaration
public void PrepareSecondPortWrite()
ReadByteAfterAck()
Reads the byte after acknowledgement.
Declaration
public byte ReadByteAfterAck()
Returns
Type | Description |
---|---|
System.Byte | The byte read after acknowledgement. |
ReadByteAfterAckWithTimeout(ref Byte)
Reads the byte after acknowledgement.
Declaration
public bool ReadByteAfterAckWithTimeout(ref byte aByte)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | aByte | The byte read after acknowledgement. |
Returns
Type | Description |
---|---|
System.Boolean | Returns false if the timeout expired, true otherwise. |
WaitForAck()
Waits for the acknowledgement byte (0xFA). Returns false if the timeout expires, true otherwise.
Declaration
public bool WaitForAck()
Returns
Type | Description |
---|---|
System.Boolean | Returns false if the timeout expires, true otherwise. |
WaitForDeviceReset()
Waits for the PS/2 device reset.
Declaration
public bool WaitForDeviceReset()
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the device resets successfully, false otherwise. |
WaitToReadData()
Waits to read data.
Declaration
public bool WaitToReadData()
Returns
Type | Description |
---|---|
System.Boolean | Returns false if the timeout expired, true otherwise. |
WaitToWrite()
Waits to write data.
Declaration
public bool WaitToWrite()
Returns
Type | Description |
---|---|
System.Boolean | Returns false if the timeout expired, true otherwise. |