Data Queue Usage
23.4.1.4 PROC_ALLOCATE_RX: Allocate RX Buffer for Storing Data
•
Pointer to queue, pQueue
•
Size of entry element to store, size
The procedure returns the following:
•
Pointer to data entry where data is stored, pEntry
•
Pointer to a finished data entry, or NULL if not finished; pFinishedEntry
The procedure returns with error if the first entry of the queue is already busy. If there is not room for an
entry element of the specified size, including if the queue is empty, a "no space" error is returned. The
following procedure describes the operations:
Set pFinishedEntry == NULL
If pQueue->pCurrEntry == NULL then
Return with no space error
end if
If pQueue->pCurrEntry->type != 1 then
if pQueue->pCurrEntry->length < size then
else
end if
else
Set pTemp = pQueue->pCurrEntry
If pTemp->nextIndex + 2 + size > pTemp->length then
end if
Set pTemp->status = Busy
Set pEntry = pTemp
end if
1518
Radio
Return with no space error
Set pQueue->pCurrEntry->status = Busy
Set pEntry = pQueue->pCurrEntry
Set pQueue->pCurrEntry = pTemp->pNextEntry
Set pTemp->status = Finished
Set pFinishedEntry = pTemp
Set pTemp = pTemp->pNextEntry
If pTemp == NULL or pTemp->length < size + 2 then
Return with no space error
end if
Copyright © 2015, Texas Instruments Incorporated
SWCU117C – February 2015 – Revised September 2015
Submit Documentation Feedback
www.ti.com