'/*-------------------------------------------------------------------- *
'*                                                                      *
'*   3333   CCCC      CCCC  OOOO  N     N  CCCC  EEEEE  PPPP  TTTTTTT   *
'*       3 C         C     O    O NN    N C      E      P   P    T      *
'*       3 C         C     O    O N N   N C      E      P   P    T      *
'*   3333  C         C     O    O N  N  N C      EEEE   PPPP     T      *
'*       3 C         C     O    O N   N N C      E      P        T      *
'*       3 C         C     O    O N    NN C      E      P        T      *
'*   3333   CCCC      CCCC  OOOO  N     N  CCCC  EEEEE  P        T      *
'*                                                                      *
'*     UNITE D'INTERFACE POUR DLL/Win32 Module TC/USB-16IO              *
'*                                                                      *
'*                                                                      *    
'*                                                                      *
'* (c)2014-2017 3C CONCEPT S.A.S           							    *	
'*  V1.00 : DB : 03/11/2014 :creation 					                *
'*  V1.01 : JT : 05/05/2017 :ajout fonctions latch					    *
'* -------------------------------------------------------------------- *
'*/

Attribute VB_Name = "Module1"

 Declare Function TCUSB16IO_Open Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByRef Adresse As String) As Long
 Declare Function TCUSB16IO_OpenN Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByRef Adresse As Long) As Long
 Declare Function TCUSB16IO_OpenN_InitOutput Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByRef Adresse As Long, ByVal Data As Byte) As Long
 Declare Function TCUSB16IO_Refresh Lib "TCUSB16IO.DLL" (ByVal NModule As Long) As Long
 Declare Function TCUSB16IO_Input Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByRef Data As Long) As Long
 Declare Function TCUSB16IO_Output Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByVal Data As Byte) As Long
 
 Declare Function TCUSB16IO_BitInput Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByVal Entree As Long) As Long
 Declare Function TCUSB16IO_Counter Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByVal Entree As Long, ByRef Data As Byte) As Long
 
 Declare Function TCUSB16IO_BitReadBack Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByVal Sortie As Long) As Long
 
 Declare Sub TCUSB16IO_BitOutput Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByVal Data As Long, ByVal Etat As Long)
 
 Declare Function TCUSB16IO_Config Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByVal Data As Byte) As Long
 Declare Function TCUSB16IO_Pos Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByRef Data As Integer) As Long
 Declare Function TCUSB16IO_ResetPos Lib "TCUSB16IO.DLL" (ByVal NModule As Long) As Long

 Declare Function TCUSB16IO_ConfigLatch Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByVal Data As Byte) As Long
 Declare Function TCUSB16IO_Latch Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByVal Latch As Byte, ByRef Data As Integer) As Long
 
 Declare Sub TCUSB16IO_WdgRun Lib "TCUSB16IO.DLL" (ByVal NModule As Long)
 Declare Sub TCUSB16IO_WdgStop Lib "TCUSB16IO.DLL" (ByVal NModule As Long)
 Declare Sub TCUSB16IO_WdgRearm Lib "TCUSB16IO.DLL" (ByVal NModule As Long)
 
 Declare Sub TCUSB16IO_ResetPort Lib "TCUSB16IO.DLL" (ByVal NModule As Long)
 Declare Sub TCUSB16IO_CyclePort Lib "TCUSB16IO.DLL" (ByVal NModule As Long)
 Declare Function TCUSB16IO_Close Lib "TCUSB16IO.DLL" (ByVal NModule As Long) As Long
 Declare Function TCUSB16IO_Version Lib "TCUSB16IO.DLL" (ByVal NModule As Long, ByRef Data1 As Byte, ByRef Data2 As Byte) As Long
  
 
 
'code d'erreur genérés par ces fontions
'0 :    OK
'1 :    Numero de serie incorrect
'2 :    N° de module incorrect
'3 :    Pas de module TCUSB16IO détecté
'4 :    Module non initialisé
'5 :
'6 :
'7 :    erreur a la fermeture
