get Function

cabl_int.h

int (*get) (uint8_t *data);

Parameters

data
a byte to receive.
Return value
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 and an error code is returned. 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. Error codes are listed in h.


Return to the API index