Attribute VB_Name = "ProgDLLN"
'
' ICP Programmer Demo
'
' Author:   Uwe Mayer (Contronix)
' Date:     2003-03-12
'


Public Const resNone = 0
Public Const noProg = 1
Public Const progFound = 2
Public Const MemError = 3
Public Const progBusy = 4
Public Const progIdle = 5
Public Const progProtected = 6
Public Const eraChip = 7
Public Const eraEEp = 8
Public Const eraFlash = 9
Public Const prgEEp = 10
Public Const prgFlash = 11
Public Const verifyEEp = 12
Public Const verifyFlash = 13
Public Const errPwrDown = 14
Public Const errSignature = 15
Public Const errProtected = 16
Public Const errNotEmpty = 17
Public Const errVerify = 18
Public Const progDone = 19
Public Const dwnLoading = 20
Public Const dwnLoadErrP = 21
Public Const dwnLoadErrE = 22
Public Const dwnLoadErrF = 23
Public Const dwnLoadErr = 24
Public Const invFile = 25
Public Const invFName = 26
Public Const FileExist = 27
Public Const notFound = 28
Public Const invPassword = 29
Public Const limitExc = 30
Public Const errProgType = 31
Public Const resOk = 32


Public Declare Sub GetProgStatus Lib "ProgDLLN.dll" (ByVal Channel As Integer, ByRef res As Integer, ByVal strRes As String)

Public Declare Sub GetPasswd Lib "ProgDLLN.dll" (ByRef res As Integer, ByVal strRes As String)

Public Declare Sub AddNewFile Lib "ProgDLLN.dll" (ByVal FileName As String, ByRef res As Integer, ByVal strRes As String)

Public Declare Sub DeleteFile Lib "ProgDLLN.dll" (ByVal FileName As String, ByRef res As Integer, ByVal strRes As String)

Public Declare Sub GetFile Lib "ProgDLLN.dll" (ByVal Index As Integer, ByRef res As Integer, ByVal strRes As String)

Public Declare Sub SetChannel Lib "ProgDLLN.dll" (ByRef Channel As Integer, ByVal ComName As String, ByRef res As Integer, ByVal strRes As String)

Public Declare Sub CheckProgrammer Lib "ProgDLLN.dll" (ByVal Channel As Integer, ByRef res As Integer, ByVal strRes As String)

Public Declare Sub GetProjName Lib "ProgDLLN.dll" (ByVal Channel As Integer, ByRef Age As Integer, ByRef res As Integer, ByVal strRes As String)

Public Declare Sub GetACCUstate Lib "ProgDLLN.dll" (ByVal Channel As Integer, ByRef ACCU As Integer, ByRef res As Integer, ByVal strRes As String)

Public Declare Sub GetTargVolt Lib "ProgDLLN.dll" (ByVal Channel As Integer, ByRef Volt As Integer, ByRef res As Integer, ByVal strRes As String)

Public Declare Sub DownloadFile Lib "ProgDLLN.dll" (ByVal ProjName As String, ByVal BurnCycles As Integer, ByVal Channel As Integer, ByRef res As Integer, ByVal strRes As String)

Public Declare Sub AbortAll Lib "ProgDLLN.dll" ()

Public Declare Sub ProgDevice Lib "ProgDLLN.dll" (ByVal Channel As Integer, ByRef res As Integer, ByVal strRes As String)

Public Declare Sub CheckDevice Lib "ProgDLLN.dll" (ByVal Channel As Integer, ByRef res As Integer, ByVal strRes As String)


' JTAG:

Private Declare Sub JTAGBoundaryOpen Lib "ProgDLLN.dll" (ByVal Channel As Integer, ByVal CpuID As Integer, ByVal BoundaryLen As Integer, ByVal SupplyVolt As Integer, ByVal SupplyCurr As Integer, ByRef res As Integer, ByVal strRes As String)

Private Declare Sub JTAGBoundaryClose Lib "ProgDLLN.dll" (ByVal Channel As Integer, ByRef res As Integer, ByVal strRes As String)


Sub Main()
    Set fMainForm = New ProgDemoMain
    fMainForm.Show
End Sub


