#==============================================================
#
#  Abs:  Script to Initialize IPAC hardware (B913)
#
#  Name: init_ipac.cmd
#
#  Facility: LCLS BCS Controls
#
#  Auth: 12-Aug-2008, Arturo Alarcon  (ALARCON)
#  Rev:  dd-mmm-yyyy, Reviewer's Name (USERNAME)
#--------------------------------------------------------------
#  Mod:
#       17-Oct-2019, K. Luchini      (LUCHINI):
#          chg card from name LTUH to LTU0
#        16-Sep-2019, Kristi Luchini  (LUCHINI)
#         extract from st.cmd
#         chg card area from LTU1 to LTUH
#
#==============================================================

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

# Initialize 8413 adc's
# Input arguments are:
#   name, carrier, slot, csr, vector
#
# 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
ip8413Create("AI4-LTU0-13-BCS",carrier0,2,0,0)

# Initialize DI ip440
# Input arguments are:
#   name, card, slot,
xy2440Create("DI5-LTU0-13-BCS", carrier0, 0, "STANDARD", "LEVEL", 0x0, 0x80, 0x0, 0x00)
xy2440Create("DI6-LTU0-13-BCS", carrier0, 1, "STANDARD", "LEVEL", 0x0, 0x80, 0x0, 0x00)

# Initialize DO ip445
# Input arguments are:
#   name, card, slot, modeName, intHandler, usrFunc, vector, event, debounce 
xy2445Create("DO2-LTU0-13-BCS",carrier0,3)
bspExtVerbosity=0

# End of script

