mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
First implementation of Transmit(Packet) method. Not working yet. Fixed bitwise mathematics in PacketHeader. Created several of the memory-registers as separate classes.
27 lines
1.1 KiB
C#
27 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace FrodeTest.Test
|
|
{
|
|
class PacketHeaderTest
|
|
{
|
|
public static void RunTest()
|
|
{
|
|
|
|
UInt16 data = 0xFFFF; //All 16 bits high
|
|
Cosmos.Driver.RTL8139.PacketHeader head = new Cosmos.Driver.RTL8139.PacketHeader(data);
|
|
|
|
Console.WriteLine("Binary value in head: " + data);
|
|
Console.WriteLine("IsRecieveOK - " + head.IsReceiveOk());
|
|
Console.WriteLine("IsFrameAlignmentError - " + head.IsFrameAlignmentError());
|
|
Console.WriteLine("IsCRCError - " + head.IsCRCError());
|
|
Console.WriteLine("IsLongPacket - " + head.IsLongPacket());
|
|
Console.WriteLine("IsRuntPacket - " + head.IsRuntPacket());
|
|
Console.WriteLine("IsISEPacket - " + head.IsInvalidSymbolError());
|
|
Console.WriteLine("IsBroadcast - " + head.IsBroadcastAddress());
|
|
Console.WriteLine("IsPhysical - " + head.IsPhysicalAddressMatch());
|
|
Console.WriteLine("IsMulticast - " + head.IsMulticastAddress());
|
|
}
|
|
}
|
|
}
|