Skip to content

Commit 719f80b

Browse files
committed
Clarify return value documentation in serial interface headers
- Updated return value descriptions in multiple serial interface header files to specify that negative error codes are derived from ::cpp_core::StatusCodes. This change enhances clarity and consistency in the documentation. These updates improve the understanding of function outcomes across the serial API.
1 parent 9ff2e5a commit 719f80b

17 files changed

+18
-17
lines changed

include/cpp_core/interface/serial_abort_read.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extern "C"
1616
*
1717
* @param handle Port handle.
1818
* @param error_callback [optional] Callback to invoke on error. Defined in error_callback.h. Default is `nullptr`.
19-
* @return 0 on success or a negative error code on failure.
19+
* @return 0 on success or a negative error code from ::cpp_core::StatusCodes on error.
2020
*/
2121
MODULE_API auto serialAbortRead(
2222
int64_t handle,

include/cpp_core/interface/serial_abort_write.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extern "C"
1616
*
1717
* @param handle Port handle.
1818
* @param error_callback [optional] Callback to invoke on error. Defined in error_callback.h. Default is `nullptr`.
19-
* @return 0 on success or a negative error code on failure.
19+
* @return 0 on success or a negative error code from ::cpp_core::StatusCodes on error.
2020
*/
2121
MODULE_API auto serialAbortWrite(
2222
int64_t handle,

include/cpp_core/interface/serial_clear_buffer_in.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extern "C"
1616
*
1717
* @param handle Port handle.
1818
* @param error_callback [optional] Callback to invoke on error. Defined in error_callback.h. Default is `nullptr`.
19-
* @return 0 on success or a negative error code on failure.
19+
* @return 0 on success or a negative error code from ::cpp_core::StatusCodes on error.
2020
*/
2121
MODULE_API auto serialClearBufferIn(
2222
int64_t handle,

include/cpp_core/interface/serial_clear_buffer_out.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extern "C"
1616
*
1717
* @param handle Port handle.
1818
* @param error_callback [optional] Callback to invoke on error. Defined in error_callback.h. Default is `nullptr`.
19-
* @return 0 on success or a negative error code on failure.
19+
* @return 0 on success or a negative error code from ::cpp_core::StatusCodes on error.
2020
*/
2121
MODULE_API auto serialClearBufferOut(
2222
int64_t handle,

include/cpp_core/interface/serial_close.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extern "C"
1616
*
1717
* @param handle Handle obtained from serialOpen().
1818
* @param error_callback [optional] Callback to invoke on error. Defined in error_callback.h. Default is `nullptr`.
19-
* @return 0 on success or a negative error code on failure.
19+
* @return 0 on success or a negative error code from ::cpp_core::StatusCodes on error.
2020
*/
2121
MODULE_API auto serialClose(
2222
int64_t handle,

include/cpp_core/interface/serial_drain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern "C"
2929
*
3030
* @param handle Port handle.
3131
* @param error_callback [optional] Callback to invoke on error. Defined in error_callback.h. Default is `nullptr`.
32-
* @return 0 on success or a negative error code on failure.
32+
* @return 0 on success or a negative error code from ::cpp_core::StatusCodes on error.
3333
*/
3434
MODULE_API auto serialDrain(
3535
int64_t handle,

include/cpp_core/interface/serial_get_ports_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern "C"
1515
*
1616
* @param callback_fn Callback receiving port information.
1717
* @param error_callback [optional] Callback to invoke on error. Defined in error_callback.h. Default is `nullptr`.
18-
* @return Number of ports found or a negative error code.
18+
* @return Number of ports found or a negative error code from ::cpp_core::StatusCodes on error.
1919
*/
2020
MODULE_API auto serialGetPortsInfo(
2121
void (*callback_fn)(

include/cpp_core/interface/serial_in_bytes_total.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extern "C"
1313
*
1414
* @param handle Port handle.
1515
* @param error_callback [optional] Callback to invoke on error. Defined in error_callback.h. Default is `nullptr`.
16-
* @return Total number of bytes read or a negative error code.
16+
* @return Total number of bytes read or a negative error code from ::cpp_core::StatusCodes on error.
1717
*/
1818
MODULE_API auto serialInBytesTotal(
1919
int64_t handle,

include/cpp_core/interface/serial_in_bytes_waiting.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ extern "C"
2424
*
2525
* @param handle Port handle.
2626
* @param error_callback [optional] Callback to invoke on error. Defined in error_callback.h. Default is `nullptr`.
27-
* @return Bytes available for instant reading or a negative error code.
27+
* @return Bytes available for instant reading or a negative error code from ::cpp_core::StatusCodes on error.
2828
*/
2929
MODULE_API auto serialInBytesWaiting(
3030
int64_t handle,

include/cpp_core/interface/serial_open.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extern "C"
2323
* @param parity 0 = none, 1 = even, 2 = odd.
2424
* @param stop_bits 0 = 1 stop bit, 2 = 2 stop bits.
2525
* @param error_callback [optional] Callback to invoke on error. Defined in error_callback.h. Default is `nullptr`.
26-
* @return A positive opaque handle on success or a negative value on failure.
26+
* @return A positive opaque handle on success or a negative value from ::cpp_core::StatusCodes on failure.
2727
*/
2828
MODULE_API auto serialOpen(
2929
void *port,

0 commit comments

Comments
 (0)