Macros | Functions
dn_com.h File Reference

Serial API file. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _DN_EXP_COM
 

Functions

_DN_EXP_COM HRESULT com_clear (int sock, uint32_t timeout)
 Clears the received buffer. More...
 
_DN_EXP_COM HRESULT com_close (int *sock)
 Closes the socket. More...
 
_DN_EXP_COM HRESULT com_get_modem_state (int sock, uint32_t *state)
 Gets the serial port pin status. More...
 
_DN_EXP_COM HRESULT com_get_state (int sock, COM_STATE *state)
 Gets the serial socket parameters. More...
 
_DN_EXP_COM HRESULT com_open (void *param, int *sock)
 Opens serial port. More...
 
_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. More...
 
_DN_EXP_COM HRESULT com_send (int sock, const char *buf, uint32_t len_buf, void *arg)
 Sends serial packet. More...
 
_DN_EXP_COM HRESULT com_set_state (int sock, COM_STATE *state)
 Puts the serial socket parameters. More...
 
_DN_EXP_COM HRESULT com_set_timeout (int sock, uint32_t timeout)
 Sets timeout value to the serial socket. More...
 

Detailed Description

Serial API file.

Defines Serial APIs.

Version
1.0
Date
2014/11/06
Author
DENSO WAVE

Software License Agreement (MIT License)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition in file dn_com.h.

Macro Definition Documentation

#define _DN_EXP_COM

Definition at line 37 of file dn_com.h.

Function Documentation

HRESULT com_clear ( int  sock,
uint32_t  timeout 
)

Clears the received buffer.

Parameters
[in]sockThe socket to be cleared.
[in]timeoutTimeout value.

Definition at line 508 of file dn_com.c.

HRESULT com_close ( int *  sock)

Closes the socket.

Parameters
[in,out]sockThe socket to be closed.

Definition at line 385 of file dn_com.c.

HRESULT com_get_modem_state ( int  sock,
uint32_t state 
)

Gets the serial port pin status.

Parameters
[in]sockThe socket to be gotten.
[in]stateThe gotten serial port pin status.

Definition at line 581 of file dn_com.c.

HRESULT com_get_state ( int  sock,
COM_STATE state 
)

Gets the serial socket parameters.

Parameters
[in]sockThe socket to be gotten.
[out]stateThe gotten parameters.

Definition at line 527 of file dn_com.c.

HRESULT com_open ( void *  param,
int *  sock 
)

Opens serial port.

Parameters
[in]paramThe pointer of serial connection parameters: CONN_PARAM_COM.
[out]sockThe created socket.

Definition at line 360 of file dn_com.c.

HRESULT com_recv ( int  sock,
char *  buf,
uint32_t  len_buf,
uint32_t len_recved,
uint32_t  timeout,
void *  arg 
)

Receives serial packet.

Parameters
[in]sockThe socket to receive.
[out]bufThe buffer to be received.
[in]len_bufThe allocated size of received buffer.
[out]len_recvedThe size of received buffer.
[in]argSpecial parameter. Do not use.

Definition at line 453 of file dn_com.c.

HRESULT com_send ( int  sock,
const char *  buf,
uint32_t  len_buf,
void *  arg 
)

Sends serial packet.

Parameters
[in]sockThe socket to send.
[in]bufThe buffer to be sent.
[in]len_bufThe size of sent buffer.
[in]argSpecial parameter. Do not use.

Definition at line 412 of file dn_com.c.

HRESULT com_set_state ( int  sock,
COM_STATE state 
)

Puts the serial socket parameters.

Parameters
[in]sockThe socket to be set.
[in]stateThe setting parameters.

Definition at line 554 of file dn_com.c.

HRESULT com_set_timeout ( int  sock,
uint32_t  timeout 
)

Sets timeout value to the serial socket.

Parameters
[in]sockThe socket to be set.
[in]timeoutTimeout value.

Definition at line 489 of file dn_com.c.



bcap_core
Author(s): DENSO WAVE INCORPORATED
autogenerated on Mon Jun 10 2019 13:12:20