Skip to content

Commit f49b273

Browse files
committed
V2.2
Release Notes – Codebase Refactor & Modularization * Major project restructuring * Reorganized libraries and source files into a clearer, more modular directory structure. * Moved, renamed, or removed numerous files to reduce duplication and improve maintainability. * Legacy code cleanup * Removed deprecated and unused code from lib-lightset, lib-network, lib-properties, and older display components. * Eliminated redundant parameter and platform-specific files no longer in use. * Centralized common functionality * Migrated shared network, properties, and parameter code into a unified common directory. * Added new utility headers and source files for reusable functionality. * JSON-based configuration support * Added new JSON configuration and parameter files. * Introduced JSON helper utilities and parameter classes to standardize configuration handling and prepare for future extensibility. * DMX, RDM, and pixel refactor * Refactored DMX, RDM device handling, and pixel-related libraries for clearer structure and better separation of responsibilities. * Unified RDM device information handling. * Build system updates * Updated Makefiles, build scripts, and compile_commands.json to reflect the new project structure. * Improved GD32 platform support and hardware abstraction organization. * Network stack reorganization * Flattened lib-network source layout by moving files from subdirectories into a simpler structure. * Improved clarity of EMAC and Linux network interface implementations (no functional changes). * Debug macro consistency * Replaced DEBUG_ENTRY / DEBUG_EXIT macros with function-style DEBUG_ENTRY() / DEBUG_EXIT() across the codebase for consistency and readability. * Overall impact * Significantly improved modularity, readability, and long-term maintainability. * Laid groundwork for future feature expansion and more robust JSON-based configuration across modules.
1 parent 32431d9 commit f49b273

922 files changed

Lines changed: 73955 additions & 65762 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BasedOnStyle: Google
2+
IndentWidth: 4
3+
TabWidth: 4
4+
UseTab: Never
5+
ColumnLimit: 240
6+
7+
PointerAlignment: Left
8+
ReferenceAlignment: Left
9+
10+
AlignConsecutiveAssignments: false
11+
AlignConsecutiveDeclarations: false
12+
13+
AllowShortFunctionsOnASingleLine: Inline
14+
AllowShortIfStatementsOnASingleLine: true
15+
AllowShortLoopsOnASingleLine: true
16+
17+
BreakBeforeBraces: Allman
18+
19+
DerivePointerAlignment: false
20+
21+
SpacesBeforeTrailingComments: 1
22+
23+
SortIncludes: false
24+
IncludeBlocks: Preserve
25+
26+
Cpp11BracedListStyle: true
27+
28+
AlwaysBreakAfterReturnType: None
29+
AlwaysBreakTemplateDeclarations: MultiLine

.clang-tidy

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
Checks: >
2+
google-*,
3+
readability-identifier-naming,
4+
modernize-redundant-void-arg,
5+
modernize-concat-nested-namespaces,
6+
modernize-use-nullptr,
7+
modernize-use-default-member-init,
8+
modernize-use-override,
9+
-google-runtime-references,
10+
-clang-analyzer-*,
11+
-misc-unused-include
12+
13+
CheckOptions:
14+
- key: readability-identifier-naming.ClassCase
15+
value: CamelCase
16+
17+
- key: readability-identifier-naming.StructCase
18+
value: CamelCase
19+
20+
- key: readability-identifier-naming.FunctionCase
21+
value: CamelCase
22+
23+
- key: readability-identifier-naming.IgnoreMainLikeFunctions
24+
value: 'true'
25+
26+
- key: readability-identifier-naming.IgnoreOverrideFunctions
27+
value: 'true'
28+
29+
- key: readability-identifier-naming.FunctionIgnoredRegexp
30+
value: '^([A-Za-z0-9_]+_(IRQHandler|Handler))$'
31+
32+
- key: readability-identifier-naming.VariableCase
33+
value: lower_case
34+
35+
- key: readability-identifier-naming.ParameterCase
36+
value: lower_case
37+
38+
- key: readability-identifier-naming.PrivateMemberCase
39+
value: lower_case
40+
- key: readability-identifier-naming.PrivateMemberSuffix
41+
value: _
42+
43+
- key: readability-identifier-naming.PublicMemberCase
44+
value: lower_case
45+
46+
- key: readability-identifier-naming.ConstantCase
47+
value: CamelCase
48+
- key: readability-identifier-naming.ConstantPrefix
49+
value: k
50+
51+
- key: readability-identifier-naming.GlobalConstantCase
52+
value: CamelCase
53+
- key: readability-identifier-naming.GlobalConstantPrefix
54+
value: k
55+
56+
- key: readability-identifier-naming.LocalConstantCase
57+
value: CamelCase
58+
- key: readability-identifier-naming.LocalConstantPrefix
59+
value: k
60+
61+
- key: readability-identifier-naming.EnumCase
62+
value: CamelCase
63+
64+
- key: readability-identifier-naming.EnumConstantCase
65+
value: CamelCase
66+
- key: readability-identifier-naming.EnumConstantPrefix
67+
value: k
68+
69+
- key: readability-identifier-naming.EnumConstantMemberCase
70+
value: CamelCase
71+
- key: readability-identifier-naming.EnumConstantMemberPrefix
72+
value: k
73+
74+
- key: readability-identifier-naming.MacroDefinitionCase
75+
value: UPPER_CASE
76+
77+
- key: readability-identifier-naming.TreatAsConstant
78+
value: 'constexpr'
79+
80+
- key: readability-identifier-naming.VariableConstantCase
81+
value: CamelCase
82+
- key: readability-identifier-naming.VariableConstantPrefix
83+
value: k
84+
85+
WarningsAsErrors: ''
86+
HeaderFilterRegex: '.*'
87+
FormatStyle: none

.clangd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CompileFlags:
2+
CompilationDatabase: .
3+
4+
Diagnostics:
5+
ClangTidy:
6+
Add: []
7+

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,7 @@ gd32f3*.*
6464
lib-gd32/gd32f30x/*
6565
gd32fh*.*
6666
lib-gd32/gd32h7xx/*
67+
68+
*._*
69+
/.cache
70+
compile_commands.json

README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,11 @@ The ready to use firmware is build to use with the bootloader TFTP server -> [ht
2020
* Full Art-Net 4 implementation
2121
* Default firmware is using USART2 en USART5
2222

23-
### Art-Net 4 Pixel 8x 4 Universes
24-
* Full Art-Net 4 implementation
25-
* No FPS limitation, except for what there is with the pixel chip protocol
26-
2723
### sACN E1.31 DMX 1-4 ports
2824
* Full sACN E1.31 implementation
2925
* Default firmware is using USART2 en USART5
3026
* RDMNet LLRP Device only
3127

32-
### sACN E1.31 Pixel 8x 4 Universes
33-
* Full sACN E1.31 implementation
34-
* No FPS limitation, except for what there is with the pixel chip protocol
35-
* RDMNet LLRP Device only
36-
37-
## Remote Configuration Manager
38-
[https://github.com/vanvught/Remote-Config-UI/releases](https://github.com/vanvught/Remote-Config-UI/releases)<br>
39-
<img alt="GitHub release" src="https://img.shields.io/github/v/release/vanvught/Remote-Config-UI">
28+
## GD32 Firmware Update UI
29+
[https://github.com/vanvught/GD32F-Firmware-Update-UI/releases](https://github.com/vanvught/GD32F-Firmware-Update-UI/releases)<br>
30+
<img alt="GitHub release" src="https://img.shields.io/github/v/release/vanvught/GD32F-Firmware-Update-UI">

common/.cproject

Lines changed: 149 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<projectDescription>
3-
<name>lib-lightset</name>
4-
<comment></comment>
5-
<projects>
6-
</projects>
7-
<buildSpec>
8-
<buildCommand>
9-
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10-
<triggers>clean,full,incremental,</triggers>
11-
<arguments>
12-
</arguments>
13-
</buildCommand>
14-
<buildCommand>
15-
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
16-
<triggers>full,incremental,</triggers>
17-
<arguments>
18-
</arguments>
19-
</buildCommand>
20-
</buildSpec>
21-
<natures>
22-
<nature>org.eclipse.cdt.core.cnature</nature>
23-
<nature>org.eclipse.cdt.core.ccnature</nature>
24-
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
25-
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
26-
</natures>
27-
</projectDescription>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>common</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10+
<triggers>clean,full,incremental,</triggers>
11+
<arguments>
12+
</arguments>
13+
</buildCommand>
14+
<buildCommand>
15+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
16+
<triggers>full,incremental,</triggers>
17+
<arguments>
18+
</arguments>
19+
</buildCommand>
20+
</buildSpec>
21+
<natures>
22+
<nature>org.eclipse.cdt.core.cnature</nature>
23+
<nature>org.eclipse.cdt.core.ccnature</nature>
24+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
25+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
26+
</natures>
27+
</projectDescription>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<project>
3+
<configuration id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.306944287" name="Default">
4+
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
5+
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
6+
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
7+
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
8+
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1124212694268444622" id="org.eclipse.embedcdt.managedbuild.cross.arm.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Arm Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
9+
<language-scope id="org.eclipse.cdt.core.gcc"/>
10+
<language-scope id="org.eclipse.cdt.core.g++"/>
11+
</provider>
12+
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
13+
</extension>
14+
</configuration>
15+
</project>
File renamed without changes.
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
2-
* @file get_timer.cpp
2+
* @file utils_array.h
33
*
44
*/
5-
/* Copyright (C) 2018-2023 by Arjan van Vught mailto:info@orangepi-dmx.nl
5+
/* Copyright (C) 2025 by Arjan van Vught mailto:info@gd32-dmx.org
66
*
77
* Permission is hereby granted, free of charge, to any person obtaining a copy
88
* of this software and associated documentation files (the "Software"), to deal
@@ -23,14 +23,17 @@
2323
* THE SOFTWARE.
2424
*/
2525

26-
#include <cstdint>
27-
#include <cstddef>
28-
#include <time.h>
26+
#ifndef COMMON_UTILS_UTILS_ARRAY_H_
27+
#define COMMON_UTILS_UTILS_ARRAY_H_
2928

30-
uint32_t get_timer(uint32_t base) {
31-
if (0 == base) {
32-
return static_cast<uint32_t>(time(nullptr));
33-
}
29+
#include <cstddef>
3430

35-
return static_cast<uint32_t>(time(nullptr)) - base;
31+
namespace common
32+
{
33+
template <typename T, size_t N> constexpr size_t ArraySize(const T (&)[N]) noexcept
34+
{
35+
return N;
3636
}
37+
} // namespace common
38+
39+
#endif // COMMON_UTILS_UTILS_ARRAY_H_

0 commit comments

Comments
 (0)