|
Wiicom API Lib
|
Wiicom virtual com port library. Continua...
#include "wiicom_libvcp.h"Definizioni | |
| #define | VCP_NUM_MAX_TIME_WRITE 5 |
| #define | MAX_NUM_VCP 25 |
Funzioni | |
| uint8_t | wiicom_libvcp_open (t_wiicom_libvcp_handle *fd, char *device, uint32_t vcp_baudrate, uint8_t vcp_parity, uint8_t vcp_stop2bit, uint8_t vcp_data_bits_size) |
| Function that open a VCP and returns a VCP handle. Continua... | |
| void | wiicom_libvcp_close (t_wiicom_libvcp_handle fd) |
| Function that close a VCP handle. Continua... | |
| long | wiicom_libvcp_read (t_wiicom_libvcp_handle fd, uint8_t *buffer, uint32_t buffer_size) |
| Function that read data from a VCP handle. Continua... | |
| long | wiicom_libvcp_write (t_wiicom_libvcp_handle fd, uint8_t *buffer, uint32_t buffer_size) |
| Function that write data to a VCP handle. Continua... | |
| void | wiicom_libvcp_deinit () |
| Function that de-initialize the vitual com port library Warning! This function is called when not used any more a VCP or, in general, before the close of the program. Continua... | |
| void | wiicom_libvcp_init () |
| Function that initializes the vitual com port library Warning! This function should be called before using the virtual com port. Continua... | |
| long | wiicom_libvcp_write_string (t_wiicom_libvcp_handle fd, char *string_to_write) |
| Function that write a string to a VCP handle. Continua... | |
| int | wiicom_libvcp_getcomports (char ports[][15]) |
| Function that get all system VCP Warning! This function works only on windows and linux system. Continua... | |
Wiicom virtual com port library.
Generic library for managing a virtual com port
| #define MAX_NUM_VCP 25 |
| #define VCP_NUM_MAX_TIME_WRITE 5 |
| void wiicom_libvcp_close | ( | t_wiicom_libvcp_handle | fd | ) |
Function that close a VCP handle.
| [in] | fd | VCP handle |
| void wiicom_libvcp_deinit | ( | ) |
Function that de-initialize the vitual com port library
Warning! This function is called when not used any more a VCP or, in general, before the close of the program.
| int wiicom_libvcp_getcomports | ( | char | ports[][15] | ) |
Function that get all system VCP
Warning! This function works only on windows and linux system.
| [out] | ports | array width discoverd ports |
| void wiicom_libvcp_init | ( | ) |
Function that initializes the vitual com port library
Warning! This function should be called before using the virtual com port.
| uint8_t wiicom_libvcp_open | ( | t_wiicom_libvcp_handle * | fd, |
| char * | device, | ||
| uint32_t | vcp_baudrate, | ||
| uint8_t | vcp_parity, | ||
| uint8_t | vcp_stop2bit, | ||
| uint8_t | vcp_data_bits_size | ||
| ) |
Function that open a VCP and returns a VCP handle.
| [out] | fd | VCP handle |
| [in] | device | a virtual serial port device (Ex. /dev/stty0 on Unix like, \\\\.\\COM5 on Windows) |
| [in] | vcp_baudrate | specifies a Baud rate speeds |
| [in] | vcp_parity | specifies a parity type |
| [in] | vcp_stop2bit | specifies if there is a 2 bits stop, otherwise there is 1 bit stop |
| [in] | vcp_data_bits_size | it is a data bits size |
| long wiicom_libvcp_read | ( | t_wiicom_libvcp_handle | fd, |
| uint8_t * | buffer, | ||
| uint32_t | buffer_size | ||
| ) |
Function that read data from a VCP handle.
| [in] | fd | VCP handle |
| [out] | buffer | buffer in which datas are loaded |
| [in] | buffer_size | size of the buffer containing the data read |
| long wiicom_libvcp_write | ( | t_wiicom_libvcp_handle | fd, |
| uint8_t * | buffer, | ||
| uint32_t | buffer_size | ||
| ) |
Function that write data to a VCP handle.
| [in] | fd | VCP handle |
| [in] | buffer | it contains data to send |
| [in] | buffer_size | size of the buffer to send |
| long wiicom_libvcp_write_string | ( | t_wiicom_libvcp_handle | fd, |
| char * | string_to_write | ||
| ) |
Function that write a string to a VCP handle.
| [in] | fd | VCP handle |
| [in] | string_to_write | it contains a string to send |
| struct termios attributes |
| int vcp_handle |