Radio Control Layer (RCL)
|
These functions are meant mostly to be used by handlers and RCL itself
Functions | |
RCL_MultiBuffer * | RCL_MultiBuffer_findFirstWritableBuffer (RCL_MultiBuffer *head) |
Find the first writable buffer in a list of MultiBuffers. More... | |
RCL_MultiBuffer * | RCL_MultiBuffer_getBuffer (RCL_MultiBuffer *curBuffer, uint32_t minLength) |
Returns a buffer with at least minLength bytes remaining capacity. More... | |
uint32_t | RCL_MultiBuffer_findAvailableRxSpace (const RCL_MultiBuffer *curBuffer) |
Find the minumum number of bytes that can be stored in available MultiBuffers. More... | |
static uint8_t * | RCL_MultiBuffer_getNextWritableByte (RCL_MultiBuffer *curBuffer) |
Find the first byte to write in an RCL_MultiBuffer. More... | |
static void | RCL_MultiBuffer_commitBytes (RCL_MultiBuffer *curBuffer, uint32_t numBytes) |
Update number of bytes written to RCL_MultiBuffer. More... | |
RCL_MultiBuffer* RCL_MultiBuffer_findFirstWritableBuffer | ( | RCL_MultiBuffer * | head | ) |
Find the first writable buffer in a list of MultiBuffers.
head | [in] - The head of the list |
References RCL_BufferStateFinished.
Referenced by RCL_Handler_BLE5_updateRxCurBufferAndFifo(), RCL_Handler_Generic_updateRxCurBufferAndFifo(), RCL_Handler_Ieee_updateRxCurBufferAndFifo(), and RCL_MultiBuffer_get().
RCL_MultiBuffer* RCL_MultiBuffer_getBuffer | ( | RCL_MultiBuffer * | curBuffer, |
uint32_t | minLength | ||
) |
Returns a buffer with at least minLength
bytes remaining capacity.
Checks current buffer and next buffer against minLength, returns current if enough space, otherwise moves to next buffer.
If no such buffer is available, NULL is returned.
curBuffer | [in] - Buffer to search from |
minLength | [in] - Minimum amount of bytes needed in buffer |
References RCL_BufferStateFinished, and RCL_BufferStateInUse.
Referenced by RCL_Handler_BLE5_adv(), RCL_Handler_BLE5_aux_adv(), RCL_Handler_BLE5_conn(), RCL_Handler_BLE5_genericRx(), RCL_Handler_BLE5_scan_init(), RCL_Handler_Generic_Rx(), RCL_Handler_Ieee_RxTx(), RCL_Handler_Nesb_Prx(), RCL_Handler_Nesb_Ptx(), and RCL_MultiBuffer_get().
uint32_t RCL_MultiBuffer_findAvailableRxSpace | ( | const RCL_MultiBuffer * | curBuffer | ) |
Find the minumum number of bytes that can be stored in available MultiBuffers.
Finds the number of bytes that can be guaranteed to be possible to store in available MultiBuffers, regardless of packet sizes. This is the size of a free MultiBuffer if that is available, or the remaining space in a MultiBuffer.
curBuffer | [in] - Pointer to the first writable RCL_MultiBuffer |
References RCL_BufferStateInUse.
Referenced by RCL_Handler_BLE5_updateRxCurBufferAndFifo(), RCL_Handler_Generic_updateRxCurBufferAndFifo(), RCL_Handler_Ieee_updateRxCurBufferAndFifo(), and RCL_MultiBuffer_get().
|
inlinestatic |
Find the first byte to write in an RCL_MultiBuffer.
curBuffer | [in] - Pointer to RCL_MultiBuffer |
Referenced by RCL_Handler_BLE5_adv(), RCL_Handler_BLE5_aux_adv(), RCL_Handler_BLE5_commitPacket(), RCL_Handler_BLE5_conn(), RCL_Handler_BLE5_genericRx(), RCL_Handler_BLE5_scan_init(), RCL_Handler_Generic_Rx(), RCL_Handler_Ieee_RxTx(), RCL_Handler_Nesb_Prx(), RCL_Handler_Nesb_Ptx(), and RCL_MultiBuffer_get().
|
inlinestatic |
Update number of bytes written to RCL_MultiBuffer.
curBuffer | [in] - Pointer to RCL_MultiBuffer |
numBytes | [in] - Number of bytes that have been written |
Referenced by RCL_Handler_BLE5_commitPacket(), RCL_Handler_Generic_Rx(), RCL_Handler_Ieee_RxTx(), RCL_Handler_Nesb_Prx(), RCL_Handler_Nesb_Ptx(), and RCL_MultiBuffer_get().