Skip to content

Commit 0403ffe

Browse files
committed
Initial version
1 parent 430f903 commit 0403ffe

File tree

2,433 files changed

+714901
-0
lines changed

Some content is hidden

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

2,433 files changed

+714901
-0
lines changed

_clean.bat

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
3+
del *.bak /S
4+
cd source
5+
call _clean.bat
6+
cd ..
7+
cd webpage
8+
call _clean.bat
9+
cd ..

changelog.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
TinyELCA ChangeLog
3+
4+
= Version 1.00 / 1.00, 26.08.2021
5+
* First version for GitHub.

source/.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Ignore files by file types
3+
#
4+
**/*.bak
5+
6+
#
7+
# Some more specific rules
8+
#
9+
build/
10+
CodeWright/
11+
lint/
12+
prj/RAM Debug/
13+
prj/RAM Release/

source/_clean.bat

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
del *.bak /S
2+
del build\*.* /Q
3+
rmdir "prj\RAM Debug" /S /Q
4+
rmdir "prj\RAM Release" /S /Q
5+
del prj\*.jlink
6+

source/_create_fw.bat

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
@echo off
2+
cls
3+
4+
::
5+
:: Project name
6+
::
7+
set PRJ_NAME=tinyelca_fw
8+
set ORG_NAME=tiny-elca
9+
10+
:: ------------------------------------
11+
12+
::
13+
:: Delete files which does not needed anymore
14+
::
15+
mkdir build >NUL 2>&1
16+
del build\*.* /Q >NUL 2>&1
17+
18+
::
19+
:: Copy output file and create new image file
20+
::
21+
copy "prj\RAM Release\%ORG_NAME%.bin" .\build >NUL 2>&1
22+
.\common\tools\xbin -i:.\build\%ORG_NAME%.bin -o:.\build\fw.bin -v:.\incprj\project.h
23+
24+
::
25+
:: Rename image files to "project" files
26+
::
27+
copy .\build\fw.bin .\build\fw1.bin >NUL 2>&1
28+
copy .\build\fw.bin .\build\fw2.bin >NUL 2>&1
29+
copy .\build\fw.bin .\build\firmware.bin >NUL 2>&1
30+
move .\build\fw.bin .\build\%PRJ_NAME%.bin >NUL 2>&1
31+
32+
::
33+
:: Add version info to the filenames
34+
::
35+
.\common\tools\xname -o:.\build\%PRJ_NAME%.bin -v:.\incprj\project.h
36+
del .\build\%ORG_NAME%.bin >NUL 2>&1
37+
38+
echo.
39+
rem pause

source/common/inc/cert.h

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/**************************************************************************
2+
* Copyright (c) 2020 by Michael Fischer (www.emb4fun.de).
3+
* All rights reserved.
4+
*
5+
* Redistribution and use in source and binary forms, with or without
6+
* modification, are permitted provided that the following conditions
7+
* are met:
8+
*
9+
* 1. Redistributions of source code must retain the above copyright
10+
* notice, this list of conditions and the following disclaimer.
11+
*
12+
* 2. Redistributions in binary form must reproduce the above copyright
13+
* notice, this list of conditions and the following disclaimer in the
14+
* documentation and/or other materials provided with the distribution.
15+
*
16+
* 3. Neither the name of the author nor the names of its contributors may
17+
* be used to endorse or promote products derived from this software
18+
* without specific prior written permission.
19+
*
20+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
24+
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27+
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30+
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31+
* SUCH DAMAGE.
32+
*
33+
***************************************************************************
34+
* History:
35+
*
36+
* 05.03.2020 mifi First Version.
37+
**************************************************************************/
38+
#if !defined(__CERT_H__)
39+
#define __CERT_H__
40+
41+
/**************************************************************************
42+
* Includes
43+
**************************************************************************/
44+
#include <stdint.h>
45+
46+
/**************************************************************************
47+
* Global Definitions
48+
**************************************************************************/
49+
50+
/**************************************************************************
51+
* Macro Definitions
52+
**************************************************************************/
53+
54+
/**************************************************************************
55+
* Functions Definitions
56+
**************************************************************************/
57+
58+
void cert_Init (void);
59+
60+
int cert_Get_DeviceKey(char **buf, size_t *buflen);
61+
int cert_Get_DeviceCert(char **buf, size_t *buflen);
62+
int cert_Get_IntermediateCert(char **buf, size_t *buflen);
63+
64+
#endif /* !__CERT_H__ */
65+
66+
/*** EOF ***/

source/common/inc/etc.h

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/**************************************************************************
2+
* Copyright (c) 2019 by Michael Fischer (www.emb4fun.de).
3+
* All rights reserved.
4+
*
5+
* Redistribution and use in source and binary forms, with or without
6+
* modification, are permitted provided that the following conditions
7+
* are met:
8+
*
9+
* 1. Redistributions of source code must retain the above copyright
10+
* notice, this list of conditions and the following disclaimer.
11+
*
12+
* 2. Redistributions in binary form must reproduce the above copyright
13+
* notice, this list of conditions and the following disclaimer in the
14+
* documentation and/or other materials provided with the distribution.
15+
*
16+
* 3. Neither the name of the author nor the names of its contributors may
17+
* be used to endorse or promote products derived from this software
18+
* without specific prior written permission.
19+
*
20+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
24+
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27+
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30+
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31+
* SUCH DAMAGE.
32+
*
33+
***************************************************************************
34+
* History:
35+
*
36+
* 31.05.2019 mifi First Version.
37+
**************************************************************************/
38+
#if !defined(__ETC_H__)
39+
#define __ETC_H__
40+
41+
/**************************************************************************
42+
* Includes
43+
**************************************************************************/
44+
#include <stdint.h>
45+
46+
/**************************************************************************
47+
* Global Definitions
48+
**************************************************************************/
49+
50+
typedef enum _etc_ip_addr_
51+
{
52+
ETC_IP_ADDR = 0,
53+
ETC_IP_MASK,
54+
ETC_IP_GW,
55+
ETC_IP_DNS,
56+
ETC_IP_DNS2,
57+
ETC_IP_NTP,
58+
ETC_IP_SYSLOG,
59+
60+
ETC_IP_MAX
61+
} ETC_IP_ADDRESS;
62+
63+
/**************************************************************************
64+
* Macro Definitions
65+
**************************************************************************/
66+
67+
/**************************************************************************
68+
* Functions Definitions
69+
**************************************************************************/
70+
71+
void etc_Init (void);
72+
73+
char *etc_ShortNameGet (void);
74+
char *etc_LongNameGet (void);
75+
char *etc_LocationGet (void);
76+
77+
int etc_IPDhcpIsUsed (void);
78+
int etc_IPTnpIsES (void);
79+
int etc_IPmDNSIsUsed (void);
80+
81+
uint32_t etc_IPAddrGet (ETC_IP_ADDRESS eAddress);
82+
83+
int etc_TimeZoneIDGet (void);
84+
int etc_TimeZoneOffsetGet (void);
85+
int etc_TimeZoneDstGet (void);
86+
uint32_t etc_TimeNTPAddrGet (void);
87+
uint32_t etc_TimeNTPRefresh (void);
88+
89+
#endif /* !__ETC_H__ */
90+
91+
/*** EOF ***/

0 commit comments

Comments
 (0)