| 1032 | /*-----------------------------------------------------------*/ |
| 1033 | |
| 1034 | BaseType_t xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) |
| 1035 | { |
| 1036 | BaseType_t xReturn; |
| 1037 | size_t xBytesToStoreMessageLength; |
| 1038 | const StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; |
| 1039 | |
| 1040 | configASSERT( pxStreamBuffer ); |
| 1041 | |
| 1042 | /* This generic version of the receive function is used by both message |
| 1043 | * buffers, which store discrete messages, and stream buffers, which store a |
| 1044 | * continuous stream of bytes. Discrete messages include an additional |
| 1045 | * sbBYTES_TO_STORE_MESSAGE_LENGTH bytes that hold the length of the message. */ |
| 1046 | if( ( pxStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) != ( uint8_t ) 0 ) |
| 1047 | { |
| 1048 | xBytesToStoreMessageLength = sbBYTES_TO_STORE_MESSAGE_LENGTH; |
| 1049 | } |
| 1050 | else |
| 1051 | { |
| 1052 | xBytesToStoreMessageLength = 0; |
| 1053 | } |
| 1054 | |
| 1055 | /* True if the available space equals zero. */ |
| 1056 | if( xStreamBufferSpacesAvailable( xStreamBuffer ) <= xBytesToStoreMessageLength ) |
| 1057 | { |
| 1058 | xReturn = pdTRUE; |
| 1059 | } |
| 1060 | else |
| 1061 | { |
| 1062 | xReturn = pdFALSE; |
| 1063 | } |
| 1064 | |
| 1065 | return xReturn; |
| 1066 | } |
| 1067 | /*-----------------------------------------------------------*/ |
| 1068 | |
| 1069 | BaseType_t xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer, |
no test coverage detected