mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
30 lines
990 B
C#
30 lines
990 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using Cosmos.Driver.RTL8139.Register;
|
|
using Cosmos.Hardware.PC.Bus;
|
|
|
|
namespace FrodeTest.Test
|
|
{
|
|
class TransmitStatusDescriptorTest
|
|
{
|
|
public static void RunTest()
|
|
{
|
|
//Testing that the TSD is rotating between the four Descriptors
|
|
/*for (int i = 0; i < 10; i++)
|
|
{
|
|
Console.WriteLine(TransmitStatusDescriptor.GetCurrentTSDescriptor());
|
|
TransmitStatusDescriptor.IncrementTSDescriptor();
|
|
}*/
|
|
|
|
|
|
//Testing that OWN bit is cleared
|
|
PCIDevice card = PCIBus.GetPCIDevice(0, 3, 0);
|
|
TransmitStatusDescriptor tsd = TransmitStatusDescriptor.Load(card);
|
|
Console.WriteLine("Before bit is cleared: " + tsd.TSD());
|
|
tsd.ClearOWNBit();
|
|
Console.WriteLine("After bit cleared: " + tsd.TSD());
|
|
|
|
}
|
|
}
|
|
}
|