The tcDspQvga16 class provides access to a 16-bit color QVGA (320x240 pixel) display device. More...
#include <core/DspQvga16.h>
Public Member Functions | |
tcDspQvga16 (void *apAddress, tcDspFpgaDma *apDma, int anDmaChannel, bool abPortrait=false) | |
This constructor is used to open a tcDspQvga16 16-bit Quarter VGA display interface. | |
virtual | ~tcDspQvga16 () |
Default destructor. | |
virtual bool | SetFrameBuffer (void *apBuffer) |
Updates the current frame buffer, and initiates DMA transfer from the provided buffer. | |
virtual void | SetBacklight (float anPercent) |
This method sets the QVGA backlighting to the specified level. | |
virtual float | GetBacklight (void) |
This method retrieves the current QVGA backlighting level. | |
virtual bool | FlipDisplay (bool abFlip) |
This method is used to flip (or un-flip) the QVGA display presentation. | |
virtual bool | IsFlipped (void) |
This method indicates whether or not the display is currently flipped. | |
Public Member Functions inherited from MityDSP::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. | |
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 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 | |
volatile unsigned int * | mpBaseAddr |
TouchScreen base address. | |
float | mnBacklightDutyPercent |
Current backlight duty cycle (percent) | |
unsigned int | mnBacklightDutyCounts |
Current backlight duty cycle (counts) | |
bool | mbDisplayFlipped |
True if display is flipped. | |
Protected Attributes inherited from MityDSP::tcDspDisplayDriver | |
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. |
Static Protected Attributes | |
static const int | gnBacklightMinValue = 0 |
minimum backlight duty cycle value | |
static const int | gnBacklightMaxValue = 256 |
maximum backlight duty cycle value | |
static const int | gnStartStopDelayMsec = 200 |
startup/shutdown delay (msec) | |
static unsigned int | mnTicksPerMsec = CLK_countspms() / CLK_getprd() |
Number of clocks per millisecond. |
The tcDspQvga16 class provides access to a 16-bit color QVGA (320x240 pixel) display device.
It is derived from the tcDspDisplayDriver base class to provide a consistent interface to the underlying frame buffer. Additional functions to set and get the display backlighting are provided. An instance of the tcDspFpgaDma class must be provided to exchange data with the device. This driver in turn may be used to setup direct access to the device's frame buffer, or may be used in conjunction with the tcDisplay class.
tcDspQvga16::tcDspQvga16 | ( | void * | apAddress, |
tcDspFpgaDma * | apDma, | ||
int | anDmaChannel, | ||
bool | abPortrait = false |
||
) |
This constructor is used to open a tcDspQvga16 16-bit Quarter VGA display interface.
This constructor registers the required FPGA DMA interface with the base class.
[in] | apAddress | Base Address of the 16-bit QVGA core |
[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. |
[in] | abPortrait | True if the display is scanned in portrait mode, false if in landscape (default: false). |
|
virtual |
Default destructor.
|
virtual |
Updates the current frame buffer, and initiates DMA transfer from the provided buffer.
If NULL, DMA is disabled. In addition, if the frame buffer is transitioning from NULL, the LCD startup procedure is performed. Similarly, if transitioning to NULL, the shutdown procedure is performed.
[in] | apBuffer | Pointer to the new frame buffer. |
Reimplemented from MityDSP::tcDspDisplayDriver.
|
virtual |
This method sets the QVGA backlighting to the specified level.
The level is given as a percentage, where 0% is off, and 100% is full brightness.
[in] | anPercent | LCD backlight brightness percentage. |
|
virtual |
This method retrieves the current QVGA backlighting level.
|
virtual |
This method is used to flip (or un-flip) the QVGA display presentation.
[in] | abFlip | Set to true to flip display, false to restore. |
|
virtual |
This method indicates whether or not the display is currently flipped.
|
staticprotected |
minimum backlight duty cycle value
|
staticprotected |
maximum backlight duty cycle value
|
staticprotected |
startup/shutdown delay (msec)
|
staticprotected |
Number of clocks per millisecond.
|
protected |
TouchScreen base address.
|
protected |
Current backlight duty cycle (percent)
|
protected |
Current backlight duty cycle (counts)
|
protected |
True if display is flipped.