Skip to content

Commit

Permalink
Update VBEDriver.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
cjhannah authored Dec 31, 2016
1 parent 72c0143 commit dc47fa3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions source/Cosmos.HAL/Drivers/VBEDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ public class VBEDriver
{

private Core.IOGroup.VBE IO = Core.Global.BaseIOGroups.VBE;

public VBEDriver()
{
if (Cosmos.HAL.PCI.GetDevice(1234, 1111) == null){
throw new Exception("No BGA adapter found..");
}
}
private void vbe_write(ushort index, ushort value)
{
IO.VbeIndex.Word = index;
Expand All @@ -19,9 +24,7 @@ private void vbe_write(ushort index, ushort value)

public void vbe_set(ushort xres, ushort yres, ushort bpp)
{
if (Cosmos.HAL.PCI.GetDevice(1234, 1111) == null){
throw new Exception("No BGA adapter found..");
}

//Disable Display
vbe_write(0x4, 0x00);
//Set Display Xres
Expand Down

0 comments on commit dc47fa3

Please sign in to comment.