#!../../bin/linux-arm/caen1527-watchdog

## You may have to change caen1527-watchdog to something else
## everywhere it appears in this file

< envPaths
epicsEnvSet("STREAM_PROTOCOL_PATH", "${TOP}/protocols")
cd "${TOP}"

## Register all support components
dbLoadDatabase "dbd/caen1527-watchdog.dbd"
caen1527_watchdog_registerRecordDeviceDriver pdbbase


drvAsynSerialPortConfigure("hadcon2","/dev/ttyUSB0",0,0,0)
   asynSetOption("hadcon2",0,"baud","115200")
   asynSetOption("hadcon2",0,"bits","8")
   asynSetOption("hadcon2",0,"parity","none")
   asynSetOption("hadcon2",0,"stop","1")
   asynSetOption("hadcon2",0,"clocal","Y")
   asynSetOption("hadcon2",0,"crtscts","N")

## Load record instances
dbLoadRecords("db/caen1527-watchdog_debug.db")
dbLoadRecords("db/caen1527-watchdog_radc.db")
dbLoadRecords("db/caen1527-watchdog_dac.db")
dbLoadRecords("db/caen1527-watchdog_io_register.db")
dbLoadRecords("db/caen1527-watchdog_led.db")
dbLoadRecords("db/caen1527-watchdog_impulse.db")

cd "${TOP}/iocBoot/${IOC}"
iocInit

## Start any sequence programs
#seq sncxxx,"user=pi"
