dn_com.h
Go to the documentation of this file.
00001 #ifndef DN_COM_H_
00002 #define DN_COM_H_
00003 
00036 #ifndef _DN_EXP_COM
00037 #define _DN_EXP_COM
00038 #endif /* _DN_EXP_COM */
00039 
00045 #if defined(_USE_WIN_API)
00046 #define COM_BITS_CTS MS_CTS_ON
00047 typedef DCB COM_STATE;
00048 #elif defined(_USE_LINUX_API)
00049 #define COM_BITS_CTS TIOCM_CTS
00050 typedef struct termios COM_STATE;
00051 #endif
00052 
00053 #ifdef __cplusplus
00054 extern "C"
00055 {
00056 #endif
00057 
00064   _DN_EXP_COM HRESULT
00065   com_open(void *param, int *sock);
00066 
00072   _DN_EXP_COM HRESULT
00073   com_close(int *sock);
00074 
00083   _DN_EXP_COM HRESULT
00084   com_send(int sock, const char *buf, uint32_t len_buf, void *arg);
00085 
00095   _DN_EXP_COM HRESULT
00096   com_recv(int sock, char *buf, uint32_t len_buf, uint32_t *len_recved,
00097       uint32_t timeout, void *arg);
00098 
00105   _DN_EXP_COM HRESULT
00106   com_set_timeout(int sock, uint32_t timeout);
00107 
00114   _DN_EXP_COM HRESULT
00115   com_clear(int sock, uint32_t timeout);
00116 
00123   _DN_EXP_COM HRESULT
00124   com_get_state(int sock, COM_STATE *state);
00125 
00132   _DN_EXP_COM HRESULT
00133   com_set_state(int sock, COM_STATE *state);
00134 
00141   _DN_EXP_COM HRESULT
00142   com_get_modem_state(int sock, uint32_t *state);
00143 
00144 #ifdef __cplusplus
00145 }
00146 #endif
00147 
00148 #endif /* DN_COM_H_ */


bcap_core
Author(s): DENSO WAVE INCORPORATED
autogenerated on Thu Jun 6 2019 21:00:02