Class PIT
Handles the Programmable Interval Timer (PIT).
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 PIT : Device
Constructors
| Improve this Doc View SourcePIT()
Declaration
public PIT()
Fields
| Improve this Doc View SourceCommand
Command register port.
Declaration
public const int Command = 67
Field Value
Type | Description |
---|---|
System.Int32 |
Data0
Channel 0 data port.
Declaration
public const int Data0 = 64
Field Value
Type | Description |
---|---|
System.Int32 |
Data1
Channel 1 data port.
Declaration
public const int Data1 = 65
Field Value
Type | Description |
---|---|
System.Int32 |
Data2
Channel 2 data port.
Declaration
public const int Data2 = 66
Field Value
Type | Description |
---|---|
System.Int32 |
PITDelayNS
Declaration
public const uint PITDelayNS = 838U
Field Value
Type | Description |
---|---|
System.UInt32 |
PITFrequency
Declaration
public const uint PITFrequency = 1193180U
Field Value
Type | Description |
---|---|
System.UInt32 |
T0RateGen
Declaration
public bool T0RateGen
Field Value
Type | Description |
---|---|
System.Boolean |
Properties
| Improve this Doc View SourceT0Countdown
Declaration
public ushort T0Countdown { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
T0DelayNS
Declaration
public uint T0DelayNS { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
T0Frequency
Declaration
public uint T0Frequency { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
T2Countdown
Declaration
public ushort T2Countdown { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
T2DelayNS
Declaration
public uint T2DelayNS { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
T2Frequency
Declaration
public uint T2Frequency { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
| Improve this Doc View SourceRegisterTimer(PIT.PITTimer)
Registers a timer to this PIT object.
Declaration
public int RegisterTimer(PIT.PITTimer timer)
Parameters
Type | Name | Description |
---|---|---|
PIT.PITTimer | timer | The target timer. |
Returns
Type | Description |
---|---|
System.Int32 | The newly assigned ID to the timer. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when the given timer has already been registered. |
UnregisterTimer(Int32)
Unregisters a timer that has been previously registered to this PIT object.
Declaration
public void UnregisterTimer(int timerId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | timerId | The ID of the timer to unregister. |
Wait(UInt32)
Halts the CPU for the specified amount of milliseconds.
Declaration
public void Wait(uint timeoutMs)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | timeoutMs | The amount of milliseconds to halt the CPU for. |
WaitNS(UInt64)
Halts the CPU for the specified amount of nanoseconds.
Declaration
public void WaitNS(ulong timeoutNs)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | timeoutNs | The amount of nanoseconds to halt the CPU for. |