The Pedigree Project  0.1
Public Member Functions | List of all members
ArmBeagleVga Class Reference

#include <Vga.h>

+ Inheritance diagram for ArmBeagleVga:
+ Collaboration diagram for ArmBeagleVga:

Public Member Functions

char read ()
 
void write (char c)
 
virtual void setControl (VgaControl which)
 
virtual void clearControl (VgaControl which)
 
virtual bool setMode (int mode)
 
bool setLargestTextMode ()
 
bool isMode (size_t nCols, size_t nRows, bool bIsText, size_t nBpp=0)
 
bool isLargestTextMode ()
 
size_t getNumCols ()
 
size_t getNumRows ()
 
void rememberMode ()
 
void restoreMode ()
 
void pokeBuffer (uint8_t *pBuffer, size_t nBufLen)
 
void peekBuffer (uint8_t *pBuffer, size_t nBufLen)
 
void moveCursor (size_t nX, size_t nY)
 
 operator uint16_t * () const
 

Additional Inherited Members

- Public Types inherited from Vga
enum  VgaControl { LineGraphics = 2, Blink = 3 }
 

Detailed Description

Note
useless, no text framebuffer device available.

Definition at line 26 of file kernel/machine/arm_beagle/Vga.h.

Member Function Documentation

virtual void ArmBeagleVga::clearControl ( VgaControl  which)
inlinevirtual

Clears the given attribute mode control.

Implements Vga.

Definition at line 45 of file kernel/machine/arm_beagle/Vga.h.

References setMode().

size_t ArmBeagleVga::getNumCols ( )
inlinevirtual
Returns
The number of columns in the current mode.

Implements Vga.

Definition at line 89 of file kernel/machine/arm_beagle/Vga.h.

size_t ArmBeagleVga::getNumRows ( )
inlinevirtual
Returns
The number of rows in the current mode.

Implements Vga.

Definition at line 97 of file kernel/machine/arm_beagle/Vga.h.

bool ArmBeagleVga::isLargestTextMode ( )
inlinevirtual

Tests if the current video mode is the largest text mode.

Returns
True if the current video mode is equal to the largest text mode.

Implements Vga.

Definition at line 81 of file kernel/machine/arm_beagle/Vga.h.

bool ArmBeagleVga::isMode ( size_t  nCols,
size_t  nRows,
bool  bIsText,
size_t  nBpp = 0 
)
inlinevirtual

Tests the current video mode.

Returns
True if the current mode matches the given arguments.

Implements Vga.

Definition at line 72 of file kernel/machine/arm_beagle/Vga.h.

void ArmBeagleVga::moveCursor ( size_t  nX,
size_t  nY 
)
inlinevirtual

Moves the cursor to the position specified by the parameters.

Parameters
nXThe column to move to.
nYThe row to move to.

Implements Vga.

Definition at line 139 of file kernel/machine/arm_beagle/Vga.h.

void ArmBeagleVga::peekBuffer ( uint8_t *  pBuffer,
size_t  nBufLen 
)
inlinevirtual

Copies the current framebuffer into the given buffer.

The buffer is assumed to be in the correct format for directly copying from video memory. This will obviously depend on the current mode (text/graphical) as well as resolution and bits per pixel (graphics mode only).

Parameters
Apointer to the buffer.
Thelength of pBuffer.

Implements Vga.

Definition at line 132 of file kernel/machine/arm_beagle/Vga.h.

void ArmBeagleVga::pokeBuffer ( uint8_t *  pBuffer,
size_t  nBufLen 
)
inlinevirtual

Copies the given buffer into video memory, replacing the current framebuffer.

The buffer is assumed to be in the correct format for directly copying into video memory. This will obviously depend on the current mode (text/graphical) as well as resolution and bits per pixel (graphics mode only).

Parameters
Apointer to the buffer to swap into video memory.
Thelength of pBuffer.

Implements Vga.

Definition at line 122 of file kernel/machine/arm_beagle/Vga.h.

void ArmBeagleVga::rememberMode ( )
inlinevirtual

Stores the current video mode.

Implements Vga.

Definition at line 105 of file kernel/machine/arm_beagle/Vga.h.

void ArmBeagleVga::restoreMode ( )
inlinevirtual

Restores the saved video mode from a rememberMode() call.

Implements Vga.

Definition at line 110 of file kernel/machine/arm_beagle/Vga.h.

virtual void ArmBeagleVga::setControl ( VgaControl  which)
inlinevirtual

Sets the given attribute mode control.

Implements Vga.

Definition at line 38 of file kernel/machine/arm_beagle/Vga.h.

bool ArmBeagleVga::setLargestTextMode ( )
inlinevirtual

Sets the largest possible text mode.

Returns
True on success, false on failure.

Implements Vga.

Definition at line 63 of file kernel/machine/arm_beagle/Vga.h.

bool ArmBeagleVga::setMode ( int  mode)
virtual

Changes the mode the VGA device is in.

Parameters
nColsThe number of columns required.
nRowsThe number of rows required.
bIsTextTrue if the caller requires a text mode, false if graphical.
nBppOnly applicable for graphics modes - the number of bits per pixel.
Returns
True on success, false on failure.

Implements Vga.

Definition at line 36 of file kernel/machine/arm_beagle/Vga.cc.

Referenced by clearControl().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: