Lines Matching refs:xItemSize
48 typedef BaseType_t (*CheckItemFitsFunction_t)(Ringbuffer_t *pxRingbuffer, size_t xItemSize);
49 …ef void (*CopyItemFunction_t)(Ringbuffer_t *pxRingbuffer, const uint8_t *pcItem, size_t xItemSize);
133 static BaseType_t prvCheckItemFitsDefault( Ringbuffer_t *pxRingbuffer, size_t xItemSize);
136 static BaseType_t prvCheckItemFitsByteBuffer( Ringbuffer_t *pxRingbuffer, size_t xItemSize);
147 static void prvCopyItemNoSplit(Ringbuffer_t *pxRingbuffer, const uint8_t *pucItem, size_t xItemSize…
158 …c void prvCopyItemAllowSplit(Ringbuffer_t *pxRingbuffer, const uint8_t *pucItem, size_t xItemSize);
161 static void prvCopyItemByteBuf(Ringbuffer_t *pxRingbuffer, const uint8_t *pucItem, size_t xItemSize…
296 static BaseType_t prvCheckItemFitsDefault( Ringbuffer_t *pxRingbuffer, size_t xItemSize) in prvCheckItemFitsDefault() argument
302 …size_t xTotalItemSize = rbALIGN_SIZE(xItemSize) + rbHEADER_SIZE; //Rounded up aligned item size… in prvCheckItemFitsDefault()
324 static BaseType_t prvCheckItemFitsByteBuffer( Ringbuffer_t *pxRingbuffer, size_t xItemSize) in prvCheckItemFitsByteBuffer() argument
335 return (xItemSize <= pxRingbuffer->pucFree - pxRingbuffer->pucAcquire) ? pdTRUE : pdFALSE; in prvCheckItemFitsByteBuffer()
338 …return (xItemSize <= pxRingbuffer->xSize - (pxRingbuffer->pucAcquire - pxRingbuffer->pucFree)) ? p… in prvCheckItemFitsByteBuffer()
341 static uint8_t* prvAcquireItemNoSplit(Ringbuffer_t *pxRingbuffer, size_t xItemSize) in prvAcquireItemNoSplit() argument
344 … size_t xAlignedItemSize = rbALIGN_SIZE(xItemSize); //Rounded up aligned item size in prvAcquireItemNoSplit()
360 pxHeader->xItemLen = xItemSize; in prvAcquireItemNoSplit()
425 static void prvCopyItemNoSplit(Ringbuffer_t *pxRingbuffer, const uint8_t *pucItem, size_t xItemSize) in prvCopyItemNoSplit() argument
427 uint8_t* item_addr = prvAcquireItemNoSplit(pxRingbuffer, xItemSize); in prvCopyItemNoSplit()
428 memcpy(item_addr, pucItem, xItemSize); in prvCopyItemNoSplit()
432 …ic void prvCopyItemAllowSplit(Ringbuffer_t *pxRingbuffer, const uint8_t *pucItem, size_t xItemSize) in prvCopyItemAllowSplit() argument
435 … size_t xAlignedItemSize = rbALIGN_SIZE(xItemSize); //Rounded up aligned item size in prvCopyItemAllowSplit()
454 xItemSize -= xRemLen; in prvCopyItemAllowSplit()
466 pxSecondHeader->xItemLen = xItemSize; in prvCopyItemAllowSplit()
469 memcpy(pxRingbuffer->pucAcquire, pucItem, xItemSize); in prvCopyItemAllowSplit()
487 static void prvCopyItemByteBuf(Ringbuffer_t *pxRingbuffer, const uint8_t *pucItem, size_t xItemSize) in prvCopyItemByteBuf() argument
493 if (xRemLen < xItemSize) { in prvCopyItemByteBuf()
499 xItemSize -= xRemLen; in prvCopyItemByteBuf()
503 memcpy(pxRingbuffer->pucAcquire, pucItem, xItemSize); in prvCopyItemByteBuf()
504 pxRingbuffer->xItemsWaiting += xItemSize; in prvCopyItemByteBuf()
505 pxRingbuffer->pucAcquire += xItemSize; in prvCopyItemByteBuf()
916 RingbufHandle_t xRingbufferCreateNoSplit(size_t xItemSize, size_t xItemNum) in xRingbufferCreateNoSplit() argument
918 …return xRingbufferCreate((rbALIGN_SIZE(xItemSize) + rbHEADER_SIZE) * xItemNum, RINGBUF_TYPE_NOSPLI… in xRingbufferCreateNoSplit()
945 BaseType_t xRingbufferSendAcquire(RingbufHandle_t xRingbuffer, void **ppvItem, size_t xItemSize, Ti… in xRingbufferSendAcquire() argument
950 configASSERT(ppvItem != NULL || xItemSize == 0); in xRingbufferSendAcquire()
955 if (xItemSize > pxRingbuffer->xMaxItemSize) { in xRingbufferSendAcquire()
958 if ((pxRingbuffer->uxRingbufferFlags & rbBYTE_BUFFER_FLAG) && xItemSize == 0) { in xRingbufferSendAcquire()
976 if(pxRingbuffer->xCheckItemFits(pxRingbuffer, xItemSize) == pdTRUE) { in xRingbufferSendAcquire()
978 *ppvItem = prvAcquireItemNoSplit(pxRingbuffer, xItemSize); in xRingbufferSendAcquire()
1022 size_t xItemSize, in xRingbufferSend() argument
1028 configASSERT(pvItem != NULL || xItemSize == 0); in xRingbufferSend()
1029 if (xItemSize > pxRingbuffer->xMaxItemSize) { in xRingbufferSend()
1032 if ((pxRingbuffer->uxRingbufferFlags & rbBYTE_BUFFER_FLAG) && xItemSize == 0) { in xRingbufferSend()
1049 if(pxRingbuffer->xCheckItemFits(pxRingbuffer, xItemSize) == pdTRUE) { in xRingbufferSend()
1051 pxRingbuffer->vCopyItem(pxRingbuffer, pvItem, xItemSize); in xRingbufferSend()
1083 size_t xItemSize, in xRingbufferSendFromISR() argument
1089 configASSERT(pvItem != NULL || xItemSize == 0); in xRingbufferSendFromISR()
1090 if (xItemSize > pxRingbuffer->xMaxItemSize) { in xRingbufferSendFromISR()
1093 if ((pxRingbuffer->uxRingbufferFlags & rbBYTE_BUFFER_FLAG) && xItemSize == 0) { in xRingbufferSendFromISR()
1101 if (pxRingbuffer->xCheckItemFits(xRingbuffer, xItemSize) == pdTRUE) { in xRingbufferSendFromISR()
1102 pxRingbuffer->vCopyItem(xRingbuffer, pvItem, xItemSize); in xRingbufferSendFromISR()