##### Synopsis

    #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);

##### Description

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.

##### Restrictions

This function should not be called from an interrupt service routine.

##### Portability

ctl_byte_queue_receive is provided in every implementation of the CrossWorks tasking library.

##### See Also

Byte queues