Clarify documentation for sp_read() and sp_write().

This commit is contained in:
Martin Ling 2013-11-03 22:34:17 +00:00 committed by Uwe Hermann
parent 0161932884
commit 25ab82f6c0
1 changed files with 8 additions and 4 deletions

12
README
View File

@ -164,26 +164,30 @@ Reading, writing and flushing data
int sp_read(struct sp_port *port, const void *buf, size_t count)
Reads a number of bytes from the specified serial port.
Reads bytes from the specified serial port. Note that this function may
return after reading less than the specified number of bytes; it is the
user's responsibility to iterate as necessary in this case.
Parameters:
port: Pointer to port structure.
buf: Buffer in which to store the bytes read.
count: Number of bytes to read.
count: Maximum number of bytes to read.
Returns: The number of bytes read, SP_ERR_FAIL on failure,
or SP_ERR_ARG for invalid arguments.
int sp_write(struct sp_port *port, const void *buf, size_t count)
Writes a number of bytes to the specified serial port.
Write bytes to the specified serial port. Note that this function may
return after writing less than the specified number of bytes; it is the
user's responsibility to iterate as necessary in this case.
Parameters:
port: Pointer to port structure.
buf: Buffer containing the bytes to write.
count: Number of bytes to write.
count: Maximum number of bytes to write.
Returns: The number of bytes written, SP_ERR_FAIL on failure,
or SP_ERR_ARG for invalid arguments.