You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Ring buffer
1
+
# **Ring buffer**
2
2
This module constains ring buffer implementation for general purpose usage.
3
3
It can work with simple byte size item or larger size items. Module is
4
4
written in such a way that all details are hidden from user. Additionally
@@ -13,13 +13,13 @@ Additionally buffers data storage can be allocated statically if dynamic
13
13
allocation is not perfered by application. Look at the example of
14
14
static allocation of memory.
15
15
16
-
There are two distinct get functions: "ring_buffer_get" and "ring_buffer_get_by_index".
16
+
There are two distinct get functions: *"ring_buffer_get"* and *"ring_buffer_get_by_index"*.
17
17
First one returns oldest item in buffer and acts as a FIFO, meaning that tail increments
18
-
at every call of it. On the other side "ring_buffer_get_by_index" returns value relative
18
+
at every call of it. On the other side *"ring_buffer_get_by_index"* returns value relative
19
19
to input argument value and does not increment tail pointer! It is important not to
20
20
use those two get functionalities simultaniously.
21
21
22
-
Function "ring_buffer_get_by_index" supports two kind of access types:
22
+
Function *"ring_buffer_get_by_index"* supports two kind of access types:
23
23
24
24
1.**NORMAL ACCESS: classical aproach**, where index is a positive
25
25
number and simple represants buffer index. This approach
@@ -37,18 +37,24 @@ Function "ring_buffer_get_by_index" supports two kind of access types:
37
37
38
38
39
39
40
-
## Dependencies
40
+
## **Dependencies**
41
41
42
42
This module needs only ANSI C standard libraries.
43
43
44
-
## Multientry Limitations
44
+
## **General Embedded C Libraries Ecosystem**
45
+
In order to be part of *General Embedded C Libraries Ecosystem* this module must be placed in following path:
46
+
```
47
+
root/middleware/ring_buffer/"module_space"
48
+
```
49
+
50
+
## **Multientry Limitations**
45
51
46
52
Guidance for multi-entry usage:
47
53
-**It is recomented to use ring_buffer between two task/interrupts/cores in provider/consumer manner.** Meaning one task/interrupt/core is writing to ring_buffer and other task/interrupt/core is reading from it.
48
54
-**It is not recommended for two or more task/interrupt/core to read/write to same ring_buffer instance!**
49
55
50
56
51
-
## API
57
+
## **API**
52
58
53
59
| API Functions | Description | Prototype |
54
60
| --- | ----------- | ----- |
@@ -67,9 +73,9 @@ Guidance for multi-entry usage:
67
73
68
74
NOTE: Detailed description of functions can be found in doxygen (doc/**ring_buffer_Vx_x_x.zip**)!
0 commit comments