Skip to content

Commit 695cd91

Browse files
committed
Merge remote-tracking branch 'origin/release/v2.0.0'
2 parents b233b5c + b7d88a5 commit 695cd91

26 files changed

+241
-209
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Generic ring buffer manager
1+
# Lightweight ring buffer manager
22

33
Library provides generic FIFO ring buffer implementation.
44

5-
<h3>Read first: <a href="http://docs.majerle.eu/projects/ringbuff/">Documentation</a></h3>
5+
<h3>Read first: <a href="http://docs.majerle.eu/projects/lwrb/">Documentation</a></h3>
66

77
## Features
88

dev/VisualStudio/ringbuff_dev.sln renamed to dev/VisualStudio/lwrb_dev.sln

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.28803.452
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ringbuff_dev", "ringbuff_dev.vcxproj", "{65B0BF4D-8CA6-48F2-8B0B-6BFD456AA57B}"
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwrb_dev", "lwrb_dev.vcxproj", "{65B0BF4D-8CA6-48F2-8B0B-6BFD456AA57B}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,8 +13,8 @@ Global
1313
Release|x86 = Release|x86
1414
EndGlobalSection
1515
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16-
{65B0BF4D-8CA6-48F2-8B0B-6BFD456AA57B}.Debug|x64.ActiveCfg = Debug|Win32
17-
{65B0BF4D-8CA6-48F2-8B0B-6BFD456AA57B}.Debug|x64.Build.0 = Debug|Win32
16+
{65B0BF4D-8CA6-48F2-8B0B-6BFD456AA57B}.Debug|x64.ActiveCfg = Debug|x64
17+
{65B0BF4D-8CA6-48F2-8B0B-6BFD456AA57B}.Debug|x64.Build.0 = Debug|x64
1818
{65B0BF4D-8CA6-48F2-8B0B-6BFD456AA57B}.Debug|x86.ActiveCfg = Debug|Win32
1919
{65B0BF4D-8CA6-48F2-8B0B-6BFD456AA57B}.Debug|x86.Build.0 = Debug|Win32
2020
{65B0BF4D-8CA6-48F2-8B0B-6BFD456AA57B}.Release|x64.ActiveCfg = Release|x64

dev/VisualStudio/ringbuff_dev.vcxproj renamed to dev/VisualStudio/lwrb_dev.vcxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<VCProjectVersion>15.0</VCProjectVersion>
2323
<ProjectGuid>{65B0BF4D-8CA6-48F2-8B0B-6BFD456AA57B}</ProjectGuid>
2424
<Keyword>Win32Proj</Keyword>
25-
<RootNamespace>ringbuff_dev</RootNamespace>
25+
<RootNamespace>lwrb_dev</RootNamespace>
2626
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
2727
</PropertyGroup>
2828
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -72,7 +72,7 @@
7272
<PropertyGroup Label="UserMacros" />
7373
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7474
<LinkIncremental>true</LinkIncremental>
75-
<IncludePath>..\..\ringbuff\src\include\;$(IncludePath)</IncludePath>
75+
<IncludePath>..\..\lwrb\src\include\;$(IncludePath)</IncludePath>
7676
</PropertyGroup>
7777
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
7878
<LinkIncremental>true</LinkIncremental>
@@ -143,7 +143,7 @@
143143
<Text Include="ReadMe.txt" />
144144
</ItemGroup>
145145
<ItemGroup>
146-
<ClCompile Include="..\..\ringbuff\src\ringbuff\ringbuff.c" />
146+
<ClCompile Include="..\..\lwrb\src\lwrb\lwrb.c" />
147147
<ClCompile Include="main.c" />
148148
</ItemGroup>
149149
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

dev/VisualStudio/ringbuff_dev.vcxproj.filters renamed to dev/VisualStudio/lwrb_dev.vcxproj.filters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<ClCompile Include="main.c">
2222
<Filter>Source Files</Filter>
2323
</ClCompile>
24-
<ClCompile Include="..\..\ringbuff\src\ringbuff\ringbuff.c">
24+
<ClCompile Include="..\..\lwrb\src\lwrb\lwrb.c">
2525
<Filter>Source Files</Filter>
2626
</ClCompile>
2727
</ItemGroup>

dev/VisualStudio/main.c

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
// ringbuff_dev.cpp : Defines the entry point for the console application.
1+
// lwrb_dev.cpp : Defines the entry point for the console application.
22
//
33

44
#include <stdio.h>
55
#include <string.h>
6-
#include "ringbuff/ringbuff.h"
6+
#include "lwrb/lwrb.h"
77

88
/* Create data array and buffer */
9-
uint8_t ringbuff_data[8 + 1];
10-
ringbuff_t buff;
9+
uint8_t lwrb_data[8 + 1];
10+
lwrb_t buff;
1111

1212
static void debug_buff(uint8_t cmp, size_t r_w, size_t r_r, size_t r_f, size_t r_e);
1313

1414
uint8_t tmp[8];
1515

1616
void
17-
my_buff_evt_fn(ringbuff_t* buff, ringbuff_evt_type_t type, size_t len) {
17+
my_buff_evt_fn(lwrb_t* buff, lwrb_evt_type_t type, size_t len) {
1818
switch (type) {
19-
case RINGBUFF_EVT_RESET:
19+
case LWRB_EVT_RESET:
2020
printf("[EVT] Buffer reset event!\r\n");
2121
break;
22-
case RINGBUFF_EVT_READ:
22+
case LWRB_EVT_READ:
2323
printf("[EVT] Buffer read event: %d byte(s)!\r\n", (int)len);
2424
break;
25-
case RINGBUFF_EVT_WRITE:
25+
case LWRB_EVT_WRITE:
2626
printf("[EVT] Buffer write event: %d byte(s)!\r\n", (int)len);
2727
break;
2828
default: break;
@@ -34,38 +34,38 @@ main() {
3434
size_t len;
3535

3636
/* Init buffer */
37-
ringbuff_init(&buff, ringbuff_data, sizeof(ringbuff_data));
38-
ringbuff_set_evt_fn(&buff, my_buff_evt_fn);
37+
lwrb_init(&buff, lwrb_data, sizeof(lwrb_data));
38+
lwrb_set_evt_fn(&buff, my_buff_evt_fn);
3939

40-
ringbuff_write(&buff, "abc", 3);
41-
ringbuff_write(&buff, "abc", 3);
42-
ringbuff_write(&buff, "abc", 3);
43-
len = ringbuff_read(&buff, tmp, 9);
40+
lwrb_write(&buff, "abc", 3);
41+
lwrb_write(&buff, "abc", 3);
42+
lwrb_write(&buff, "abc", 3);
43+
len = lwrb_read(&buff, tmp, 9);
4444

4545
buff.r = 0;
4646
buff.w = 0;
47-
memset(ringbuff_get_linear_block_write_address(&buff), 'A', ringbuff_get_linear_block_write_length(&buff));
48-
ringbuff_advance(&buff, ringbuff_get_linear_block_write_length(&buff));
47+
memset(lwrb_get_linear_block_write_address(&buff), 'A', lwrb_get_linear_block_write_length(&buff));
48+
lwrb_advance(&buff, lwrb_get_linear_block_write_length(&buff));
4949

5050
buff.r = 2;
5151
buff.w = 0;
52-
memset(ringbuff_get_linear_block_write_address(&buff), 'B', ringbuff_get_linear_block_write_length(&buff));
53-
ringbuff_advance(&buff, ringbuff_get_linear_block_write_length(&buff));
52+
memset(lwrb_get_linear_block_write_address(&buff), 'B', lwrb_get_linear_block_write_length(&buff));
53+
lwrb_advance(&buff, lwrb_get_linear_block_write_length(&buff));
5454

5555
buff.r = 3;
5656
buff.w = 3;
57-
memset(ringbuff_get_linear_block_write_address(&buff), 'C', ringbuff_get_linear_block_write_length(&buff));
58-
ringbuff_advance(&buff, ringbuff_get_linear_block_write_length(&buff));
57+
memset(lwrb_get_linear_block_write_address(&buff), 'C', lwrb_get_linear_block_write_length(&buff));
58+
lwrb_advance(&buff, lwrb_get_linear_block_write_length(&buff));
5959

60-
ringbuff_reset(&buff);
60+
lwrb_reset(&buff);
6161

62-
//for (size_t r = 0; r < sizeof(ringbuff_data); ++r) {
62+
//for (size_t r = 0; r < sizeof(lwrb_data); ++r) {
6363
// void* ptr;
64-
// for (size_t w = 0; w < sizeof(ringbuff_data); ++w) {
64+
// for (size_t w = 0; w < sizeof(lwrb_data); ++w) {
6565
// buff.r = r;
6666
// buff.w = w;
67-
// ptr = ringbuff_get_linear_block_write_address(&buff);
68-
// len = ringbuff_get_linear_block_write_length(&buff);
67+
// ptr = lwrb_get_linear_block_write_address(&buff);
68+
// len = lwrb_get_linear_block_write_length(&buff);
6969
// printf("W: %3d, R: %3d, LEN: %3d\r\n", (int)w, (int)r, (int)len);
7070
// }
7171
//}
@@ -81,8 +81,8 @@ debug_buff(uint8_t cmp, size_t r_w, size_t r_r, size_t r_f, size_t r_e) {
8181

8282
r = buff.r;
8383
w = buff.w;
84-
f = ringbuff_get_full(&buff);
85-
e = ringbuff_get_free(&buff);
84+
f = lwrb_get_full(&buff);
85+
e = lwrb_get_free(&buff);
8686

8787
printf("R: %3d, W: %3d, F: %3d, E: %3d\r\n", (int)r, (int)w, (int)f, (int)e);
8888
}

docs/api-reference/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ List of all the modules:
88
.. toctree::
99
:maxdepth: 2
1010

11-
ringbuff
11+
lwrb

docs/api-reference/lwrb.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _api_lwrb:
2+
3+
LwRB
4+
====
5+
6+
.. doxygengroup:: LWRB

docs/api-reference/ringbuff.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/conf.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
subprocess.call('doxygen doxyfile.doxy', shell=True)
2323
# -- Project information -----------------------------------------------------
2424

25-
project = 'Ringbuffer'
25+
project = 'LwRB'
2626
copyright = '2020, Tilen MAJERLE'
2727
author = 'Tilen MAJERLE'
2828

2929
# The full version, including alpha/beta/rc tags
30-
version = '1.3.1'
30+
version = '2.0.0'
3131

3232
# Try to get branch at which this is running
3333
# and try to determine which version to display in sphinx
@@ -100,8 +100,8 @@
100100
'titles_only': False
101101
}
102102
html_logo = 'static/images/logo.svg'
103-
github_url = 'https://github.com/MaJerle/ringbuff'
104-
html_baseurl = 'https://docs.majerle.eu/projects/ringbuff/'
103+
github_url = 'https://github.com/MaJerle/lwrb'
104+
html_baseurl = 'https://docs.majerle.eu/projects/lwrb/'
105105

106106
# Add any paths that contain custom static files (such as style sheets) here,
107107
# relative to this directory. They are copied after the builtin static files,
@@ -123,7 +123,7 @@
123123
#
124124
#
125125
breathe_projects = {
126-
"ringbuff": "_build/xml/"
126+
"lwrb": "_build/xml/"
127127
}
128-
breathe_default_project = "ringbuff"
128+
breathe_default_project = "lwrb"
129129
breathe_default_members = ('members', 'undoc-members')

docs/doxyfile.doxy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
3232
# title of most generated pages and in a few other places.
3333
# The default value is: My Project.
3434

35-
PROJECT_NAME = "Ring buffer"
35+
PROJECT_NAME = "LwRB"
3636

3737
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
3838
# could be handy for archiving the generated documentation or if some version
@@ -44,7 +44,7 @@ PROJECT_NUMBER = ""
4444
# for a project that appears at the top of each page and should give viewer a
4545
# quick idea about the purpose of the project. Keep the description short.
4646

47-
PROJECT_BRIEF = "Generic FIFO buffer"
47+
PROJECT_BRIEF = "Lightweight ring buffer manager"
4848

4949
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
5050
# in the documentation. The maximum height of the logo should not exceed 55
@@ -775,7 +775,7 @@ WARN_LOGFILE =
775775
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
776776
# Note: If this tag is empty the current directory is searched.
777777

778-
INPUT = "../ringbuff/"
778+
INPUT = "../lwrb/"
779779

780780
# This tag can be used to specify the character encoding of the source files
781781
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

0 commit comments

Comments
 (0)