xRingbufferReceiveUpToFromISR() function
Retrieve bytes from a byte buffer, specifying the maximum amount of bytes to retrieve. Call this from an ISR. Attempt to retrieve bytes from a byte buffer whilst specifying a maximum number of bytes to retrieve. This function will return immediately if there is no data available for retrieval.
Arguments
xRingbuffer
Ring buffer to retrieve the item from
pxItemSize
Pointer to a variable to which the size of the retrieved item will be written.
xMaxSize
Maximum number of bytes to return. Size of 0 simply returns NULL.
Return value
- Pointer to the retrieved item on success; *pxItemSize filled with the length of the item. - NULL when the ring buffer is empty, *pxItemSize is untouched in that case.
Notes
A call to vRingbufferReturnItemFromISR() is required after this to free up the data received. This function should only be called on byte buffers Byte buffers do not allow multiple retrievals before returning an item
xRingbufferReceiveUpToFromISR() is called by 5 functions and calls 2 functions:
![]()
xRingbufferReceiveUpToFromISR()
xRingbufferReceiveUpToFromISR() reads 1 variable:
![]()
xRingbufferReceiveUpToFromISR()