ccNOos  v0.0.0
Build Portable Microcontroller Applications!
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==PSoC4
51 #include <Platform_PSoC4.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
66 #endif
67 
68 
69 
70 ///////////////////////////////////////////////////////////////////////
71 // SysTick Example
72 ///////////////////////////////////////////////////////////////////////
73 // 1) Minute LED Device Write
75 {
76  //<writeMinLEDdevice>
77  LED_Min_Write(MODdataPTR(Mn)->MinLEDvalue);
78  //</writeMinLEDdevice>
79 }
80 // 2) Second LED Device Write
82 {
83  //<writeSecLEDdevice>
84  LED_Sec_Write(MODdataPTR(Mn)->SecLEDvalue);
85  //</writeSecLEDdevice>
86 }
87 // 3) Serial Device Write
89 {
90  //<writeSerialdevice>
91  UART_PutString(MODdataPTR(Mn)->time);
92  //</writeSerialdevice>
93 }
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 ///////////////////////////////////////////////////////////////////////
104 // Application Data Instances are Created here (Platform Specific)
105 #ifdef __cplusplus
106 theApplicationClass theApplicationExample;
107 #else
109 #endif
110 
111 ////////////////////////////////////////////////////////////////////////////////
112 // Platform Main Entry Points call ExeSys Area Functions
113 #ifdef MAIN_C_NOos_Wsystick
115 #endif
116 #ifdef MAIN_C_NOos_NOsystick
118 #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)
Platform_PSoC4.h
IMS: ccNOos, Platform Specification, PSoC4