45 #if defined(_USE_WIN_API) 46 #define COM_BITS_CTS MS_CTS_ON 48 #elif defined(_USE_LINUX_API) 49 #define COM_BITS_CTS TIOCM_CTS
_DN_EXP_COM HRESULT com_clear(int sock, uint32_t timeout)
Clears the received buffer.
_DN_EXP_COM HRESULT com_get_modem_state(int sock, uint32_t *state)
Gets the serial port pin status.
_DN_EXP_COM HRESULT com_open(void *param, int *sock)
Opens serial port.
_DN_EXP_COM HRESULT com_set_timeout(int sock, uint32_t timeout)
Sets timeout value to the serial socket.
_DN_EXP_COM HRESULT com_recv(int sock, char *buf, uint32_t len_buf, uint32_t *len_recved, uint32_t timeout, void *arg)
Receives serial packet.
_DN_EXP_COM HRESULT com_close(int *sock)
Closes the socket.
_DN_EXP_COM HRESULT com_send(int sock, const char *buf, uint32_t len_buf, void *arg)
Sends serial packet.
_DN_EXP_COM HRESULT com_set_state(int sock, COM_STATE *state)
Puts the serial socket parameters.
_DN_EXP_COM HRESULT com_get_state(int sock, COM_STATE *state)
Gets the serial socket parameters.