PortableSerialLib  v0.2
a portable serial port lib
Functions
Serial Port Data Transmit Functions

This functions transmit data.

Functions

PSL_ErrorCodes_e PSerLib_putc (PSerLibHandle_t io_port, char c)
 outputs the given character to the port
PSL_ErrorCodes_e PSerLib_puts (PSerLibHandle_t io_port, const char *i_str)
 outputs the given string to the port
PSL_ErrorCodes_e PSerLib_writeBinaryData (PSerLibHandle_t io_port, const uint8_t *i_data, int i_dataLen, int *o_bytesWritten)
 outputs the given data to the port

Function Documentation

PSL_ErrorCodes_e PSerLib_putc ( PSerLibHandle_t  io_port,
char  c 
)

outputs the given character to the port

Parameters:
io_porthandle of port to write to
ccharacter to send
Returns:
PSL_ERROR_none if successful else another error code
PSL_ErrorCodes_e PSerLib_puts ( PSerLibHandle_t  io_port,
const char *  i_str 
)

outputs the given string to the port

Parameters:
io_porthandle of port to write to
i_strnull terminated string
Returns:
PSL_ERROR_none if successful else another error code
PSL_ErrorCodes_e PSerLib_writeBinaryData ( PSerLibHandle_t  io_port,
const uint8_t *  i_data,
int  i_dataLen,
int *  o_bytesWritten 
)

outputs the given data to the port

Parameters:
io_porthandle of port to write to
i_datapointer to data to output
i_dataLennumber of bytes to read from data pointer
o_bytesWrittennumber of bytes actual written (May differ because of time out or error)
Can be NULL if not required.
Remarks:
Sending/receiving of binary data may be incompatible with connections that base on XON/XOFF flow control because XON/XOFF are special bytes. If you use XON/XOFF flow control then ensure that these bytes cannot appear in i_data else your communication may screw up.
Returns:
PSL_ERROR_none if successful else another error code