From 6096f2ad81ff24ef78ed48f6c0293d3a8650b648 Mon Sep 17 00:00:00 2001 From: keenanlang Date: Wed, 6 Nov 2024 10:50:03 -0600 Subject: [PATCH] Add iocsh binding for bunch clock --- vmeApp/src/devBunchClkGen.c | 22 ++++++++++++++++++++++ vmeApp/src/vmeVXSupport.dbd | 1 + 2 files changed, 23 insertions(+) diff --git a/vmeApp/src/devBunchClkGen.c b/vmeApp/src/devBunchClkGen.c index 763b446..782c35d 100644 --- a/vmeApp/src/devBunchClkGen.c +++ b/vmeApp/src/devBunchClkGen.c @@ -1907,3 +1907,25 @@ struct vmeio* pvmeio = (struct vmeio*)&(pai->inp.value); } /* specialLinconvAi() */ + + +/* Epics iocsh bindings */ + +static const iocshArg BCGC_Arg0 = {"card", iocshArgInt}; +static const iocshArg BCGC_Arg1 = {"address", iocshArgInt}; + +static const iocshArg* const BCGC_Args[2] = {&BCGC_Arg0, &BCGC_Arg1}; + +static const iocshFuncDef BCGC_FuncDef = {"BunchClkGenConfigure", 2, BCGC_Args}; + +static void BCGCCallFunc(const iocshArgBuf* args) +{ + BunchClkGenConfigure(args[0].ival, args[1].ival); +} + +void BCGCRegistrar(void) +{ + iocshRegister(&BCGC_FuncDef, &BCGCCallFunc); +} + +epicsExportRegistrar(BCGCRegistrar); diff --git a/vmeApp/src/vmeVXSupport.dbd b/vmeApp/src/vmeVXSupport.dbd index 9f45151..45ae249 100644 --- a/vmeApp/src/vmeVXSupport.dbd +++ b/vmeApp/src/vmeVXSupport.dbd @@ -83,3 +83,4 @@ registrar(AVME9440Registrar) registrar(vmeTest_Register) registrar(devHPLaserAxis_Register) registrar(drvCAEN_v895Register) +registrar(BCGCRegistrar)