diff --git a/.cproject b/.cproject
index faeaf0c..61f053e 100644
--- a/.cproject
+++ b/.cproject
@@ -73,13 +73,12 @@
-
-
-
-
+
+
+
@@ -158,53 +160,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -343,7 +298,7 @@
-
+
@@ -479,55 +434,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index 0548b18..9a355c7 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/.settings/org.eclipse.cdt.codan.core.prefs b/.settings/org.eclipse.cdt.codan.core.prefs
new file mode 100644
index 0000000..47fa1c6
--- /dev/null
+++ b/.settings/org.eclipse.cdt.codan.core.prefs
@@ -0,0 +1,111 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.codan.checkers.errnoreturn=Warning
+org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return\\")",implicit\=>false}
+org.eclipse.cdt.codan.checkers.errreturnvalue=Error
+org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused return value\\")"}
+org.eclipse.cdt.codan.checkers.localvarreturn=-Warning
+org.eclipse.cdt.codan.checkers.localvarreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Returning the address of a local variable\\")"}
+org.eclipse.cdt.codan.checkers.nocommentinside=-Error
+org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Nesting comments\\")"}
+org.eclipse.cdt.codan.checkers.nolinecomment=-Error
+org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Line comments\\")"}
+org.eclipse.cdt.codan.checkers.noreturn=Error
+org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return value\\")",implicit\=>false}
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Abstract class cannot be instantiated\\")"}
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Ambiguous problem\\")"}
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment in condition\\")"}
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"}
+org.eclipse.cdt.codan.internal.checkers.BlacklistProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.BlacklistProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function or method is blacklisted\\")",blacklist\=>()}
+org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"C-Style cast instead of C++ cast\\")",checkMacro\=>true}
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No break at end of case\\")",no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false,enable_fallthrough_quickfix_param\=>false}
+org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
+org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Catching by reference is recommended\\")",unknown\=>false,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Circular inheritance\\")"}
+org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
+org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class members should be properly initialized\\")",skip\=>true}
+org.eclipse.cdt.codan.internal.checkers.CopyrightProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.CopyrightProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Lack of copyright information\\")",regex\=>".*Copyright.*"}
+org.eclipse.cdt.codan.internal.checkers.DecltypeAutoProblem=Error
+org.eclipse.cdt.codan.internal.checkers.DecltypeAutoProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid 'decltype(auto)' specifier\\")"}
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Field cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.FloatCompareProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.FloatCompareProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Direct float comparison\\")"}
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Goto statement used\\")"}
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid arguments\\")"}
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid template argument\\")"}
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Label statement not found\\")"}
+org.eclipse.cdt.codan.internal.checkers.MagicNumberProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.MagicNumberProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Avoid magic numbers\\")",checkArray\=>true,checkOperatorParen\=>true,exceptions\=>(1,0,-1,2,1.0,0.0,-1.0)}
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Member declaration not found\\")"}
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Method cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.MissCaseProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.MissCaseProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing cases in switch\\")"}
+org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing default in switch\\")",defaultWithAllEnums\=>false}
+org.eclipse.cdt.codan.internal.checkers.MissReferenceProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.MissReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing reference return value in assignment operator\\")"}
+org.eclipse.cdt.codan.internal.checkers.MissSelfCheckProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.MissSelfCheckProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing self check in assignment operator\\")"}
+org.eclipse.cdt.codan.internal.checkers.MultipleDeclarationsProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.MultipleDeclarationsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Multiple variable declaration\\")"}
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Name convention for function\\")",pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.NoDiscardProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.NoDiscardProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return value not evaluated\\")",macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class has a virtual method and non-virtual destructor\\")"}
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid overload\\")"}
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redeclaration\\")"}
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redefinition\\")"}
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return with parenthesis\\")"}
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Format String Vulnerability\\")"}
+org.eclipse.cdt.codan.internal.checkers.ShallowCopyProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ShallowCopyProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Miss copy constructor or assignment operator\\")",onlynew\=>false}
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Statement has no effect\\")",macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.StaticVariableInHeaderProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.StaticVariableInHeaderProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Static variable in header file\\")"}
+org.eclipse.cdt.codan.internal.checkers.StructuredBindingDeclarationProblem=Error
+org.eclipse.cdt.codan.internal.checkers.StructuredBindingDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid structured binding declaration\\")"}
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suggested parenthesis around expression\\")",paramNot\=>false}
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false}
+org.eclipse.cdt.codan.internal.checkers.SymbolShadowingProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.SymbolShadowingProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol shadowing\\")",paramFuncParameters\=>true}
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused function declaration\\")",macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused static function\\")",macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused variable declaration in file scope\\")",macro\=>true,exceptions\=>("@(\#)","$Id")}
+org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Using directive in header\\")"}
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol is not resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Virtual method call in constructor/destructor\\")"}
diff --git a/STM32F100_ParaTNC/makefile b/STM32F100_ParaTNC/makefile
index a53b6a5..f9ee3f0 100644
--- a/STM32F100_ParaTNC/makefile
+++ b/STM32F100_ParaTNC/makefile
@@ -24,6 +24,8 @@ RM := rm -rf
-include system/src/cmsis/subdir.mk
-include system/src/aprs/subdir.mk
-include system/src/subdir.mk
+-include src/kiss_protocol/subdir.mk
+-include src/configuration_nvm/subdir.mk
-include src/subdir.mk
-include subdir.mk
-include objects.mk
diff --git a/STM32F100_ParaTNC/sources.mk b/STM32F100_ParaTNC/sources.mk
index f4709af..e5946b4 100644
--- a/STM32F100_ParaTNC/sources.mk
+++ b/STM32F100_ParaTNC/sources.mk
@@ -28,6 +28,8 @@ CPP_DEPS :=
# Every subdirectory with source files must be described here
SUBDIRS := \
src \
+src/configuration_nvm \
+src/kiss_protocol \
system/src/aprs \
system/src/cmsis \
system/src/cortexm \
diff --git a/STM32F100_ParaTNC/src/subdir.mk b/STM32F100_ParaTNC/src/subdir.mk
index 31f880d..16dbe47 100644
--- a/STM32F100_ParaTNC/src/subdir.mk
+++ b/STM32F100_ParaTNC/src/subdir.mk
@@ -8,17 +8,11 @@ C_SRCS += \
../src/PathConfig.c \
../src/TimerConfig.c \
../src/_write.c \
-../src/config_data_default.c \
-../src/config_data_first.c \
-../src/config_data_second.c \
-../src/configuration_handler.c \
+../src/button_paratnc.c \
../src/delay.c \
../src/dummy.c \
-../src/float_to_string.c \
../src/io.c \
../src/it_handlers.c \
-../src/kiss_callback.c \
-../src/kiss_communication.c \
../src/main.c \
../src/packet_tx_handler.c \
../src/rte_main.c \
@@ -37,17 +31,11 @@ OBJS += \
./src/PathConfig.o \
./src/TimerConfig.o \
./src/_write.o \
-./src/config_data_default.o \
-./src/config_data_first.o \
-./src/config_data_second.o \
-./src/configuration_handler.o \
+./src/button_paratnc.o \
./src/delay.o \
./src/dummy.o \
-./src/float_to_string.o \
./src/io.o \
./src/it_handlers.o \
-./src/kiss_callback.o \
-./src/kiss_communication.o \
./src/main.o \
./src/packet_tx_handler.o \
./src/rte_main.o \
@@ -66,17 +54,11 @@ C_DEPS += \
./src/PathConfig.d \
./src/TimerConfig.d \
./src/_write.d \
-./src/config_data_default.d \
-./src/config_data_first.d \
-./src/config_data_second.d \
-./src/configuration_handler.d \
+./src/button_paratnc.d \
./src/delay.d \
./src/dummy.d \
-./src/float_to_string.d \
./src/io.d \
./src/it_handlers.d \
-./src/kiss_callback.d \
-./src/kiss_communication.d \
./src/main.d \
./src/packet_tx_handler.d \
./src/rte_main.d \
@@ -95,7 +77,7 @@ C_DEPS += \
src/%.o: ../src/%.c src/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/aprs/subdir.mk b/STM32F100_ParaTNC/system/src/aprs/subdir.mk
index ca2bf4f..75e2339 100644
--- a/STM32F100_ParaTNC/system/src/aprs/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/aprs/subdir.mk
@@ -44,7 +44,7 @@ C_DEPS += \
system/src/aprs/%.o: ../system/src/aprs/%.c system/src/aprs/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/cmsis/subdir.mk b/STM32F100_ParaTNC/system/src/cmsis/subdir.mk
index a84f928..fcd6cdf 100644
--- a/STM32F100_ParaTNC/system/src/cmsis/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/cmsis/subdir.mk
@@ -20,7 +20,7 @@ C_DEPS += \
system/src/cmsis/%.o: ../system/src/cmsis/%.c system/src/cmsis/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/cortexm/subdir.mk b/STM32F100_ParaTNC/system/src/cortexm/subdir.mk
index 82a912e..b3be91a 100644
--- a/STM32F100_ParaTNC/system/src/cortexm/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/cortexm/subdir.mk
@@ -23,7 +23,7 @@ C_DEPS += \
system/src/cortexm/%.o: ../system/src/cortexm/%.c system/src/cortexm/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/davis_vantage/subdir.mk b/STM32F100_ParaTNC/system/src/davis_vantage/subdir.mk
index dc07bee..da16c0e 100644
--- a/STM32F100_ParaTNC/system/src/davis_vantage/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/davis_vantage/subdir.mk
@@ -20,7 +20,7 @@ C_DEPS += \
system/src/davis_vantage/%.o: ../system/src/davis_vantage/%.c system/src/davis_vantage/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/diag/subdir.mk b/STM32F100_ParaTNC/system/src/diag/subdir.mk
index b08196e..ae68705 100644
--- a/STM32F100_ParaTNC/system/src/diag/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/diag/subdir.mk
@@ -20,7 +20,7 @@ C_DEPS += \
system/src/diag/%.o: ../system/src/diag/%.c system/src/diag/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/drivers/f1/subdir.mk b/STM32F100_ParaTNC/system/src/drivers/f1/subdir.mk
index 653bc7d..9ac41f3 100644
--- a/STM32F100_ParaTNC/system/src/drivers/f1/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/drivers/f1/subdir.mk
@@ -26,7 +26,7 @@ C_DEPS += \
system/src/drivers/f1/%.o: ../system/src/drivers/f1/%.c system/src/drivers/f1/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/drivers/subdir.mk b/STM32F100_ParaTNC/system/src/drivers/subdir.mk
index b80d19e..48c3a36 100644
--- a/STM32F100_ParaTNC/system/src/drivers/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/drivers/subdir.mk
@@ -29,7 +29,7 @@ C_DEPS += \
system/src/drivers/%.o: ../system/src/drivers/%.c system/src/drivers/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/modbus_rtu/subdir.mk b/STM32F100_ParaTNC/system/src/modbus_rtu/subdir.mk
index dc04380..300a0a4 100644
--- a/STM32F100_ParaTNC/system/src/modbus_rtu/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/modbus_rtu/subdir.mk
@@ -26,7 +26,7 @@ C_DEPS += \
system/src/modbus_rtu/%.o: ../system/src/modbus_rtu/%.c system/src/modbus_rtu/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/newlib/subdir.mk b/STM32F100_ParaTNC/system/src/newlib/subdir.mk
index 44b9fe7..986ed87 100644
--- a/STM32F100_ParaTNC/system/src/newlib/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/newlib/subdir.mk
@@ -43,7 +43,7 @@ system/src/newlib/%.o: ../system/src/newlib/%.cpp system/src/newlib/subdir.mk
system/src/newlib/%.o: ../system/src/newlib/%.c system/src/newlib/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/stm32f1-stdperiph/subdir.mk b/STM32F100_ParaTNC/system/src/stm32f1-stdperiph/subdir.mk
index d8d03ae..1b5d6d2 100644
--- a/STM32F100_ParaTNC/system/src/stm32f1-stdperiph/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/stm32f1-stdperiph/subdir.mk
@@ -53,7 +53,7 @@ C_DEPS += \
system/src/stm32f1-stdperiph/%.o: ../system/src/stm32f1-stdperiph/%.c system/src/stm32f1-stdperiph/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/umb_master/subdir.mk b/STM32F100_ParaTNC/system/src/umb_master/subdir.mk
index 476ff76..deccc0d 100644
--- a/STM32F100_ParaTNC/system/src/umb_master/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/umb_master/subdir.mk
@@ -26,7 +26,7 @@ C_DEPS += \
system/src/umb_master/%.o: ../system/src/umb_master/%.c system/src/umb_master/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32F100_ParaTNC/system/src/ve_direct_protocol/subdir.mk b/STM32F100_ParaTNC/system/src/ve_direct_protocol/subdir.mk
index 6a62b43..446e74f 100644
--- a/STM32F100_ParaTNC/system/src/ve_direct_protocol/subdir.mk
+++ b/STM32F100_ParaTNC/system/src/ve_direct_protocol/subdir.mk
@@ -17,7 +17,7 @@ C_DEPS += \
system/src/ve_direct_protocol/%.o: ../system/src/ve_direct_protocol/%.c system/src/ve_direct_protocol/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: Cross ARM C Compiler'
- arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
+ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DPARATNC -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -UPARAMETEO -I"../include" -I"../include/configuration_nvm" -I"../include/etc" -I"../system/include/tiny-aes" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/STM32L476_ParaMETEO/makefile b/STM32L476_ParaMETEO/makefile
index c163ee0..36938a2 100644
--- a/STM32L476_ParaMETEO/makefile
+++ b/STM32L476_ParaMETEO/makefile
@@ -74,9 +74,6 @@ BUILD_ARTIFACT := $(BUILD_ARTIFACT_PREFIX)$(BUILD_ARTIFACT_NAME)$(if $(BUILD_ART
SECONDARY_FLASH += \
ParaTNC.hex \
-SECONDARY_LIST += \
-ParaTNC.lst \
-
SECONDARY_SIZE += \
ParaTNC.siz \
@@ -101,12 +98,6 @@ ParaTNC.hex: ParaTNC.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
@echo 'Finished building: $@'
@echo ' '
-ParaTNC.lst: ParaTNC.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
- @echo 'Invoking: Cross ARM GNU Create Listing'
- arm-none-eabi-objdump --source --all-headers --demangle --line-numbers --wide "ParaTNC.elf" > "ParaTNC.lst"
- @echo 'Finished building: $@'
- @echo ' '
-
ParaTNC.siz: ParaTNC.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
@echo 'Invoking: Cross ARM GNU Print Size'
arm-none-eabi-size --format=berkeley "ParaTNC.elf"
@@ -115,10 +106,10 @@ ParaTNC.siz: ParaTNC.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
# Other Targets
clean:
- -$(RM) $(CC_DEPS)$(C++_DEPS)$(OBJS)$(C_UPPER_DEPS)$(CXX_DEPS)$(SECONDARY_FLASH)$(SECONDARY_LIST)$(SECONDARY_SIZE)$(ASM_DEPS)$(S_UPPER_DEPS)$(C_DEPS)$(CPP_DEPS) ParaTNC.elf
+ -$(RM) $(CC_DEPS)$(C++_DEPS)$(OBJS)$(C_UPPER_DEPS)$(CXX_DEPS)$(SECONDARY_FLASH)$(SECONDARY_SIZE)$(ASM_DEPS)$(S_UPPER_DEPS)$(C_DEPS)$(CPP_DEPS) ParaTNC.elf
-@echo ' '
-secondary-outputs: $(SECONDARY_FLASH) $(SECONDARY_LIST) $(SECONDARY_SIZE)
+secondary-outputs: $(SECONDARY_FLASH) $(SECONDARY_SIZE)
.PHONY: all clean dependents main-build
diff --git a/STM32L476_ParaMETEO/sources.mk b/STM32L476_ParaMETEO/sources.mk
index 5d0d55c..0deb3d0 100644
--- a/STM32L476_ParaMETEO/sources.mk
+++ b/STM32L476_ParaMETEO/sources.mk
@@ -19,7 +19,6 @@ OBJS :=
C_UPPER_DEPS :=
CXX_DEPS :=
SECONDARY_FLASH :=
-SECONDARY_LIST :=
SECONDARY_SIZE :=
ASM_DEPS :=
S_UPPER_DEPS :=
diff --git a/include/configuration_nvm/config_data.h b/include/configuration_nvm/config_data.h
index 5b462da..b928e4e 100644
--- a/include/configuration_nvm/config_data.h
+++ b/include/configuration_nvm/config_data.h
@@ -191,6 +191,27 @@ typedef struct __attribute__((aligned (4))) config_data_basic_t {
uint8_t button_two_right;
+ #define CONFIGURATION_SEC_ROUTINE_READ_OFFSET 1U
+ #define CONFIGURATION_SEC_ROUTINE_ELSE_OFFSET 3U
+ #define CONFIGURATION_SEC_MEDIUM_APRSIS 1U
+ #define CONFIGURATION_SEC_MEDIUM_RADIO 2U
+ #define CONFIGURATION_SEC_MEDIUM_KISS 4U
+ /**
+ * Configuration of how UDS diagnostics are secured access different
+ * mediums. GET_VERSION_AND_ID and SECURITY_ACCESS are never locked
+ *
+ * READ_DID and READ_MEMORY
+ * bit 1 - APRSIS
+ * bit 2 - RF network communication
+ * bit 3 - KISS serial port communication
+ *
+ * everything else
+ * bit 4 - APRSIS
+ * bit 5 - RF network communication
+ * bit 6 - KISS serial port communication
+ */
+ uint8_t uds_diagnostics_security_access;
+
} config_data_basic_t;
typedef enum config_data_wx_sources_enum_t {
diff --git a/include/configuration_nvm/configuration_handler.h b/include/configuration_nvm/configuration_handler.h
index 12871cc..2a52c90 100644
--- a/include/configuration_nvm/configuration_handler.h
+++ b/include/configuration_nvm/configuration_handler.h
@@ -62,5 +62,7 @@ uint16_t configuration_get_vbat_b_coeff(void);
configuration_button_function_t configuration_get_left_button(void);
configuration_button_function_t configuration_get_right_button(void);
+int configuration_get_is_security_access_required(uint8_t medium, uint8_t routine_type);
+
#endif /* CONFIGURATION_HANDLER_H_ */
diff --git a/include/etc/kiss_did_configuration.h b/include/etc/kiss_did_configuration.h
index 5464e0e..e7ed6fc 100644
--- a/include/etc/kiss_did_configuration.h
+++ b/include/etc/kiss_did_configuration.h
@@ -22,7 +22,20 @@
#include "./kiss_communication/kiss_xmacro_helpers.h"
#include "rte_wx.h"
-#define DIDS_NUMERIC(ENTRY) \
- ENTRY(0x1234, &rte_wx_temperature_average_dallas, &rte_wx_temperature_average_pt, &rte_wx_temperature_average_internal)
+//!< Dummy variable used only as end of definition marker in tables
+extern char did_dummy_data;
+
+//!< Definition of all DIDs with theirs source data for PARAMETEO platform
+#if defined(PARAMETEO)
+ #define DIDS_NUMERIC(ENTRY) \
+ ENTRY(0x1234, &rte_wx_temperature_average_dallas, &rte_wx_temperature_average_pt, &rte_wx_temperature_average_internal) \
+ ENTRY(0xFFFF, &did_dummy_data, &did_dummy_data, &did_dummy_data)
+#endif
+
+//!< Definition of all DIDs with theirs source data for PARATNC platform
+#if defined (PARATNC)
+ #define DIDS_NUMERIC(ENTRY) \
+ ENTRY(0xFFFF, &did_dummy_data, &did_dummy_data, &did_dummy_data)
+#endif
#endif /* KISS_DID_CONFIGURATION_H_ */
diff --git a/include/io.h b/include/io.h
index fbfb858..10a57b9 100644
--- a/include/io.h
+++ b/include/io.h
@@ -90,7 +90,7 @@ inline uint8_t io_get_12v_sw___cntrl_vbat_g(void) {
}
}
-#ifdef STM32L471xx
+#ifdef PARAMETEO
inline void io___cntrl_vbat_g_enable(void) {
GPIOA->BSRR |= GPIO_BSRR_BS6;
}
diff --git a/include/kiss_communication/kiss_communication_nrc_t.h b/include/kiss_communication/kiss_communication_nrc_t.h
index 0e1cb76..7ba0eb2 100644
--- a/include/kiss_communication/kiss_communication_nrc_t.h
+++ b/include/kiss_communication/kiss_communication_nrc_t.h
@@ -73,7 +73,84 @@ typedef enum kiss_communication_nrc_t {
* This response code indicates that the requested action will not be taken
* because the server prerequisite conditions are not met.
*/
- NRC_CONDITIONS_NOT_CORRECT = 0x22
+ NRC_CONDITIONS_NOT_CORRECT = 0x22,
+
+ /**
+ * This response code indicates that the requested action will not be taken
+ * because the server expects a different sequence of request messages or
+ * message as sent by the client. This may occur when sequence sensitive
+ * requests are issued in the wrong order.
+ */
+ NRC_REQUEST_SEQUENCE_ERROR = 0x24,
+
+ /**
+ * This response code indicates that the requested action will not be taken
+ * because the server has detected that the request message contains
+ * a parameter which attempts to substitute a value beyond its range of
+ * authority (e.g. attempting to substitute a data byte of 111 when the data
+ * is only defined to 100), or which attempts to access a
+ * dataIdentifier/routineIdentifer that is not supported or not supported
+ * in active session. This response code shall be implemented for
+ * all services, which allow the client to read data, write data or
+ * adjust functions by data in the server.
+ */
+ NRC_REQUEST_OUT_OF_RANGE = 0x31,
+
+ /**
+ * This response code indicates that the requested action will not be taken
+ * because the server's security strategy has not been satisfied by
+ * the client. The server shall send this response code if one of the
+ * following cases occur:
+ * the test conditions of the server are not met,
+ * the required message sequence
+ * e.g. DiagnosticSessionControl, securityAccess is not met,
+ * the client has sent a request message which requires an unlocked server.
+ */
+ NRC_SECURITY_ACCESS_DENIED = 0x33,
+
+ /**
+ * This response code indicates that the server has not given security
+ * access because the key sent by the client did not match with the key
+ * in the server's memory. This counts as an attempt to gain security.
+ * The server shall remain locked and increment its internal
+ * securityAccessFailed counter.
+ */
+ NRC_INVALID_KEY = 0x35,
+
+ /**
+ * This response code indicates that the requested action will not be taken
+ * because the client has unsuccessfully attempted to gain security access
+ * more times than the server's security strategy will allow.
+ */
+ NRC_EXCEED_NUMBER_OF_ATTEMPTS = 0x36,
+
+ /**
+ * This response code indicates that the request message was received
+ * correctly, and that all parameters in the request message were valid,
+ * but the action to be performed is not yet completed and the server is
+ * not yet ready to receive another request. As soon as the requested
+ * service has been completed, the server shall send a positive response
+ * message or negative response message with a response code different
+ * from this. The negative response message with this response code may be
+ * repeated by the server until the requested service is completed and
+ * the final response message is sent. This response code might impact
+ * the application layer timing parameter values. The detailed specification
+ * shall be included in the data link specific implementation document.
+ */
+ NRC_REQUEST_CORRECT_RESPONSE_PENDING = 0x78,
+
+ /**
+ * This response code indicates that the requested action will not be taken
+ * because the server does not support the requested service in the session
+ * currently active. This response code shall only be used when
+ * the requested service is known to be supported in another session,
+ * otherwise response code 0x11 (serviceNotSupported) shall be used.
+ * This response code is in general supported by each diagnostic service,
+ * as not otherwise stated in the data link specific implementation
+ * document, therefore it is not listed in the list of applicable response
+ * codes of the diagnostic services.
+ */
+ NRC_SERVICE_NOT_SUPPORTED_IN_ACTIVE_SESSION = 0x7F
diff --git a/include/kiss_communication/kiss_communication_service_ids.h b/include/kiss_communication/kiss_communication_service_ids.h
index f2fb853..8dda2c3 100644
--- a/include/kiss_communication/kiss_communication_service_ids.h
+++ b/include/kiss_communication/kiss_communication_service_ids.h
@@ -23,6 +23,9 @@
#define KISS_READ_MEM_ADDR (uint8_t) 0x23
#define KISS_READ_MEM_ADDR_RESP (uint8_t) 0x63
+#define KISS_SECURITY_ACCESS (uint8_t) 0x27
+#define kISS_SECURITY_ACCESS_RESP (uint8_t) 0x67
+
#define KISS_PROGRAM_STARTUP_CFG (uint8_t) 0x34
#define KISS_PROGRAM_STARTUP_CFG_RESP (uint8_t) 0x74
@@ -41,6 +44,8 @@
//#define KISS_CONTROL_VOLTAGE (uint8_t) 0x27
//#define KISS_CONTROL_VOLTAGE_RESP (uint8_t) 0x77
+#define KISS_NEGATIVE_RESPONSE_SERVICE (uint8_t) 0x7F
+
#define KISS_RETURN_IDLE 1
diff --git a/include/main.h b/include/main.h
index b704735..e359ca1 100644
--- a/include/main.h
+++ b/include/main.h
@@ -11,7 +11,7 @@
#include "gsm/sim800_state_t.h"
#define SW_VER "EA23"
-#define SW_DATE "17062023"
+#define SW_DATE "28062023"
#define SW_KISS_PROTO "A"
#define SYSTICK_TICKS_PER_SECONDS 100
diff --git a/src/LedConfig.c b/src/LedConfig.c
index f0ec7fc..fbbf3ca 100644
--- a/src/LedConfig.c
+++ b/src/LedConfig.c
@@ -22,7 +22,7 @@ uint8_t led_blinking_led2;
uint8_t led_blinking_led1;
void led_init(void) {
-#ifdef STM32F10X_MD_VL
+#ifdef PARATNC
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
@@ -40,7 +40,7 @@ void led_init(void) {
GPIO_Init(GPIOA, &GPIO_InitStructure);
#endif
-#ifdef STM32L471xx
+#ifdef PARAMETEO
/**
* GPIO_InitTypeDef.Mode = LL_GPIO_MODE_INPUT;
GPIO_InitTypeDef.Pin = LL_GPIO_PIN_2;
diff --git a/src/button_paratnc.c b/src/button_paratnc.c
index c7de912..c5a9ed8 100644
--- a/src/button_paratnc.c
+++ b/src/button_paratnc.c
@@ -8,3 +8,10 @@
#include "button.h"
+void button_check_all(configuration_button_function_t left, configuration_button_function_t right) {
+
+}
+
+void button_debounce(void) {
+
+}
diff --git a/src/configuration_nvm/configuration_handler.c b/src/configuration_nvm/configuration_handler.c
index b65a4cd..1312bd6 100644
--- a/src/configuration_nvm/configuration_handler.c
+++ b/src/configuration_nvm/configuration_handler.c
@@ -942,3 +942,14 @@ configuration_button_function_t configuration_get_right_button(void) {
return out;
}
+
+/**
+ * This function check if security access must be unlocked to execute given
+ * UDS service
+ * @param medium
+ * @param routine_type
+ * @return
+ */
+int configuration_get_is_security_access_required(uint8_t medium, uint8_t routine_type) {
+
+}
diff --git a/src/io.c b/src/io.c
index ff8029a..bbc3320 100644
--- a/src/io.c
+++ b/src/io.c
@@ -182,7 +182,7 @@ void io_oc_output_hiz(void) {
void io_pwr_init(void) {
-#if defined(STM32F10X_MD_VL)
+#if defined(PARATNC)
// RELAY_CNTRL
GPIO_InitTypeDef GPIO_InitStructure;
@@ -204,7 +204,7 @@ void io_pwr_init(void) {
#endif
-#if defined(STM32L471xx)
+#if defined(PARAMETEO)
// PC13 - UC_CNTRL_VS
GPIO_InitTypeDef.Mode = LL_GPIO_MODE_OUTPUT;
GPIO_InitTypeDef.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
@@ -260,7 +260,7 @@ void io_pwr_init(void) {
void io_ext_watchdog_config(void) {
-#ifdef STM32F10X_MD_VL
+#ifdef PARATNC
// initialize Watchdog output
Configure_GPIO(GPIOA,12,GPPP_OUTPUT_50MHZ);
#endif
@@ -268,7 +268,7 @@ void io_ext_watchdog_config(void) {
}
void io_ext_watchdog_service(void) {
-#ifdef STM32F10X_MD_VL
+#ifdef PARATNC
if ((GPIOA->ODR & GPIO_ODR_ODR12) == 0) {
// set high
GPIOA->BSRR |= GPIO_BSRR_BS12;
@@ -278,10 +278,6 @@ void io_ext_watchdog_service(void) {
GPIOA->BSRR |= GPIO_BSRR_BR12;
}
#endif
-
-#ifdef STM32L471xx
-
-#endif
}
void io_buttons_init(void){
diff --git a/src/kiss_protocol/kiss_did.c b/src/kiss_protocol/kiss_did.c
index 6282438..0e25b30 100644
--- a/src/kiss_protocol/kiss_did.c
+++ b/src/kiss_protocol/kiss_did.c
@@ -11,6 +11,9 @@
#include
#include
+//!< Dummy variable used only as end of definition marker in tables
+char did_dummy_data;
+
//!< Structure to define a DID which return numeric data
typedef struct kiss_did_numeric_definition_t {
uint16_t identifier;
@@ -27,6 +30,17 @@ const kiss_did_numeric_definition_t kiss_did_def[] = {
DIDS_NUMERIC(DID_NUMERIC_DEFINITION_EXPANDER)
};
+/**
+ * Creates a response for DID request into specified buffer. Please take into account
+ * that this function cannot use full size of this buffer. The exact content of the
+ * response is: FEND, NONSTANDARD, KISS_READ_DID_RESP, DID LSB, DID MSB, data, FEND.
+ * So in practice payload data may use only buffer_ln - 6 bytes of data.
+ *
+ * @param identifier
+ * @param output_buffer pointer to buffer where response will be generated into
+ * @param buffer_ln a size of this buffer, please be aware of note about available buffer!
+ */
void kiss_did_response(uint16_t identifier, uint8_t * output_buffer, uint16_t buffer_ln) {
+ // iterate through DID definition and check if this id exist there
}
diff --git a/src/main.c b/src/main.c
index 934b261..af32ed5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -135,13 +135,11 @@
*
* To obtain such compatibility a lot of #defines and different makefiles has to be used.
* Some parts of the code are 'included' per target CPU basis, as are independent from
- * target platform either directly (like handling serial port or GPIO configuration), or
- * as a result of an assumption that all target plaforms with STML476 will have GSM modem.
+ * target platform directly. Including system headers (CMSIS, std peripheral driver),
+ * configuring low level hardware like interrupt controler, clock etc.
+ *
+ * Some parts of code and header files are related to certain platform
*
- * Some platforms had or may have in the future few hadware revisions. ParaTNC had
- * revisions A, B and C. Currently A and B are abandoned an assumption is that all ParaTNC
- * builds applies to C. A choose of hardware revision is done in file 'station_config_target_hw.h'
- * which is currently empty
*/
// ----- main() ---------------------------------------------------------------
@@ -160,7 +158,7 @@ const config_data_basic_t * main_config_data_basic = 0;
const config_data_wx_sources_t * main_config_data_wx_sources = 0;
const config_data_umb_t * main_config_data_umb = 0;
const config_data_rtu_t * main_config_data_rtu = 0;
-#ifdef STM32L471xx
+#ifdef PARAMETEO
const config_data_gsm_t * main_config_data_gsm = 0;
#endif
@@ -200,7 +198,7 @@ srl_context_t main_kiss_srl_ctx;
//! serial context for UART used for comm with wx sensors
srl_context_t main_wx_srl_ctx;
-#if defined(STM32L471xx)
+#if defined(PARAMETEO)
//! serial context for communication with GSM module
srl_context_t main_gsm_srl_ctx;
#endif
@@ -272,7 +270,7 @@ umb_retval_t main_umb_retval = UMB_UNINITIALIZED;
//! result of CRC calculation
uint32_t main_crc_result = 0;
-#if defined(STM32L471xx)
+#if defined(PARAMETEO)
LL_GPIO_InitTypeDef GPIO_InitTypeDef;
gsm_sim800_state_t main_gsm_state;
@@ -409,7 +407,7 @@ int main(int argc, char* argv[]){
configuration_set_register(0);
-#if defined(STM32L471xx)
+#if defined(PARAMETEO)
nvm_erase_all();
// nvm_test_prefill();
@@ -619,7 +617,7 @@ int main(int argc, char* argv[]){
main_kiss_srl_ctx_ptr = &main_kiss_srl_ctx;
main_wx_srl_ctx_ptr = &main_wx_srl_ctx;
-#if defined(STM32L471xx)
+#if defined(PARAMETEO)
main_gsm_srl_ctx_ptr = &main_gsm_srl_ctx;
#endif
@@ -771,11 +769,11 @@ int main(int argc, char* argv[]){
break;
}
-#if defined(STM32F10X_MD_VL)
+#if defined(PARATNC)
main_wx_srl_ctx_ptr->te_pin = GPIO_Pin_8;
main_wx_srl_ctx_ptr->te_port = GPIOA;
#endif
-#if defined(STM32L471xx)
+#if defined(PARAMETEO)
main_wx_srl_ctx_ptr->te_pin = LL_GPIO_PIN_8;
main_wx_srl_ctx_ptr->te_port = GPIOA;
main_wx_srl_ctx_ptr->early_tx_assert = configuration_get_early_tx_assert(); // TODO: was 1
@@ -844,7 +842,7 @@ int main(int argc, char* argv[]){
// initialize i2c controller
i2cConfigure();
-#if defined(STM32L471xx)
+#if defined(PARAMETEO)
// initialize SPI
spi_init_full_duplex_pio(SPI_MASTER_MOTOROLA, CLOCK_REVERSED_RISING, SPI_SPEED_DIV256, SPI_ENDIAN_MSB);
@@ -871,11 +869,11 @@ int main(int argc, char* argv[]){
digi_init(main_config_data_mode);
if ((main_config_data_mode->wx & WX_ENABLED) == 1) {
-#if defined(STM32F10X_MD_VL)
+#if defined(PARATNC)
dallas_init(GPIOC, GPIO_Pin_11, GPIO_PinSource11, &rte_wx_dallas_average);
#endif
-#if defined(STM32L471xx)
+#if defined(PARAMETEO)
// initialize dallas one-wire driver for termometer
dallas_init(GPIOC, LL_GPIO_PIN_11, 0x0, &rte_wx_dallas_average);
#endif
@@ -1052,7 +1050,7 @@ int main(int argc, char* argv[]){
io_ext_watchdog_service();
-#ifdef STM32L471xx
+#ifdef PARAMETEO
if (main_config_data_mode->nvm_logger != 0) {
nvm_measurement_init();
@@ -1178,7 +1176,7 @@ int main(int argc, char* argv[]){
ax25_new_msg_rx_flag = 0;
rx10m++;
-#ifdef STM32L471xx
+#ifdef PARAMETEO
rte_main_rx_total++;
// if aprsis is logged
@@ -1189,7 +1187,7 @@ int main(int argc, char* argv[]){
#endif
}
-#ifdef STM32L471xx
+#ifdef PARAMETEO
// if GSM communication is enabled
if (main_config_data_mode->gsm == 1) {
@@ -1431,7 +1429,7 @@ int main(int argc, char* argv[]){
digi_pool_viscous();
- #ifdef STM32L471xx
+ #ifdef PARAMETEO
if (main_config_data_mode->gsm == 1) {
if (gsm_sim800_gprs_ready == 1) {
@@ -1493,7 +1491,7 @@ int main(int argc, char* argv[]){
wx_check_force_i2c_reset();
-#ifdef STM32L471xx
+#ifdef PARAMETEO
max31865_pool();
#endif
#ifdef INTERNAL_WATCHDOG
@@ -1539,7 +1537,7 @@ int main(int argc, char* argv[]){
main_set_monitor(9);
- #ifdef STM32L471xx
+ #ifdef PARAMETEO
if (main_config_data_mode->gsm == 1) {
gsm_sim800_poolers_ten_seconds(main_gsm_srl_ctx_ptr, &main_gsm_state);