#==============================================================
#
#  Abs:  Script to Initialize IPAC hardware
#
#  Name: init_ipac.cmd
#
#  Facility: FACET-II BCS Controls
#
#  Auth: 15-May-2018, Kristi Luchini  (LUCHINI)
#  Rev:  dd-mmm-yyyy, Reviewer's Name (USERNAME)
#--------------------------------------------------------------
#  Mod:
#        09-Jul-2018, K. Luchini      (LUCHINI):
#         initalize Hytec 8413 adc ipac module
#
#==============================================================

# Initialized ip carriers
# Input arguments are: card info, A16 address
ipacAddXy9660("0x0000,0")
carrier1 = ipacLatestCarrier()

# WARNING: set bspExtVerbosity to 3 to slow down processor because
# otherwise the IDprom name  of this modules is not returned correctly.
# This check is done in the function hytec_ipmValidate() which
# is in the source file hytecIpm.c
#
bspExtVerbosity=3

# Initialize DI ip440
# Input arguments are:
#   name, card, slot,
xy2440Create("DI-IN10-1-BCS", carrier1, 0, "STANDARD", "LEVEL", 0x0, 0x80, 0x0, 0x00)

# Initialize DO ip445
# Input arguments are:
#   name, card, slot, modeName, intHandler, usrFunc, vector, event, debounce
xy2445Create("DO-IN10-1-BCS",carrier1, 1)

# Initialize 8413 adc's
# Input arguments are:
#   name, carrier, slot, csr, vector
ip8413Create("ADC-IN10-1-BCS",carrier1,2,0,0)

# Disable log messages 
bspExtVerbosity=0

# End of script

