get Function

cabl_int.h

int (*get) (@uint8_t@ *data);

Parameters

data
the byte to receive.
Returns
0 if successful, an error code otherwise.


Summary

Wait for a byte arrival.

Description

The function attempts to receive a byte. It's blocking but it the time is over the timeout value, the function returns with an error code. Timeout value can be changed at any time with the @ticable_set_timeout@ function. When function returns, it typically returns:
- either ERR_READ_ERROR : system error,
- either ERR_READ_TIMEOUT : timed out.

See also

Error codes are listed in cabl_err.h. The @TicableLinkCable@ structure.


Return to the API index