mirror of
git://sigrok.org/libserialport
synced 2023-08-10 21:13:24 +03:00
Clarify documentation for sp_read() and sp_write().
This commit is contained in:
parent
0161932884
commit
25ab82f6c0
12
README
12
README
@ -164,26 +164,30 @@ Reading, writing and flushing data
|
|||||||
|
|
||||||
int sp_read(struct sp_port *port, const void *buf, size_t count)
|
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:
|
Parameters:
|
||||||
|
|
||||||
port: Pointer to port structure.
|
port: Pointer to port structure.
|
||||||
buf: Buffer in which to store the bytes read.
|
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,
|
Returns: The number of bytes read, SP_ERR_FAIL on failure,
|
||||||
or SP_ERR_ARG for invalid arguments.
|
or SP_ERR_ARG for invalid arguments.
|
||||||
|
|
||||||
int sp_write(struct sp_port *port, const void *buf, size_t count)
|
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:
|
Parameters:
|
||||||
|
|
||||||
port: Pointer to port structure.
|
port: Pointer to port structure.
|
||||||
buf: Buffer containing the bytes to write.
|
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,
|
Returns: The number of bytes written, SP_ERR_FAIL on failure,
|
||||||
or SP_ERR_ARG for invalid arguments.
|
or SP_ERR_ARG for invalid arguments.
|
||||||
|
Loading…
Reference in New Issue
Block a user