ccNOos
v0.0.0
Build Portable Microcontroller Applications!
tests
testMainFiles
SysTick
QtCreatorC
Application_Platform_Main.c
Go to the documentation of this file.
1
/** \file WIN32_Console.cpp
2
* \brief WIN32 Console Implementation of ccNOos_Tests in c++
3
4
Copyright 2021 InMechaSol, Inc
5
6
Licensed under the Apache License, Version 2.0 (the "License");
7
you may not use this file except in compliance with the License.
8
You may obtain a copy of the License at
9
10
http://www.apache.org/licenses/LICENSE-2.0
11
12
Unless required by applicable law or agreed to in writing, software
13
distributed under the License is distributed on an "AS IS" BASIS,
14
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
See the License for the specific language governing permissions and
16
limitations under the License.
17
18
Notes:
19
20
*/
21
22
// Include all things ccNOos_tests, which is an application of ccNOos
23
// ccNOos_tests is the application solution
24
#include "..\..\..\testApps\SysTick\PlatformApp_Serialization.h"
25
26
27
////////////////////////////////
28
// Compile Error if Examples/Tests not defining
29
#ifndef Mn
30
#error Mn must be defined - see examples
31
#endif
32
#ifndef MODdeclareCREATEINS
33
#error MODdeclareCREATEINS must be defined - see examples
34
#endif
35
#ifndef MODcallCREATEINS
36
#error MODcallCREATEINS must be defined - see examples
37
#endif
38
#ifdef __cplusplus
39
#ifndef PLATFORM_APP_CLASS
40
#error PLATFORM_APP_CLASS macro must be defined in application code
41
#endif
42
#else
43
#ifndef MODdeclareDATA
44
#error MODdeclareDATA macro must be defined in application code
45
#endif
46
#endif
47
48
////////////////////////////////
49
// Compile Error if Examples/Tests not defining
50
#if PLATFORM_NAME==QTCreatorC
51
#include "../../../testPlatforms/Platform_QTCreatorC.h"
52
#else
53
#error "No Platform Selected for Compile!"
54
#endif
55
56
57
///////////////////////////////////////////////////////////////////////
58
// Module Data Structure or Module Data Class
59
// -Declared from Macro Template
60
// -Macro Template is Defined in the Application Solution Header
61
///////////////////////////////////////////////////////////////////////
62
#ifdef __cplusplus
63
PLATFORM_APP_CLASS(
Mn
);
64
#else
65
MODdeclareDATA
(
Mn
);
66
#endif
67
68
69
70
///////////////////////////////////////////////////////////////////////
71
// SysTick Example
72
///////////////////////////////////////////////////////////////////////
73
// 1) Minute LED Device Write
74
void
WriteMinLED
(
MODdeclarePTRIN
(
Mn
)) { ; }
75
// 2) Second LED Device Write
76
void
WriteSecLED
(
MODdeclarePTRIN
(
Mn
)) { ; }
77
// 3) Serial Device Write
78
void
WriteTimeSerial
(
MODdeclarePTRIN
(
Mn
))
79
{
80
printf(
"%s"
,
MODdataPTR
(
Mn
)->time);
81
fflush(stdout);
82
}
83
84
85
86
87
88
89
90
91
92
///////////////////////////////////////////////////////////////////////
93
// Application Data Instances are Created here (Platform Specific)
94
#ifdef __cplusplus
95
theApplicationClass theApplicationExample;
96
#else
97
PLATFORM_APP_CTEMPLATE
(
Mn
)
98
#endif
99
100
////////////////////////////////////////////////////////////////////////////////
101
// Platform Main Entry Points call ExeSys Area Functions
102
#ifdef MAIN_C_NOos_Wsystick
103
C_NOos_MAINnSYSTICK_TEMPLATE
104
#endif
105
#ifdef MAIN_C_NOos_NOsystick
106
C_OS_MAIN_TEMPLATE
107
#endif
PLATFORM_APP_CTEMPLATE
#define PLATFORM_APP_CTEMPLATE(MODNAME)
Definition:
Application_Solution.h:117
WriteSecLED
void WriteSecLED(MODdeclarePTRIN(Mn))
Definition:
Application_Platform_Main.c:77
MODdeclarePTRIN
#define MODdeclarePTRIN(mNAME)
Definition:
version_config.h:284
Mn
#define Mn
Definition:
Application_Solution.h:32
WriteTimeSerial
void WriteTimeSerial(MODdeclarePTRIN(Mn))
Definition:
Application_Platform_Main.c:79
WriteMinLED
void WriteMinLED(MODdeclarePTRIN(Mn))
Definition:
Application_Platform_Main.c:75
C_NOos_MAINnSYSTICK_TEMPLATE
#define C_NOos_MAINnSYSTICK_TEMPLATE
Definition:
version_config.h:353
MODdataPTR
#define MODdataPTR(mNAME)
Definition:
version_config.h:244
C_OS_MAIN_TEMPLATE
#define C_OS_MAIN_TEMPLATE
Definition:
version_config.h:383
MODdeclareDATA
MODdeclareDATA(Mn)
Generated by
1.8.20