The tcDspDisplayDriver class is a base class to provide generic access to a display frame buffer via the tcDspFpgaDma class. More...
#include <core/DspDisplayDriver.h>
Public Member Functions | |
tcDspDisplayDriver (tcDspFpgaDma *apDma=NULL, int anDmaChannel=0) | |
This constructor is used to open a tcDspDisplayDriver interface via the specified instance of tcDspFpgaDma and channel. | |
virtual | ~tcDspDisplayDriver () |
This destructor is used to close up and free the resources tied to the display driver. | |
virtual int | GetWidthPixels (void) |
Retrieves display width in pixels. | |
virtual int | GetHeightPixels (void) |
Retrieves display height in pixels. | |
virtual int | GetDepthBits (void) |
Retrieves display color depth in bits per pixel. | |
virtual int | GetFrameBufferBytes (void) |
Returns the required size of the frame buffer (in bytes). | |
virtual bool | SetFrameBuffer (void *apBuffer) |
Updates the current frame buffer, and initiates DMA transfer from the provided buffer. | |
virtual void * | GetFrameBuffer (void) |
Retrieves the current frame buffer in use. | |
virtual bool | GetScreenEnabled () |
Returns true if the screen is enabled. | |
virtual void | SetScreenEnabled (bool apEnable) |
Enables/Disables the screen. | |
Protected Attributes | |
LCK_Handle | mhMutex |
Used to serialize access. | |
int | mnWidthPixels |
Pixel width of display. | |
int | mnHeightPixels |
Pixel height of display. | |
int | mnDepthBits |
Color depth of display. | |
tcDspFpgaDma * | mpDma |
Pointer to instance of tcDspFpgaDma. | |
int | mnDmaChannel |
DMA channel to use. | |
void * | mpFrameBuffer |
Current frame buffer address. | |
int | mnFrameBufferBytes |
Bytes required in frame buffer. | |
CACHE_L2Mode | msL2Mode |
Cache mode. | |
bool | mbScreenEnabled |
Screen enable. |
The tcDspDisplayDriver class is a base class to provide generic access to a display frame buffer via the tcDspFpgaDma class.
Specific derived classes must be provided for different display geometries and color depths.
tcDspDisplayDriver::tcDspDisplayDriver | ( | tcDspFpgaDma * | apDma = NULL , |
|
int | anDmaChannel = 0 | |||
) |
This constructor is used to open a tcDspDisplayDriver interface via the specified instance of tcDspFpgaDma and channel.
[in] | apDma | Pointer to an instance of tcDspFpgaDma to use to provide access to the frame buffer. |
[in] | anDmaChannel | The DMA channel in apDma to use. |
tcDspDisplayDriver::~tcDspDisplayDriver | ( | ) | [virtual] |
This destructor is used to close up and free the resources tied to the display driver.
int tcDspDisplayDriver::GetWidthPixels | ( | void | ) | [virtual] |
int tcDspDisplayDriver::GetHeightPixels | ( | void | ) | [virtual] |
int tcDspDisplayDriver::GetDepthBits | ( | void | ) | [virtual] |
int tcDspDisplayDriver::GetFrameBufferBytes | ( | void | ) | [virtual] |
Returns the required size of the frame buffer (in bytes).
bool tcDspDisplayDriver::SetFrameBuffer | ( | void * | apBuffer | ) | [virtual] |
Updates the current frame buffer, and initiates DMA transfer from the provided buffer.
If NULL, DMA is disabled.
[in] | apBuffer | Pointer to the new frame buffer. |
Reimplemented in MityDSP::tcDspLcd, and MityDSP::tcDspQvga16.
void * tcDspDisplayDriver::GetFrameBuffer | ( | void | ) | [virtual] |
Retrieves the current frame buffer in use.
bool tcDspDisplayDriver::GetScreenEnabled | ( | void | ) | [virtual] |
Returns true if the screen is enabled.
void tcDspDisplayDriver::SetScreenEnabled | ( | bool | apEnable | ) | [virtual] |
Enables/Disables the screen.
[in] | apEnable | True to turn on the screen, false to turn it off |
Reimplemented in MityDSP::tcDspLcd.
LCK_Handle MityDSP::tcDspDisplayDriver::mhMutex [protected] |
Used to serialize access.
int MityDSP::tcDspDisplayDriver::mnWidthPixels [protected] |
Pixel width of display.
int MityDSP::tcDspDisplayDriver::mnHeightPixels [protected] |
Pixel height of display.
int MityDSP::tcDspDisplayDriver::mnDepthBits [protected] |
Color depth of display.
tcDspFpgaDma* MityDSP::tcDspDisplayDriver::mpDma [protected] |
Pointer to instance of tcDspFpgaDma.
int MityDSP::tcDspDisplayDriver::mnDmaChannel [protected] |
DMA channel to use.
void* MityDSP::tcDspDisplayDriver::mpFrameBuffer [protected] |
Current frame buffer address.
int MityDSP::tcDspDisplayDriver::mnFrameBufferBytes [protected] |
Bytes required in frame buffer.
CACHE_L2Mode MityDSP::tcDspDisplayDriver::msL2Mode [protected] |
Cache mode.
bool MityDSP::tcDspDisplayDriver::mbScreenEnabled [protected] |
Screen enable.