DiplayApp library

Dependents:   mbed-os_Watson-IoT_ZXing_sample mbed-os_Watson-IoT_ZXing_sample GR-Boads_Camera_DisplayApp GR-Boads_Camera_DisplayApp ... more

Embed: (wiki syntax)

« Back to documentation index

DisplayApp Class Reference

DisplayApp Class Reference

A class to communicate a DisplayApp. More...

#include <DisplayApp.h>

Data Structures

struct  touch_pos_t
 Touch position structure. More...

Public Member Functions

 DisplayApp (osPriority tsk_pri=osPriorityNormal, uint32_t stack_size=2048)
 Constructor: Initializes DisplayApp.
int SendRgb888 (uint8_t *buf, uint32_t pic_width, uint32_t pic_height)
 Send RGB888 data.
int SendJpeg (uint8_t *buf, uint32_t size)
 Send JPEG data.
void SetCallback (Callback< void()> func)
 Attach a function to call whenever a serial interrupt is generated.
template<typename T >
void SetCallback (T *obj, void(T::*method)())
 Attach a function to call when touch panel int.
template<typename T >
void SetCallback (T *obj, void(*method)(T *))
 Attach a member function to call when touch panel int.
int GetMaxTouchNum (void)
 Get the maximum number of simultaneous touches.
int GetCoordinates (int touch_buff_num, touch_pos_t *p_touch)
 Get the coordinates.

Detailed Description

A class to communicate a DisplayApp.

Definition at line 16 of file DisplayApp.h.


Constructor & Destructor Documentation

DisplayApp ( osPriority  tsk_pri = osPriorityNormal,
uint32_t  stack_size = 2048 
)

Constructor: Initializes DisplayApp.

Parameters:
tsk_priPriority of the thread function. (default: osPriorityNormal).
init_priPriority of before the USB is connected. (default: osPriorityLow).
stack_sizestack size (in bytes) requirements for the thread function. (default: 2048).

Definition at line 88 of file DisplayApp.cpp.


Member Function Documentation

int GetCoordinates ( int  touch_buff_num,
touch_pos_t p_touch 
)

Get the coordinates.

Parameters:
touch_buff_numThe number of structure p_touch.
p_touchTouch position information.
Returns:
The number of touch points.

Definition at line 223 of file DisplayApp.cpp.

int GetMaxTouchNum ( void   )

Get the maximum number of simultaneous touches.

Returns:
The maximum number of simultaneous touches.

Definition at line 219 of file DisplayApp.cpp.

int SendJpeg ( uint8_t *  buf,
uint32_t  size 
)

Send JPEG data.

Parameters:
bufdata buffer address
sizedata size
Returns:
send data size

Definition at line 206 of file DisplayApp.cpp.

int SendRgb888 ( uint8_t *  buf,
uint32_t  pic_width,
uint32_t  pic_height 
)

Send RGB888 data.

Parameters:
bufdata buffer address
pic_widthpicture width
pic_heightpicture height
Returns:
send data size

Definition at line 119 of file DisplayApp.cpp.

void SetCallback ( T *  obj,
void(T::*)()  method 
)

Attach a function to call when touch panel int.

Parameters:
objpointer to the object to call the member function on
methodpointer to the member function to be called

Definition at line 62 of file DisplayApp.h.

void SetCallback ( Callback< void()>  func )

Attach a function to call whenever a serial interrupt is generated.

Parameters:
funcA pointer to a void function, or 0 to set as none

Definition at line 202 of file DisplayApp.cpp.

void SetCallback ( T *  obj,
void(*)(T *)  method 
)

Attach a member function to call when touch panel int.

Parameters:
objpointer to the object to call the member function on
methodpointer to the member function to be called

Definition at line 73 of file DisplayApp.h.