
Option Explicit
'*****************************************************************************
' Module:
'        WDT
'-----------------------------------------------------------------------------
' Description:
'        This file contains the 'Update' functions for the module.
'
'-----------------------------------------------------------------------------
' History:
'                 
'        Rev. Author         Date        Description
'        ---------------------------------------------------------------------
'        1.0   ahe         14.02.00     final version for C165UTAH
'
'        ---------------------------------------------------------------------
'        2.0   ahe         14.06.00     final version for C167CS, C161CS/JC/JI
'
'        ---------------------------------------------------------------------
'        2.1   ahe         02.11.00     final version for C167CS, C161CS/JC/JI
'                                       
'        ---------------------------------------------------------------------
'        4.0   ahe         24.04.01     final version for Pegasus
'        4.1   ste         06.01.03     no changes
'                                       
'
'*****************************************************************************


'*****************************************************************************
'Description:
'        This function is called by the main module in order to reset or update
'        the project variables and register contents of this peripheral
'-----------------------------------------------------------------------------
'Parameters:
'        r                      reference to the project data variables
'        vIndex                 a parameter
'        lngUpdateDescriptor    identification of the update context
'                  0          = initialization for a new project
'                  1, 2, 3... = value that identifies which project settings have
'                               been changed (e.g. CPU-Type, CPU-Clock etc.)
'-----------------------------------------------------------------------------
'Returns:
'        True            on successfull operation
'        False           else
'*****************************************************************************
Function UpdateProjectData(r As ProjectData, vIndex As Variant, lngUpdateDescriptor As Long) As Boolean
    On Error GoTo UpdateProjectDataError

    Dim sVarPre As String
    Dim sRegPre As String

    UpdateProjectData = False
    sVarPre = "WDT"
    sRegPre = "WDT"

    Select Case lngUpdateDescriptor
        Case 0 
            
            r.v(sVarPre & "_CFile")            = sVarPre & ".C"
            r.v(sVarPre & "_HFile")            = sVarPre & ".H"
            r.v(sVarPre & "_NAME_Init")        = sVarPre & "_vInit"
            r.v(sVarPre & "_NAME_TriggerWDT")  = sVarPre & "_vTriggerWDT" 
            r.v(sVarPre & "_Disable")         = 1
            '...
'           --------------------------------------------
'           LIN variable initialization
'            r.v("DEFAULT") = "text"
'            r.v("FrameName") = "Frame2"
'            r.v("FrameID") = 1
        Case 1
            '...
       'Case...
    End Select

    UpdateProjectData = True
    Exit Function

UpdateProjectDataError:
    ErrorBox "Error in function UpdateProjectData", Err.Description
    Exit Function
End Function

