35 #ifndef _DN_EXP_TPCOMM 36 #define _DN_EXP_TPCOMM 39 #include "../dn_common.h" 46 #define TP_CONN_MAX (1) 52 #define TP_RETRY_NAK (2) 58 #define TP_RETRY_TIMEOUT (2) 64 #define TP_ID_CLIENT (0x11) 70 #define TP_ID_SERVER (0x90) 76 #define TP_CMD_REQ_ID (0x0EF0) 82 #define TP_CMD_KEYINFO (0x0C20) 88 #define TP_CMD_TOUTCHINFO (0x0C21) 94 #define TP_CMD_BEEP (0x0C28) 100 #define TP_CMD_LED_ON (0x0C29) 106 #define TP_CMD_LED_OFF (0x0C2A) 112 #define TP_CMD_LED_FLASH (0x0C2B) 118 #define TP_CMD_GET_KEYSTATE (0x0C2D) 124 #define TP_CMD_BKL_ON (0x0C33) 130 #define TP_CMD_LCD (0x0C49) 136 #define TP_CMD_MTP_DRAW (0x0C81) 142 #define TP_CMD_PING (0x0C2F) 294 (*Call_TPState)(
int state);
_DN_EXP_TPCOMM HRESULT TPComm_GetTPState(int fd, int *state)
Gets TP state.
MINITP_COMMAND
Mini TP command information.
TP_TOUCH_ENUM
TP touch information.
_DN_EXP_TPCOMM HRESULT TPComm_GetTimeout(int fd, uint32_t *timeout)
Gets timeout.
MINITP_PARAM
Mini TP parameter information.
_DN_EXP_TPCOMM HRESULT TPComm_Close(int *pfd)
Ends TP communication.
_DN_EXP_TPCOMM HRESULT TPComm_DrawRectangle(int fd, uint8_t start_x, uint8_t start_y, uint8_t end_x, uint8_t end_y, uint8_t color_fg, uint8_t color_bg)
Draws a rectangle to Mini TP.
Callback functions of TP event.
LED_STATE
LED state information.
unsigned long long uint64_t
TP_STATE
TP connection state.
_DN_EXP_TPCOMM HRESULT TPComm_DrawString(int fd, BSTR bstr, uint8_t pos_x, uint8_t pos_y, uint8_t size, uint8_t attr, uint8_t color_fg, uint8_t color_bg)
Draws a string to Mini TP.
TP_KEY_ENUM
TP key information.
_DN_EXP_TPCOMM HRESULT TPComm_DrawMiniTP(int fd, VARIANT commands)
Sends Draw Mini TP commands.
A type definition for the multi type variable.
_DN_EXP_TPCOMM HRESULT TPComm_Open(const char *connect, uint32_t timeout, int client, int *pfd)
Starts TP communication.
_DN_EXP_TPCOMM HRESULT TPComm_SetTimeout(int fd, uint32_t timeout)
Sets timeout.
_DN_EXP_TPCOMM HRESULT TPComm_LCD(int fd, int16_t contrast)
Changes TP LCD.
_DN_EXP_TPCOMM HRESULT TPComm_BEEP(int fd, int16_t time)
TP beeps.
static int connect(SOCKET s, const struct sockaddr *name, int namelen)
_DN_EXP_TPCOMM HRESULT TPComm_LED(int fd, int16_t number, int16_t state)
Changes TP LED.
_DN_EXP_TPCOMM HRESULT TPComm_SetCallFunc(const struct CALL_FUNC_TP *func)
Sets callback functions.
_DN_EXP_TPCOMM HRESULT TPComm_DrawLine(int fd, uint8_t start_x, uint8_t start_y, uint8_t end_x, uint8_t end_y, uint8_t color_fg)
Draws a line to Mini TP.