Attribute VB_Name = "Module1"
Option Explicit
'*****************************************************************************
' Module:
'        Const.inc
'-----------------------------------------------------------------------------
' Description:
'        This file contains global constants. This file should be the same
'        for all controllers.
'
'-----------------------------------------------------------------------------
' History:
'
'        Rev. Author         Date        Description
'        ----------------------------------------------------------------------
'        1.0                 01.08.07    Initial version
'*****************************************************************************

'*****************************************************************************
' @Global Constants
'*****************************************************************************

' format identifiers
Global Const FORMAT_FUNCTIONS = "N150"
Global Const FORMAT_PARAMETERS = "N150"
Global Const FORMAT_FILES = "S80"
Global Const FORMAT_NOTES = "S10000"

Global Const MSG_CHANGE_T = "The selection will disable GPT timer in DAvE." & vbCrLf & _
                            "Do you really want to continue ?"
' message box constants
'
' use this constant as text for the MsgBox when the project settings are called
Global Const MSG_CALL_PROJECTSETTINGS = "These basic settings have a major effect on the whole" & vbCrLf & _
                                         "configuration and should therefore be set at the beginning" & vbCrLf & _
                                         "of a project. If any of these settings are reconfigured," & vbCrLf & _
                                         "the peripherals actual configuration should be checked." & vbCrLf & _
                                         "Do you really want to continue ?"

' use this constant as text for the MsgBox when the controller type will be changed
Global Const MSG_CHANGE_CONTROLLER = "Any of your settings which are incompatible with the selected" & vbCrLf & _
                                         "controller type will be adjusted without further notification." & vbCrLf & _
                                         "Do you really want to continue ?"


' use this constant as text for the MsgBox when the System clock will be changed
Global Const MSG_CHANGE_SYSTEMCLOCK = "Any of your settings which are dependent from the system clock" & vbCrLf & _
                                         "will be adjusted without further notification." & vbCrLf & _
                                         "Do you really want to continue ?"


' use this constant as text for the MsgBox when the project should be closed
Global Const MSG_CLOSE_PROJECT = "Closing this window closes the project !" & vbCrLf & _
                                         "Do you want to continue ?"


' use this constant as text for the MsgBox when the application should be closed
Global Const MSG_CLOSE_APPLICATION = "Save changes ?"


Global Const MSG_DOCU_BUTTON = "To access all information and documentation related to the selected " & _
                               "peripheral click on the down arrow located on the right."

' us this constant as text for the MsgBox when the codegenerator is called (only for the first demo-version
Global Const MSG_CALL_CODEGENERATOR = "The generated code is for demonstration purposes only. " & vbCrLf & _
                                         "Do you really want to continue ?"


' caption constants
'
Global Const CAPTION_FRA_USE_INIT = "Initialization Function"
Global Const CAPTION_FRA_CFILE = "Source File"
Global Const CAPTION_LBL_CFILE = "File name"
Global Const CAPTION_FRA_LIBRARY1 = "Function Library (Part 1)"
Global Const CAPTION_FRA_LIBRARY2 = "Function Library (Part 2)"
Global Const CAPTION_FRA_HFILE = "Header File"
Global Const CAPTION_LBL_HFILE = "File name"
Global Const CAPTION_FRA_PARAMETERS1 = "Parameters (Part 1)"
Global Const CAPTION_FRA_PARAMETERS2 = "Parameters (Part 2)"
' this text was delivered by Infineon (Mrs. Kelling)
Global Const CAPTION_LBL_PEC_HINT = "A PEC transfer shall not be used, in case more than one interrupt source is using the same interrupt node."


'
'
Global Const CALCULATION_NOT_POSSIBLE = "n.a."
Global Const TO_HIGH = "too high"
Global Const TO_LOW = "too low"


' tooltip constants
'
Global Const TOOLTIP_DISABLED_IF = "This control is disabled because"
Global Const TOOLTIP_DISABLED_FUNCTION = "This function is disabled because"
Global Const TOOLTIP_DISABLED_MACRO = "This macro is disabled because"
Global Const TOOLTIP_DISABLED_PARAMETER = "This parameter name can not be changed because"
Global Const TOOLTIP_DISABLED_TRAP = "This trap function is disabled because"

' use this constant as first line in the 'DisabledToolTipText' for the description of the ISR's
' on page 'Functions'
Global Const TOOLTIP_DISABLED_ISR = "This function will be automatically selected by DAvE." & vbCrLf

'- Der Text dieser Konstante ist gueltig nur fuer 16-bit MC.
'- Um zu den alten MC (z.B. C165UTAH) kompatibel zu bleiben gibt es die Konstante TOOLTIP_DISABLED_ISR16
'  die den gleichen Text hat.
Global Const TOOLTIP_DISABLED_ISR32 = "This function will be automatically selected by DAvE." & vbCrLf & _
                                           "This is the case if the initialization function is selected and " & vbCrLf & _
                                           "the interrupt is enabled. Further, the interrupt priority level " & vbCrLf & _
                                           "must be greater than zero." & vbCrLf & vbCrLf

Global Const TOOLTIP_DISABLED_ISR16 = "This function will be automatically selected by DAvE." & vbCrLf & _
                                           "This is the case if the initialization function is selected and " & vbCrLf & _
                                           "the interrupt is enabled. Further, the interrupt priority level " & vbCrLf & _
                                           "must be greater than zero." & vbCrLf & vbCrLf


' use this constant as a part of the ISR description (DisabledToolTipText) on page 'Functions'
Global Const TOOLTIP_ISR_USERCODE = "Please note that you have to add application specific " & _
                                           "code to this function."


Global Const TOOLTIP_DISABLED_FUNC_NAME = "This function name or macro name can only be changed " & _
                                           "if the function or macro is selected."
Global Const TOOLTIP_DISABLED_CFILE_NAME = "The source file name can only be changed if " & _
                                           "the initialization function is selected."
Global Const TOOLTIP_DISABLED_HFILE_NAME = "The header file name can only be changed if " & _
                                           "the initialization function is selected."
Global Const TOOLTIP_DISABLED_PARAMETER_NAME = "The parameter name can only be changed if " & _
                                               "the initialization function is selected."
Global Const TOOLTIP_ENABLED_PARAMETER_NAME = "This parameter is used in several functions. " & _
                                               "For the description of this parameter see the function " & _
                                               "descriptions."

Global Const TOOLTIP_DESELECTED_INIT = "the initialization function is not selected"



' title for the code generator
Global Const CODEGEN_TITLE = "DAvE Codegenerator"


' constant strings for the code generator
Global Const SECTION_PROJECT_INCLUDES = _
"//****************************************************************************" & vbCrLf & _
"// @Project Includes" & vbCrLf & _
"//****************************************************************************"
Global Const SECTION_MACROS = _
"//****************************************************************************" & vbCrLf & _
"// @Macros" & vbCrLf & _
"//****************************************************************************"
Global Const SECTION_DEFINES = _
"//****************************************************************************" & vbCrLf & _
"// @Defines" & vbCrLf & _
"//****************************************************************************"
Global Const SECTION_TYPEDEFS = _
"//****************************************************************************" & vbCrLf & _
"// @Typedefs" & vbCrLf & _
"//****************************************************************************"
Global Const SECTION_IMPORTED_GLOBAL_VARIABLES = _
"//****************************************************************************" & vbCrLf & _
"// @Imported Global Variables" & vbCrLf & _
"//****************************************************************************"
Global Const SECTION_GLOBAL_VARIABLES = _
"//****************************************************************************" & vbCrLf & _
"// @Global Variables" & vbCrLf & _
"//****************************************************************************"
Global Const SECTION_EXTERNAL_PROTOTYPES = _
"//****************************************************************************" & vbCrLf & _
"// @External Prototypes" & vbCrLf & _
"//****************************************************************************"
Global Const SECTION_LOCAL_PROTOTYPES = _
"//****************************************************************************" & vbCrLf & _
"// @Prototypes Of Local Functions" & vbCrLf & _
"//****************************************************************************"
Global Const SECTION_GLOBAL_PROTOTYPES = _
"//****************************************************************************" & vbCrLf & _
"// @Prototypes Of Global Functions" & vbCrLf & _
"//****************************************************************************"
Global Const SECTION_INTERRUPT_VECTORS = _
"//****************************************************************************" & vbCrLf & _
"// @Interrupt Vectors" & vbCrLf & _
"//****************************************************************************"
Global Const SECTION_SFR_DECLARATION = _
"//****************************************************************************" & vbCrLf & _
"// @Declaration of SFRs" & vbCrLf & _
"//****************************************************************************"

Global Const END_OF_FUNCTION = "//  End of function "

' text for undefined user pec pointer
Global Const PECC_SOURCE = "// DO NOT FORGET TO SET THE SOURCE-POINTER FOR PECC CHANNEL "
Global Const PECC_DEST = "// DO NOT FORGET TO SET THE DESTINATION-POINTER FOR PECC CHANNEL "



' use this constant in the Project_Init functions
Global Const COMPILER_EDE_HINT = "  /// the following initialization is made by the compiler EDE when you" & vbCrLf & _
                                         "  /// import the DAvE project"
                 
'*****************************************************************************
' @Global Types
'*****************************************************************************


'*****************************************************************************
' @Global Functions
'*****************************************************************************

'*****************************************************************************
'Description:
'        This function returns a string with the description text for the
'        module header in the C file.
'-----------------------------------------------------------------------------
'Parameters:
'        ModuleName       Name of the module
'-----------------------------------------------------------------------------
'Returns:
'        string with module description
'*****************************************************************************
Function GetModuleHeaderC(ModuleName As String) As String
On Error Resume Next
    GetModuleHeaderC = "This file contains functions that use the " & ModuleName & " module."
End Function


'*****************************************************************************
'Description:
'        This function returns a string with the description text for the
'        module header in the H file.
'-----------------------------------------------------------------------------
'Parameters:
'        ModuleName       Name of the module
'-----------------------------------------------------------------------------
'Returns:
'        string with module description
'*****************************************************************************
Function GetModuleHeaderH(ModuleName As String) As String
On Error Resume Next
    GetModuleHeaderH = "This file contains all function prototypes and macros for the " & ModuleName & " module."
End Function


'*****************************************************************************
'Description:
'        This function returns an unformatted string with a general description
'        of the init function.
'-----------------------------------------------------------------------------
'Parameters:
'        ModuleName       Name of the module
'-----------------------------------------------------------------------------
'Returns:
'        string with description
'*****************************************************************************

Function GetGeneralInitDescription(ModuleName As String) As String
    On Error Resume Next
    GetGeneralInitDescription = _
    "This is the initialization function of the " & ModuleName & " function library. " & _
    "It is assumed that the SFRs used by this library are in reset state. "
End Function


