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  ste            01.02.00    final version
'        1.1  ste            07.03.00    constants "TOOLTIP_ENABLED_PARAMETER_NAME" added
'
'        ----------------------------------------------------------------------
'        3.0  ahe            26.07.00    final version for C161PI
'                                        - added TOOLTIP_DISABLED_ISR16
'                                        - changed TOOLTIP_DISABLED_ISR32
'
'        !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
'        This file is NOT compatibel to the 32-bit MC 
'             ahe            28.07.00
'        !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
'        3.1  ste            24.02.03    CONST TO_HIGH and TO_LOW added
'                            06.03.03    CONST CAPTION_LBL_PEC_HINT added
'        ----------------------------------------------------------------------
'             ste            01.10.03    constant "FORMAT_NOTES" changed
'             ste            06.11.03    constant "TO_HIGH" and "TO_LOW" changed
'
'*****************************************************************************

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

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


' 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 its reset state. "
End Function

