|
TM STM32Fxxx HAL Libraries
v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle
|
Generic cyclic buffer library. More...
Modules | |
| TM_BUFFER_Macros | |
| Library defines. | |
| TM_BUFFER_Typedefs | |
| Library Typedefs. | |
| TM_BUFFER_Functions | |
| Library Functions. | |
Generic cyclic buffer library.
This buffer does not only feature basic read/write operations for cyclic buffers, it also has feature to read strings from buffer if needed.
Each string in buffer has separator character, in most cases, Line Feed (0x0A) is used, and is also default value when buffer is initialized. When reading as string from buffer, you have to know these things:
- Buffer will first check if string delimiter character exists in buffer.
- If it exists, characters will be set to user buffer until delimiter is detected.
- Delimiter is included in string!
- If string delimiter is not in buffer, but cyclic buffer full,
then string will be also filled into user buffer, because we need to free
some memory for future characters, including string delimiter character
- If user buffer size is less than number of characters in buffer before string delimiter is found,
string is also filled in user buffer
- In all other cases, if there is no string delimiter in buffer, buffer will not return anything and will check for it first.
Version 1.0 - First release Version 1.1 - September 03, 2015 - Added support for searching strings or custom arrays if exists in buffer Version 1.2 - October 25, 2015 - Parameter UseMalloc removed from TM_BUFFER_Init function. Version 1.3 - December 25, 2015 - Added option for writing strings to buffer - Write/Read is now interrupt safe Version 1.4 - February 18, 2016 - Added memory copy on buffer read/write operations for fastest speed
- STM32Fxxx HAL - defines.h