Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Tiny Queue
Tiny Queues implements a 4 byte queue for iPhone events with just 1 byte of management overhead. More...
Data Structures | |
struct | tinyQ_t |
a tinyQ tracks a 4 byte queue with just 1 byte overhead More... | |
Functions | |
int | Qpush (tinyQ_t *q, char c) |
Push an Accessibility Event onto our queue for sending to the iphone. | |
int | Qpop (tinyQ_t *q, char *c) |
Pop an Accessibility Event off our queue for sending to the iphone. | |
Variables | |
unsigned int | tail:8 |
the bit depth MUST be that power of 2 that is the Q_SIZE | |
unsigned int | fill:9 |
Must be 1 bit bigger than the head and tail pointers. | |
char | data [Q_SIZE] |
NOTE: Q_SIZE MUST be == 2 ^ widthof( tinyQ_t.head ) |
Detailed Description
Tiny Queues implements a 4 byte queue for iPhone events with just 1 byte of management overhead.
Head and Tail pointers both inherently wrap at the end of the buffer and no bounds checking is necesary IFF the buffer size is set as a power of 2 equal to the width of the pointers !! i.e head is 2 bits wide so the buffer must be 2^2 = 4 bytes deep.
Function Documentation
int Qpop | ( | tinyQ_t * | q, |
char * | c | ||
) |
int Qpush | ( | tinyQ_t * | q, |
char | c | ||
) |
Variable Documentation
char data[Q_SIZE] [inherited] |
NOTE: Q_SIZE MUST be == 2 ^ widthof( tinyQ_t.head )
unsigned int fill [inherited] |
Generated on Tue Jul 12 2022 23:42:02 by
