Class IOPort
IOPort static class.
Inheritance
Inherited Members
Namespace: Cosmos.Core
Assembly: Cosmos.Core.dll
Syntax
public static class IOPort
Methods
| Improve this Doc View SourceRead16(Int32)
Read Word from port. Plugged.
Declaration
public static ushort Read16(int aPort)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | aPort | A port to read from. |
Returns
Type | Description |
---|---|
System.UInt16 | ushort value. |
Read16(Int32, UInt16[])
Read Words from base port.
Declaration
public static void Read16(int aPort, ushort[] aData)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | aPort | |
System.UInt16[] | aData | Output data array. |
Exceptions
Type | Condition |
---|---|
System.OverflowException | Thrown if aData lenght is greater than Int32.MaxValue. |
Read32(Int32)
Read DWord from port. Plugged.
Declaration
public static uint Read32(int aPort)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | aPort | A port to read from. |
Returns
Type | Description |
---|---|
System.UInt32 | uint value. |
Read32(Int32, UInt32[])
Read DWord from base port.
Declaration
public static void Read32(int aPort, uint[] aData)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | aPort | |
System.UInt32[] | aData | Output data array. |
Exceptions
Type | Condition |
---|---|
System.OverflowException | Thrown if aData lenght is greater than Int32.MaxValue. |
Read8(Int32)
Read byte from port. Plugged.
Declaration
public static byte Read8(int aPort)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | aPort | A port to read from. |
Returns
Type | Description |
---|---|
System.Byte | byte value. |
Read8(Int32, Byte[])
Read byte from base port.
Declaration
public static void Read8(int aPort, byte[] aData)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | aPort | |
System.Byte[] | aData | Output data array. |
Exceptions
Type | Condition |
---|---|
System.OverflowException | Thrown if aData lenght is greater than Int32.MaxValue. |
Wait()
Wait for the previous IO read/write to complete.
Declaration
public static void Wait()
Write16(Int32, UInt16)
Write Word to port. Plugged.
Declaration
public static void Write16(int aPort, ushort aData)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | aPort | A port to write to. |
System.UInt16 | aData | A data. |
Write32(Int32, UInt32)
Write DWord to port. Plugged.
Declaration
public static void Write32(int aPort, uint aData)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | aPort | A port to write to. |
System.UInt32 | aData | A data. |
Write8(Int32, Byte)
Write byte to port. Plugged.
Declaration
public static void Write8(int aPort, byte aData)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | aPort | A port to write to. |
System.Byte | aData | A data. |
WriteMany8WithWait(Int32, Byte[])
Write many bytes to port with 400ns waits between each word Plugged.
Declaration
public static void WriteMany8WithWait(int aPort, byte[] aData)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | aPort | A port to write to. |
System.Byte[] | aData | The data. |