#include <ctl_api.h> unsigned ctl_byte_queue_receive(CTL_BYTE_QUEUE_t *m, unsigned char *byte, CTL_TIMEOUT_t timeoutType, CTL_TIME_t timeout);
The function ctl_byte_queue_receive pops the oldest byte in the byte queue pointed at by m into the memory pointed at by byte. This function will block if no bytes are available unless timeoutType is non-zero and the current time reaches the timeout value. If the timeout occured the function returns zero otherwise it will return one.
This function should not be called from an interrupt service routine.
ctl_byte_queue_receive is provided in every implementation of the CrossWorks tasking library.