
Option Explicit
'*****************************************************************************
' Module:
'        OSC
'-----------------------------------------------------------------------------
' Description:
'        This file contains the 'Update' functions for the module.
'
'-----------------------------------------------------------------------------
' History:
'                 
'        Rev. Author         Date        Description
'        ----------------------------------------------------------------------
'        1.0   ahe         27.04.00     final version for C165UTAH
'
'        ----------------------------------------------------------------------
'        2.0   ahe         05.09.00     final version for C167CS, C161PI, C161CS/JC/JI
'
'        ----------------------------------------------------------------------
'        3.0   ahe         31.10.00     final version for 
'                                         C167CS
'                                         C161PI
'                                         C161CS/JC/JI
'                                         C167CR/SR r2
'
'        ----------------------------------------------------------------------
'        4.0   ahe         07.08.01     final version for 
'                                         C167CS
'                                         C161PI
'                                         C161CS/JC/JI
'                                         C167CR/SR r2
'                                         Pegasus
'                                       - 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 = "OSC"
    sRegPre = "OSC"

    Select Case lngUpdateDescriptor
        Case 0 
            
             r.v(sVarPre & "_CFile")             = sVarPre & ".C"
             r.v(sVarPre & "_HFile")             = sVarPre & ".H"
             r.v(sVarPre & "_Notes")             = ""
             r.v(sVarPre & "_NAME_Init")         = sVarPre & "_vInit"
             r.v(sVarPre & "_NAME_UnlockOWD")    = sVarPre & "_viUnlockOWD"
             r.v("SYSCON_OWDDIS")                = 1 'OSC disabled
            
            
            '...

        Case 1
            '...
       'Case...
    End Select

    UpdateProjectData = True
    Exit Function

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

