queue02

queue02 - fifo queue (number 01 is the template)

Author Joep Suijs, Copyright © 2009, all rights reserved.
Adapted-by
Compiler >=2.4i

Description

this library provides a (one) byte fifo queue. 
This queue is interrupt-safe in the sense that you can write to the queue from the interrupt and
read from the main program or vice versa without special precautions.
Reading (or writing) from both interrupt and main program might not work properly.



The basic interface is pseudo var:
queue02 = x -- put x into queue; block if queue is full
x = queue02 -- read x from queue; block if queue is empty



non-blocking access to the same queue is provided by
queue02_nb_put()
and
queue02_nb_get()



other methods:
queue02_clear()    -- clear queue (makes queue empty)
queue02_empty()    -- returns true if queue is emtpy (depricated, use queue1_is_empty())
queue02_is_empty() -- returns true if queue is emtpy 
queue02_is_full()  -- returns true if queue is full
queue02_nr_free()  -- returns nr of free places in queue
queue02_nr_used()  -- returns nr of used places in queue


Dependencies

No dependency found



Summary

Global variables/contants

Procedures

Functions


API details

Global variables/contants

Procedures

Functions


Related samples

Here are the list of samples which use this library:

16f87716f877_slip_poll.jal
16f87716f877_slip_isr.jal
16f877a16f877a_slip_poll.jal
16f877a16f877a_slip_isr.jal
18f452518f4525_slip_isr.jal
18f452518f4525_slip_poll.jal
18f455018f4550_slip_poll.jal
18f455018f4550_slip_isr.jal
18f455018f4550_slip_poll_usb.jal
18f462018f4620_slip_isr.jal
18f462018f4620_slip_poll.jal
18f462018f4620_network_slip_isr_ping_udp.jal
18f46k2218f46k22_slip_poll.jal
18f46k2218f46k22_slip_isr.jal
18f67j5018f67j50_slip_isr.jal
18f67j5018f67j50_slip_poll.jal
18f67j5018f67j50_slip_poll_usb.jal