Synopsis
unsigned ctl_byte_queue_receive(CTL_BYTE_QUEUE_t *q,
                                unsigned char *b,
                                CTL_TIMEOUT_t t,
                                CTL_TIME_t timeout);
Description

ctl_byte_queue_receive pops the oldest byte in the byte queue pointed to by q into the memory pointed to by b. ctl_byte_queue_receive will block if no bytes are available unless timeoutType is non-zero and the current time reaches the timeout value.

ctl_byte_queue_receive returns zero if a timeout occurs otherwise 1.

Note

ctl_byte_queue_receive must not be called from an interrupt service routine.