Download Network Enabler SDK 2 API Reference

Transcript
Network Enabler SDK 2 API Reference
API List
Overview
This chapter presents a broad overview of every function call, grouped by category and function
type. Please refer to Chapter 3 for detailed descriptions of each function.
For each library category, there is a specific header file that needs to be included in the source code
when calling functions within that category. Please refer to the example source code for details of
how to include a header file.
Serial I/O API
The header file sdksio.h must be included in your source code when calling serial I/O functions.
Port Control
Port control functions are used to open serial ports, set communication parameters, and control
signal lines.
Function Name
sio_baud
sio_close
sio_DTR
sio_flowctrl
sio_flush
sio_ioctl
sio_lctrl
sio_open
sio_RTS
Description
set baud rate using the actual speed value
stop receiving/transmitting data
set DTR state
set port hardware or software flow control
flush input or output buffer
set port baud rate, parity, etc.
set DTR and RTS states
start receiving/transmitting data
set RTS state
Data Input
Data input functions are used to read data from the COM port.
Function Name
sio_AbortRead
sio_getch
sio_GetReadTimeouts
sio_linput
sio_read
sio_SetReadTimeouts
Description
abort when reading a block of data for sio_read()
read one character at a time from driver's input buffer
get timeouts for sio_read()
read a block of data ending with a termination character
read a block of data from the driver's input buffer
set timeouts for sio_read
Data Output
Data output functions are used to write data to the serial port.
Function Name
sio_AbortWrite
sio_GetWriteTimeouts
sio_putch
sio_SetWriteTimeouts
sio_write
Description
abort when writing a block of data for sio_write()
get timeouts for sio_write()
write one character at a time to driver's output buffer
set timeouts for sio_write()
write a block of data (usually only a partial block) to output buffer
2-2