SWCU192 November 2021 CC1312R7 , CC1352P7 , CC2652P7 , CC2652R7
The procedure takes the following input parameters:
The procedure returns the following:
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
Return with no space error
else
Set pQueue->pCurrEntry->status = Busy
Set pEntry = pQueue->pCurrEntry
end if
else
Set pTemp = pQueue->pCurrEntry
If pTemp->nextIndex + 2 + size > pTemp->length then
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
end if
Set pTemp->status = Busy
Set pEntry = pTemp
end if