Skip to content

Commit 1b013da

Browse files
authored
Merge pull request #295 from vanvught/development
Resolves #186, Resolves #291 , Resolves #287 , Resolves #288 , Resolves #292 , Resolves #293 , Resolves #294
2 parents 7a83cc4 + b986354 commit 1b013da

File tree

534 files changed

+7174
-5748
lines changed

Some content is hidden

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

534 files changed

+7174
-5748
lines changed

firmware-template-h3/memmap

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
MEMORY
22
{
3-
ram : ORIGIN = 0x40000000, LENGTH = 16M
3+
SRAMA1 : ORIGIN = 0x00000000, LENGTH = 64K
4+
SRAMA2 : ORIGIN = 0x00044000, LENGTH = 32K
5+
ram : ORIGIN = 0x40000000, LENGTH = 16M
46
}
57

68
__ram_start = ORIGIN(ram);
@@ -21,6 +23,20 @@ __svc_cpus_stack_size = 0x10000;
2123

2224
SECTIONS
2325
{
26+
.srama1 :
27+
{
28+
. = ALIGN(4);
29+
*(.srama1)
30+
*(.srama1*)
31+
} >SRAMA1
32+
33+
.srama2 :
34+
{
35+
. = ALIGN(4);
36+
*(.srama2)
37+
*(.srama2*)
38+
} >SRAMA2
39+
2440
.init :
2541
{
2642
. = ALIGN(4);

firmware-template/libs.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ ifeq ($(findstring E131_CONTROLLER,$(DEFINES)),E131_CONTROLLER)
3333
endif
3434
endif
3535

36-
ifeq ($(findstring NODE_SHOWFILE,$(DEFINES)),NODE_SHOWFILE)
37-
LIBS+=showfile osc
38-
endif
39-
4036
ifeq ($(findstring NODE_LTC_SMPTE,$(DEFINES)),NODE_LTC_SMPTE)
4137
LIBS+=ltc tcnet midi input osc ws28xxdisplay ws28xx rgbpanel gps
4238
endif
@@ -63,6 +59,10 @@ ifeq ($(findstring ARTNET_CONTROLLER,$(DEFINES)),ARTNET_CONTROLLER)
6359
endif
6460
endif
6561

62+
ifeq ($(findstring NODE_SHOWFILE,$(DEFINES)),NODE_SHOWFILE)
63+
LIBS+=showfile osc
64+
endif
65+
6666
ifeq ($(findstring RDM_CONTROLLER,$(DEFINES)),RDM_CONTROLLER)
6767
RDM=1
6868
DMX=1

include/net/if.h

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @file if.h
33
*
44
*/
5-
/* Copyright (C) 2020 by Arjan van Vught mailto:info@orangepi-dmx.nl
5+
/* Copyright (C) 2020-2024 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,13 +23,21 @@
2323
* THE SOFTWARE.
2424
*/
2525

26-
#ifndef IF_H_
27-
#define IF_H_
26+
#ifndef NET_IF_H_
27+
#define NET_IF_H_
2828

29-
#define IF_NAMESIZE 16
29+
/**
30+
* https://pubs.opengroup.org/onlinepubs/009695399/basedefs/net/if.h.html
31+
*
32+
* The <net/if.h> header shall define the following symbolic constant for the length of a buffer containing
33+
* an interface name (including the terminating NULL character):
34+
* IF_NAMESIZE Interface name length.
35+
*/
36+
37+
#define IF_NAMESIZE 16 ///< Length of interface name (including the terminating NULL character).
3038

3139
#ifndef IFNAMSIZ
32-
#define IFNAMSIZ IF_NAMESIZE
40+
# define IFNAMSIZ IF_NAMESIZE
3341
#endif
3442

35-
#endif /* IF_H_ */
43+
#endif /* NET_IF_H_ */

include/string.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,6 @@ inline int strncasecmp(const char *s1, const char *s2, size_t n) {
189189
return 0;
190190
}
191191

192-
inline char *strcat(char *s1, const char *s2) {
193-
strcpy(s1 + strlen(s1), s2);
194-
return s1;
195-
}
196-
197192
inline char *strchr(const char *p, int ch) {
198193
char c = (char) ch;
199194

lib-arm/.settings/language.settings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
66
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
77
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
8-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868968903555373684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
8+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868850457862413684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
99
<language-scope id="org.eclipse.cdt.core.gcc"/>
1010
<language-scope id="org.eclipse.cdt.core.g++"/>
1111
</provider>
@@ -17,7 +17,7 @@
1717
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
1818
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
1919
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
20-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1924002177239169812" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
20+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1924120622932129812" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
2121
<language-scope id="org.eclipse.cdt.core.gcc"/>
2222
<language-scope id="org.eclipse.cdt.core.g++"/>
2323
</provider>

lib-artnet/.cproject

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@
374374
<listOptionValue builtIn="false" value="LIGHTSET_PORTS=4"/>
375375
<listOptionValue builtIn="false" value="ARTNET_HAVE_TIMECODE"/>
376376
<listOptionValue builtIn="false" value="OUTPUT_HAVE_STYLESWITCH"/>
377+
<listOptionValue builtIn="false" value="ARTNET_HAVE_TRIGGER"/>
377378
</option>
378379
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.653222067" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" valueType="includePath"/>
379380
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1115950689" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
@@ -393,6 +394,7 @@
393394
<listOptionValue builtIn="false" value="LIGHTSET_PORTS=4"/>
394395
<listOptionValue builtIn="false" value="ARTNET_HAVE_TIMECODE"/>
395396
<listOptionValue builtIn="false" value="OUTPUT_HAVE_STYLESWITCH"/>
397+
<listOptionValue builtIn="false" value="ARTNET_HAVE_TRIGGER"/>
396398
</option>
397399
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.510275320" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath"/>
398400
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.2134415444" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
@@ -412,6 +414,7 @@
412414
<listOptionValue builtIn="false" value="LIGHTSET_PORTS=4"/>
413415
<listOptionValue builtIn="false" value="ARTNET_HAVE_TIMECODE"/>
414416
<listOptionValue builtIn="false" value="OUTPUT_HAVE_STYLESWITCH"/>
417+
<listOptionValue builtIn="false" value="ARTNET_HAVE_TRIGGER"/>
415418
</option>
416419
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.1645629639" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
417420
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>

lib-artnet/.settings/language.settings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
66
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
77
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="([^/\\\\]*)((g?cc)|([gc]\+\+)|(clang))" prefer-non-shared="true"/>
8-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868968903555373684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
8+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868850457862413684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
99
<language-scope id="org.eclipse.cdt.core.gcc"/>
1010
<language-scope id="org.eclipse.cdt.core.g++"/>
1111
</provider>
@@ -17,7 +17,7 @@
1717
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
1818
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
1919
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
20-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868968903555373684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
20+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868850457862413684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
2121
<language-scope id="org.eclipse.cdt.core.gcc"/>
2222
<language-scope id="org.eclipse.cdt.core.g++"/>
2323
</provider>
@@ -26,7 +26,7 @@
2626
</configuration>
2727
<configuration id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.309283989.303033930.1702909156.1968016134.361802700" name="H3">
2828
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
29-
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="true" env-hash="1360993027267989977" 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">
29+
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="true" env-hash="1362671244237841593" 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">
3030
<language-scope id="org.eclipse.cdt.core.gcc"/>
3131
<language-scope id="org.eclipse.cdt.core.g++"/>
3232
</provider>

lib-artnet/include/artnetcontroller.h

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
* @file artnetcontroller.h
33
*
44
*/
5-
/**
6-
* Art-Net Designed by and Copyright Artistic Licence Holdings Ltd.
7-
*/
8-
/* Copyright (C) 2017-2024 by Arjan van Vught mailto:[email protected]
5+
/* Copyright (C) 2017-2024 by Arjan van Vught mailto:[email protected]
96
*
107
* Permission is hereby granted, free of charge, to any person obtaining a copy
118
* of this software and associated documentation files (the "Software"), to deal
@@ -113,16 +110,14 @@ class ArtNetController: public ArtNetPollTable {
113110
}
114111
#endif
115112

116-
// Handler
117-
void SetArtNetTrigger(ArtNetTrigger *pArtNetTrigger) {
118-
m_pArtNetTrigger = pArtNetTrigger;
119-
}
120-
ArtNetTrigger *GetArtNetTrigger() const {
121-
return m_pArtNetTrigger;
122-
}
123-
124113
const uint8_t *GetSoftwareVersion();
125114

115+
#if defined (ARTNET_HAVE_TRIGGER)
116+
void SetArtTriggerCallbackFunctionPtr(ArtTriggerCallbackFunctionPtr artTriggerCallbackFunctionPtr) {
117+
m_ArtTriggerCallbackFunctionPtr = artTriggerCallbackFunctionPtr;
118+
}
119+
#endif
120+
126121
static ArtNetController *Get() {
127122
return s_pThis;
128123
}
@@ -153,7 +148,8 @@ class ArtNetController: public ArtNetPollTable {
153148

154149
artnet::ArtDmx *m_pArtDmx;
155150
artnet::ArtSync *m_pArtSync;
156-
ArtNetTrigger *m_pArtNetTrigger { nullptr }; // Trigger handler
151+
152+
ArtTriggerCallbackFunctionPtr m_ArtTriggerCallbackFunctionPtr { nullptr };
157153

158154
bool m_bSynchronization { true };
159155
bool m_bUnicast { true };

lib-artnet/include/artnetnode.h

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,6 @@
6868
# include "e131bridge.h"
6969
#endif
7070

71-
#if defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)
72-
# if !defined(ARTNET_DISABLE_DMX_CONFIG_UDP)
73-
# include "dmxconfigudp.h"
74-
# endif
75-
#endif
76-
7771
#include "lightset.h"
7872
#include "hardware.h"
7973
#include "network.h"
@@ -451,18 +445,20 @@ class ArtNetNode {
451445
Network::Get()->SendTo(m_nHandle, &m_ArtTimeCode, sizeof(struct artnet::ArtTimeCode), m_Node.IPAddressTimeCode, artnet::UDP_PORT);
452446
}
453447

454-
void SetTimeCodeHandler(ArtNetTimeCode *pArtNetTimeCode) {
455-
m_pArtNetTimeCode = pArtNetTimeCode;
448+
void SetArtTimeCodeCallbackFunction(ArtTimeCodeCallbackFunctionPtr artTimeCodeCallbackFunctionPtr) {
449+
m_ArtTimeCodeCallbackFunctionPtr = artTimeCodeCallbackFunctionPtr;
456450
}
457451

458452
void SetTimeCodeIp(const uint32_t nDestinationIp) {
459453
m_Node.IPAddressTimeCode = nDestinationIp;
460454
}
461455
#endif
462456

463-
void SetArtNetTrigger(ArtNetTrigger *pArtNetTrigger) {
464-
m_pArtNetTrigger = pArtNetTrigger;
457+
#if defined (ARTNET_HAVE_TRIGGER)
458+
void SetArtTriggerCallbackFunctionPtr(ArtTriggerCallbackFunctionPtr artTriggerCallbackFunctionPtr) {
459+
m_ArtTriggerCallbackFunctionPtr = artTriggerCallbackFunctionPtr;
465460
}
461+
#endif
466462

467463
void SetDestinationIp(const uint32_t nPortIndex, const uint32_t nDestinationIp) {
468464
if (nPortIndex < artnetnode::MAX_PORTS) {
@@ -694,8 +690,8 @@ class ArtNetNode {
694690

695691
LightSet *m_pLightSet { nullptr };
696692

697-
ArtNetTimeCode *m_pArtNetTimeCode { nullptr };
698-
ArtNetTrigger *m_pArtNetTrigger { nullptr };
693+
ArtTimeCodeCallbackFunctionPtr m_ArtTimeCodeCallbackFunctionPtr { nullptr };
694+
ArtTriggerCallbackFunctionPtr m_ArtTriggerCallbackFunctionPtr { nullptr };
699695

700696
artnetnode::Node m_Node;
701697
artnetnode::State m_State;
@@ -726,9 +722,6 @@ class ArtNetNode {
726722
#if defined (ARTNET_ENABLE_SENDDIAG)
727723
artnet::ArtDiagData m_DiagData;
728724
#endif
729-
#if defined (DMXCONFIGUDP_H_)
730-
DmxConfigUdp m_DmxConfigUdp;
731-
#endif
732725

733726
static inline ArtNetNode *s_pThis;
734727
};

lib-artnet/include/artnetrdmresponder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ArtNetRdmResponder final: public RDMDeviceResponder, RDMHandler {
5353
DEBUG_EXIT
5454
}
5555

56-
~ArtNetRdmResponder() {
56+
~ArtNetRdmResponder() override {
5757
DEBUG_ENTRY
5858
DEBUG_EXIT
5959
}

0 commit comments

Comments
 (0)