USBD480_lib.h File Reference


Data Structures

struct  DisplayInfo
 Display information structure. More...
struct  TouchReport
 Touchscreen report. More...

Defines

#define USBD480_API   _declspec(dllimport)
#define USBD480_OK   1
#define USBD480_ERROR   0
#define USBD480_OPEN_WITH_USERNAME   0x01

Typedefs

typedef unsigned int uint32_t
typedef unsigned short uint16_t
typedef unsigned char uint8_t

Enumerations

enum  PIXEL_FORMAT {
  PF_1BPP = 0, PF_1BPP_DS, PF_2BPP, PF_4BPP,
  PF_8BPP, PF_16BPP_RGB565, PF_16BPP_BGR565, PF_32BPP
}

Functions

USBD480_API int _stdcall USBD480_GetNumberOfDisplays (void)
 Returns the number of attached displays.
USBD480_API int _stdcall USBD480_GetDisplayConfiguration (uint32_t index, DisplayInfo *di)
 Get display configuration information for specified display.
USBD480_API int _stdcall USBD480_Open (DisplayInfo *di, uint32_t flags)
 Open the display.
USBD480_API int _stdcall USBD480_Close (DisplayInfo *di)
 Close the display.
USBD480_API int _stdcall USBD480_DrawFullScreen (DisplayInfo *di, uint8_t *fb)
 Draw full screen image to the display from RGB565 buffer.
USBD480_API int _stdcall USBD480_DrawFullScreenRGBA32 (DisplayInfo *di, uint32_t *fb)
 Draw full screen image to the display from RGBA buffer.
USBD480_API int _stdcall USBD480_DrawFullScreenBGRA32 (DisplayInfo *di, uint32_t *fb)
 Draw full screen image to the display from BGRA buffer.
USBD480_API int _stdcall USBD480_SetBrightness (DisplayInfo *di, uint32_t brightness)
 Set display brightness.
USBD480_API int _stdcall USBD480_SetTouchMode (DisplayInfo *di, uint32_t mode)
 Set touchscreen report mode.
USBD480_API int _stdcall USBD480_SetAddress (DisplayInfo *di, uint32_t address)
 Set address pointer in the frame buffer memory.
USBD480_API int _stdcall USBD480_SetFrameStartAddress (DisplayInfo *di, uint32_t address)
 Set frame start address in the frame buffer.
USBD480_API int _stdcall USBD480_DrawFromBuffer (DisplayInfo *di, uint8_t *fb, uint32_t size)
 Draw to the display from a buffer.
USBD480_API int _stdcall USBD480_GetTouchReport (DisplayInfo *di, TouchReport *touch)
 Get touch screen report.
USBD480_API int _stdcall USBD480_GetTouchPosition (DisplayInfo *di, uint32_t *x, uint32_t *y)
 Get touch screen position.
USBD480_API int _stdcall USBD480_SetStartupImage (DisplayInfo *di, uint8_t *buffer, uint32_t size)
USBD480_API int _stdcall USBD480_UpdateFPGA (DisplayInfo *di)
USBD480_API int _stdcall USBD480_UpdateFW (DisplayInfo *di)

Define Documentation

#define USBD480_API   _declspec(dllimport)

#define USBD480_OK   1

#define USBD480_ERROR   0

#define USBD480_OPEN_WITH_USERNAME   0x01


Typedef Documentation

typedef unsigned int uint32_t

typedef unsigned short uint16_t

typedef unsigned char uint8_t


Enumeration Type Documentation

Enumerator:
PF_1BPP 
PF_1BPP_DS 
PF_2BPP 
PF_4BPP 
PF_8BPP 
PF_16BPP_RGB565 
PF_16BPP_BGR565 
PF_32BPP 


Function Documentation

USBD480_API int _stdcall USBD480_GetNumberOfDisplays ( void   ) 

Returns the number of attached displays.

This function returns the number of attached displays. Returns the number of all attached displays even if they are in use and not available.

Returns:
Returns the number of displays attached.

USBD480_API int _stdcall USBD480_GetDisplayConfiguration ( uint32_t  index,
DisplayInfo di 
)

Get display configuration information for specified display.

Parameters:
index is the number of the display for which the information is read.
di is a pointer to the DisplayInfo structure where the information will be saved.
This function fills the configuration data structure for the display which index is given in parameter index. The index number starts from 0. If you have two displays connected they have index numbers 0 and 1.

Returns:
Returns USBD480_OK if configuration was read successfully. In case of a failure USBD480_ERROR is returned. If the display is not available USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_Open ( DisplayInfo di,
uint32_t  flags 
)

Open the display.

Parameters:
di is a pointer to the DisplayInfo structure of the display to open.
flags should be 0.
This function opens the display and prepares it for further use. When working with multiple displays the DisplayInfo structure for each display is first filled with USBD480_GetDisplayConfiguration() and then passed to USBD480_Open().

Returns:
Returns USBD480_OK if display was opened successfully. In case of a failure USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_Close ( DisplayInfo di  ) 

Close the display.

Parameters:
di is a pointer to the DisplayInfo structure of the display to close.
This function closes the display and frees any allocated resources.

Returns:
Returns USBD480_OK if display was closed successfully. If supplied DisplayInfo structure is invalid USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_DrawFullScreen ( DisplayInfo di,
uint8_t fb 
)

Draw full screen image to the display from RGB565 buffer.

Parameters:
di is a pointer to the DisplayInfo structure of the display to use.
fb is a pointer to the buffer including the data to write to the display.
This function updates the full screen with data from the buffer. The buffer size needs to be at least display width * display heigth * 2 bytes in size (for RGB565 pixel data). The function writes the data to framebuffer address 0.

Returns:
Returns USBD480_OK if success. In case of a failure USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_DrawFullScreenRGBA32 ( DisplayInfo di,
uint32_t fb 
)

Draw full screen image to the display from RGBA buffer.

Parameters:
di is a pointer to the DisplayInfo structure of the display to use.
fb is a pointer to the buffer including the data to write to the display.
This function updates the full screen with data from the buffer. The buffer size needs to be at least display width * display heigth * 4 bytes in size (for RGB pixel data). Format is RGBA => 0xAABBGGRR

Returns:
Returns USBD480_OK if success. In case of a failure USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_DrawFullScreenBGRA32 ( DisplayInfo di,
uint32_t fb 
)

Draw full screen image to the display from BGRA buffer.

Parameters:
di is a pointer to the DisplayInfo structure of the display to use.
fb is a pointer to the buffer including the data to write to the display.
This function updates the full screen with data from the buffer. The buffer size needs to be at least display width * display heigth * 4 bytes in size (for RGB pixel data). Format is BGRA => 0xAARRGGBB

Returns:
Returns USBD480_OK if success. In case of a failure USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_SetBrightness ( DisplayInfo di,
uint32_t  brightness 
)

Set display brightness.

Parameters:
di is a pointer to the DisplayInfo structure of the display to use.
brightness is the backlight brightness. (0-255)
This function sets the backlight values.

Returns:
Returns USBD480_OK if success. In case of a failure USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_SetTouchMode ( DisplayInfo di,
uint32_t  mode 
)

Set touchscreen report mode.

Parameters:
di is a pointer to the DisplayInfo structure of the display to use.
mode is the touch mode.
This function sets the touchscreen report mode. There are different report modes available that can report either raw touch samples or then samples with some filtering applied.

Returns:
Returns USBD480_OK if success. In case of a failure USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_SetAddress ( DisplayInfo di,
uint32_t  address 
)

Set address pointer in the frame buffer memory.

Parameters:
di is a pointer to the DisplayInfo structure of the display to use.
address is the address in the frame buffer memory.
This function sets the frame buffer address pointer.

Returns:
Returns USBD480_OK if success. In case of a failure USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_SetFrameStartAddress ( DisplayInfo di,
uint32_t  address 
)

Set frame start address in the frame buffer.

Parameters:
di is a pointer to the DisplayInfo structure of the display to use.
address is the address in the frame buffer memory.
This function sets the start address of the currently visible frame inside the frame buffer. Default frame start address is 0. The actual address change is synchronized with VSYNC inside the controller hardware.

Returns:
Returns USBD480_OK if success. In case of a failure USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_DrawFromBuffer ( DisplayInfo di,
uint8_t fb,
uint32_t  size 
)

Draw to the display from a buffer.

Parameters:
di is a pointer to the DisplayInfo structure of the display to use.
fb is a pointer to the buffer including the data to write to the display.
size is the size of the data. (data is expected in 512 byte blocks)
This function writes the data to the frame buffer memory starting from the frame buffer address pointer. Address in automatically incremented as data is written.

Returns:
Returns USBD480_OK if success. In case of a failure USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_GetTouchReport ( DisplayInfo di,
TouchReport touch 
)

Get touch screen report.

Parameters:
di is a pointer to the DisplayInfo structure of the display to use.
touch is a pointer to the TouchReport structure.
This function gets the touch screen sample report.

Returns:
Returns USBD480_OK if success. In case of a failure USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_GetTouchPosition ( DisplayInfo di,
uint32_t x,
uint32_t y 
)

Get touch screen position.

Parameters:
di is a pointer to the DisplayInfo structure of the display to use.
x is a pointer to unsigned integer where to store the X position
y is a pointer to unsigned integer where to store the Y position
This function gets the touch screen position values.

Returns:
Returns USBD480_OK if success. In case of a failure USBD480_ERROR is returned.

USBD480_API int _stdcall USBD480_SetStartupImage ( DisplayInfo di,
uint8_t buffer,
uint32_t  size 
)

USBD480_API int _stdcall USBD480_UpdateFPGA ( DisplayInfo di  ) 

USBD480_API int _stdcall USBD480_UpdateFW ( DisplayInfo di  ) 


Generated on Mon Jun 8 10:59:32 2009 for USBD480_lib API by  doxygen 1.5.5