Download S1D13705F00A Technical Manual HARDWARE FUNCTIONAL

Transcript
9: HARDWARE ABSTRACTION LAYER (HAL)
int seSetBitsPerPixel(int BitsPerPixel)
Description: This routine sets the display color depth.
After performing validity checks to ensure the requested video mode can be set the
appropriate registers are changed and the Look-Up Table is set its default values
appropriate to the color depth.
This call is similar to a mode set call on a standard VGA.
Parameter:
BitsPerPixel
Return Value: ERR_OK
ERR_FAILED
- desired color depth in bits per pixel.
- Valid arguments are: 1, 2, 4, and 8.
- operation completed with no problems
- possible causes for this error include:
1) the desired frame rate may not be attainable with the specified input clock
2) the combination of width, height and color depth may require more memory than
is available on the S1D13705.
int seGetBitsPerPixel(int * pBitsPerPixel)
Description: This function reads the S1D13705 registers to determine the current color depth and
returns the result in pBitsPerPixel.
Parameters: pBitsPerPixel
- pointer to an integer to receive current color depth.
- return values will be: 1, 2, 4, or 8.
Return Value: ERR_OK
- operation completed with no problems
int seGetBytesPerScanline(int * pBytes)
Description: Determines the number of bytes per scan line of current display mode. It is assumed
that the registers have already been correctly initialized before seGetBytesPerScanline() is called (i.e. after initializing the HAL, setting the Display mode and adjusting
the bits per pixel or other values).
The number of bytes per scanline will include non-displayed bytes if the screen
width is greater the display width, or in Default SwivelView Mode.
Parameters: pBytes
- pointer to an integer to receive the number of bytes per scan line
Return Value: ERR_OK
- operation completed with no problems
int seGetScreenSize(int * Width, int * Height)
Description: Retrieves the width and height in pixels of the display surface. The width and height
are derived by reading the horizontal and vertical size registers and calculating the
dimensions. Virtual dimensions are not taken into account for this calculation.
When the display is in SwivelView mode the dimensions will be swapped. (i.e. a
640×480 display in SwivelView mode will return a width of 480 and height of 640).
2-36
Parameters: Width
Height
- pointer to an integer to receive the display width
- pointer to an integer to receive the display height
Return value: ERR_OK
- the operation completed successfully
EPSON
S1D13705F00A PROGRAMMING NOTES
AND EXAMPLES (X27A-G-002-01)