TAG R2-3 --> to head
Warning, cannot access the index:
_darcs/index: opening of '_darcs/index' failed: permission denied (Permission denied)
diff -rN -u old-highland/Makefile new-highland/Makefile
--- old-highland/Makefile 2022-11-28 22:48:57.530864906 +0100
+++ new-highland/Makefile 2022-11-28 22:48:57.530864906 +0100
@@ -3,3 +3,16 @@
include $(TOP)/configure/CONFIG
DIRS := configure $(wildcard *App)
include $(TOP)/configure/RULES_TOP
+
+PROJECT=highland-V850
+
+tar:
+ $(RM) *.tar.gz
+ for r in `darcs show tags | egrep '^([R\-][0-9]+)+$$'` ;\
+ do darcs dist -d $(PROJECT)`echo $$r|tr - .|tr R -` -t "^$$r$$" ;\
+ done
+
+upload: distclean tar
+ rsync --delete -r . wwwcsr@www-csr.bessy.de:www/control/SoftDist/highland/
+
+.PHONY: upload
diff -rN -u old-highland/configure/RELEASE new-highland/configure/RELEASE
--- old-highland/configure/RELEASE 2022-11-28 22:48:57.530864906 +0100
+++ new-highland/configure/RELEASE 2022-11-28 22:48:57.530864906 +0100
@@ -18,7 +18,7 @@
#SNCSEQ=$(EPICS_BASE)/../modules/soft/seq
# EPICS_BASE usually appears last so other apps can override stuff:
-EPICS_BASE=/opt/Epics/R3.14.8/base/3-14-8-2-0
+EPICS_BASE=/opt/Epics/R3.14.12/base/3-14-12-2-1
#Capfast users may need the following definitions
#CAPFAST_TEMPLATES=
diff -rN -u old-highland/hiddg85xApp/devHIDDG85x.c new-highland/hiddg85xApp/devHIDDG85x.c
--- old-highland/hiddg85xApp/devHIDDG85x.c 2022-11-28 22:48:57.530864906 +0100
+++ new-highland/hiddg85xApp/devHIDDG85x.c 2022-11-28 22:48:57.530864906 +0100
@@ -192,7 +192,7 @@
char feod_str[MAX_STRING_SIZE];
hiddg85x_chan *pchan;
hiddg85x_card *pcard;
- epicsIndex card;
+ int card;
prec->pact = TRUE;
@@ -205,7 +205,7 @@
return error("%s: signal number %d out of range [0..%d[\n",
prec->name, pvmeio->signal, NUM_CHANNELS);
- card = pvmeio->card;
+ card = pvmeio->card;
pcard = init_card(prec->name, pvmeio->card);
if (!pcard)
{
@@ -215,7 +215,7 @@
if ( HIDDG85X_ABSENT == phiddg85xDrv->getPresence(pvmeio->card) )
{
recGblSetSevr(prec,epicsAlarmDisable, epicsSevInvalid);
- return error("%s: no card %ld\n", prec->name, card);
+ return error("%s: no card %d\n", prec->name, card);
}
pchan = (hiddg85x_chan *)calloc(1,sizeof(hiddg85x_chan));
@@ -356,7 +356,7 @@
static int first_time = TRUE;
hiddg85x_chan *pchan;
hiddg85x_card *pcard;
- epicsIndex card;
+ int card;
prec->pact = TRUE;
@@ -383,7 +383,7 @@
if ( HIDDG85X_ABSENT == phiddg85xDrv->getPresence(pvmeio->card) )
{
recGblSetSevr(prec,epicsAlarmDisable, epicsSevInvalid);
- return error("%s: no card %ld\n", prec->name, card);
+ return error("%s: no card %d\n", prec->name, card);
}
pchan = (hiddg85x_chan *)calloc(1,sizeof(hiddg85x_chan));
@@ -469,7 +469,7 @@
static long init_record_bo(boRecord *prec)
{
struct vmeio *pvmeio = &(prec->out.value.vmeio);
- epicsIndex card = prec->out.value.vmeio.card;
+ int card = prec->out.value.vmeio.card;
char *parm = prec->out.value.vmeio.parm;
long status = 0;
hiddg85x_card *pcard = NULL;
@@ -484,12 +484,12 @@
if (!pcard)
{
recGblSetSevr(prec,epicsAlarmDisable, epicsSevInvalid);
- return error("%s: could not initialize card %ld\n", prec->name, card);
+ return error("%s: could not initialize card %d\n", prec->name, card);
}
if ( HIDDG85X_ABSENT == phiddg85xDrv->getPresence(pvmeio->card) )
{
recGblSetSevr(prec,epicsAlarmDisable, epicsSevInvalid);
- return error("%s: no card %ld\n", prec->name, card);
+ return error("%s: no card %d\n", prec->name, card);
}
prec->dpvt = (void*)pcard;
@@ -555,7 +555,7 @@
static long init_record_lo(longoutRecord* prec)
{
struct vmeio *pvmeio = &(prec->out.value.vmeio);
- epicsIndex card = prec->out.value.vmeio.card;
+ int card = prec->out.value.vmeio.card;
hiddg85x_card *pcard = NULL;
@@ -567,12 +567,12 @@
if (!pcard)
{
recGblSetSevr(prec, epicsAlarmDisable, epicsSevInvalid);
- return error("%s: could not initialize card %ld\n", prec->name, card);
+ return error("%s: could not initialize card %d\n", prec->name, card);
}
if ( HIDDG85X_ABSENT == phiddg85xDrv->getPresence(pvmeio->card) )
{
recGblSetSevr(prec, epicsAlarmDisable, epicsSevInvalid);
- return error("%s: no card %ld\n", prec->name, card);
+ return error("%s: no card %d\n", prec->name, card);
}
prec->dpvt = (void*)pcard;
diff -rN -u old-highland/hiddg85xApp/drvHIDDG85x.c new-highland/hiddg85xApp/drvHIDDG85x.c
--- old-highland/hiddg85xApp/drvHIDDG85x.c 2022-11-28 22:48:57.530864906 +0100
+++ new-highland/hiddg85xApp/drvHIDDG85x.c 2022-11-28 22:48:57.534865006 +0100
@@ -191,7 +191,7 @@
* unused registers all the rest are write only. Only the status
* register will be modified by the hardware.
*/
-typedef struct
+typedef volatile struct
{ /* hex offset -- description */
volatile epicsUInt16 vxi_mfr; /* 00 vxi manufacturer id */
volatile epicsUInt16 vxitype; /* 02 module type */
@@ -283,7 +283,7 @@
LOCAL epicsStatus setDelay(int card, int channel, double *delay,
epicsUInt32 * rdelay, int roffset);
LOCAL epicsStatus activate(int card, int force_eod);
-LOCAL hiddg85x_presence getPresence(epicsIndex card);
+LOCAL hiddg85x_presence getPresence(int card);
/* non-static routines (to be called from startup file) */
@@ -291,18 +291,12 @@
* calling hiddg85x_debug with a level greater than 0 will turn
* ever increasing levels of verbose debugging messages on
*/
-static const iocshArg set_debugArg = {"debug_level", iocshArgInt};
-static const iocshArg *const set_debugArgs[1] = {&set_debugArg};
-static const iocshFuncDef set_debugDef = {"hiddg85x_set_debug", 1, set_debugArgs};
epicsStatus hiddg85x_set_debug(int level)
{
hiddg85x.debug_level = level;
return 0;
}
-static const iocshArg set_base_addrArg = {"base_addr", iocshArgInt};
-static const iocshArg *const set_base_addrArgs[1] = {&set_base_addrArg};
-static const iocshFuncDef set_base_addrDef = {"hiddg85x_set_base_addr", 1, set_base_addrArgs};
epicsStatus hiddg85x_set_base_addr(int base_addr)
{
if (hiddg85x.pinfo) {
@@ -315,9 +309,6 @@
return 0;
}
-static const iocshArg set_max_cardsArg = {"max_cards", iocshArgInt};
-static const iocshArg *const set_max_cardsArgs[1] = {&set_max_cardsArg};
-static const iocshFuncDef set_max_cardsDef = {"hiddg85x_set_max_cards", 1, set_max_cardsArgs};
epicsStatus hiddg85x_set_max_cards(int ncards)
{
if (hiddg85x.pinfo) {
@@ -330,10 +321,6 @@
return 0;
}
-static const iocshArg configArg0 = {"cards", iocshArgInt};
-static const iocshArg configArg1 = {"base_addr", iocshArgInt};
-static const iocshArg *const configArgs[2] = {&configArg0, &configArg1};
-static const iocshFuncDef configDef = {"hiddg85x_config", 1, configArgs};
epicsStatus hiddg85x_config(int ncards, int base_addr)
{
epicsStatus status;
@@ -351,12 +338,6 @@
* this routine should be called only *after* base_addr and max_cards
* have been defined
*/
-static const iocshArg config_cardArg0 = {"card", iocshArgInt};
-static const iocshArg config_cardArg1 = {"vlo", iocshArgDouble};
-static const iocshArg config_cardArg2 = {"vhi", iocshArgDouble};
-static const iocshArg config_cardArg3 = {"trg_lvl", iocshArgDouble};
-static const iocshArg *const cconfig_cardArgs[4] = {&config_cardArg0, &config_cardArg1, &config_cardArg2, &config_cardArg3};
-static const iocshFuncDef config_cardDef = {"hiddg85x_config_card", 1, cconfig_cardArgs};
epicsStatus hiddg85x_config_card(int card, double vlo, double vhi, double trg_lvl)
{
hiddg85x_info *pinfo;
@@ -378,6 +359,11 @@
return 0;
}
+epicsStatus hiddg85x_config_card_mV(int card, int vlo, int vhi, int trg_lvl)
+{
+ return hiddg85x_config_card(card, vlo * 0.001, vhi * 0.001, trg_lvl * 0.001);
+}
+
/* end global routines */
@@ -496,19 +482,19 @@
{
hiddg85x_regs *pregs = hiddg85x.pregs + card;
hiddg85x_info *pinfo = hiddg85x.pinfo + card;
- epicsUInt16 cok;
+ epicsUInt8 cok;
#if 0
int i;
#endif
- if ( devReadProbe(1, pregs, &cok) ) {
+ if ( devReadProbe(1, &pregs->vxi_mfr, &cok) ) {
return error("no card found at address %p\n", pregs);
}
pinfo->pregs = pregs;
debug(1, "found card at address %p\n", pregs);
/* check that this is really the right type of card */
- if (pregs->vxi_mfr != VXI_MFR || pregs->vxitype != VXITYPE) {
+ if (pregs->vxi_mfr != VXI_MFR || (pregs->vxitype != VXITYPE && pregs->vxitype != VXITYPE)) {
return error("card MFR 0x%x of wrong type 0x%x at address %p\n",
pregs->vxi_mfr, pregs->vxitype, pregs);
return -1;
@@ -853,7 +839,7 @@
return 0;
}
-LOCAL hiddg85x_presence getPresence(epicsIndex card)
+LOCAL hiddg85x_presence getPresence(int card)
{
hiddg85x_info *pinfo;
@@ -877,23 +863,56 @@
/* registrar for ioshell */
-static registryFunctionRef mySubRef[] = {
- {"hiddg85x_set_debug", (REGISTRYFUNCTION)hiddg85x_set_debug},
- {"hiddg85x_set_base_addr", (REGISTRYFUNCTION)hiddg85x_set_base_addr},
- {"hiddg85x_set_max_cards", (REGISTRYFUNCTION)hiddg85x_set_max_cards},
- {"hiddg85x_config", (REGISTRYFUNCTION)hiddg85x_config},
- {"hiddg85x_config_card", (REGISTRYFUNCTION)hiddg85x_config_card}
-};
+static const iocshArg set_debugArg = {"debug_level", iocshArgInt};
+static const iocshArg *const set_debugArgs[] = {&set_debugArg};
+static const iocshFuncDef set_debugDef = {"hiddg85x_set_debug", 1, set_debugArgs};
+static void set_debugCall(const iocshArgBuf *args) {
+ hiddg85x_set_debug(args[0].ival);
+}
+
+static const iocshArg set_base_addrArg = {"base_addr", iocshArgInt};
+static const iocshArg *const set_base_addrArgs[] = {&set_base_addrArg};
+static const iocshFuncDef set_base_addrDef = {"hiddg85x_set_base_addr", 1, set_base_addrArgs};
+static void set_base_addrCall(const iocshArgBuf *args) {
+ hiddg85x_set_base_addr(args[0].ival);
+}
+
+static const iocshArg set_max_cardsArg = {"max_cards", iocshArgInt};
+static const iocshArg *const set_max_cardsArgs[] = {&set_max_cardsArg};
+static const iocshFuncDef set_max_cardsDef = {"hiddg85x_set_max_cards", 1, set_max_cardsArgs};
+static void set_max_cardsCall(const iocshArgBuf *args) {
+ hiddg85x_set_max_cards(args[0].ival);
+}
+
+static const iocshArg configArg0 = {"cards", iocshArgInt};
+static const iocshArg configArg1 = {"base_addr", iocshArgInt};
+static const iocshArg *const configArgs[] = {&configArg0, &configArg1};
+static const iocshFuncDef configDef = {"hiddg85x_config", 2, configArgs};
+static void configCall(const iocshArgBuf *args) {
+ hiddg85x_config(args[0].ival, args[1].ival);
+}
+
+static const iocshArg config_cardArg0 = {"card", iocshArgInt};
+static const iocshArg config_cardArg1 = {"vlo", iocshArgDouble};
+static const iocshArg config_cardArg2 = {"vhi", iocshArgDouble};
+static const iocshArg config_cardArg3 = {"trg_lvl", iocshArgDouble};
+static const iocshArg *const cconfig_cardArgs[] = {&config_cardArg0, &config_cardArg1, &config_cardArg2, &config_cardArg3};
+static const iocshFuncDef config_cardDef = {"hiddg85x_config_card", 4, cconfig_cardArgs};
+static void config_cardCall(const iocshArgBuf *args) {
+ hiddg85x_config_card(args[0].ival, args[1].dval, args[2].dval, args[3].dval);
+}
void drvHIDDG85x_registrar(void)
{
- registryFunctionRefAdd(mySubRef, NELEMENTS(mySubRef));
-
- iocshRegister(&set_debugDef, (iocshCallFunc)hiddg85x_set_debug);
- iocshRegister(&set_base_addrDef, (iocshCallFunc)hiddg85x_set_base_addr);
- iocshRegister(&set_max_cardsDef, (iocshCallFunc)hiddg85x_set_max_cards);
- iocshRegister(&configDef, (iocshCallFunc)hiddg85x_config);
- iocshRegister(&config_cardDef, (iocshCallFunc)hiddg85x_config_card);
+ static int firstTime = 1;
+ if (firstTime) {
+ firstTime = 0;
+ iocshRegister(&set_debugDef, set_debugCall);
+ iocshRegister(&set_base_addrDef, set_base_addrCall);
+ iocshRegister(&set_max_cardsDef, set_max_cardsCall);
+ iocshRegister(&configDef, configCall);
+ iocshRegister(&config_cardDef, config_cardCall);
+ }
}
epicsExportRegistrar(drvHIDDG85x_registrar);
diff -rN -u old-highland/hiddg85xApp/drvHIDDG85x.h new-highland/hiddg85xApp/drvHIDDG85x.h
--- old-highland/hiddg85xApp/drvHIDDG85x.h 2022-11-28 22:48:57.530864906 +0100
+++ new-highland/hiddg85xApp/drvHIDDG85x.h 2022-11-28 22:48:57.534865006 +0100
@@ -85,7 +85,7 @@
epicsStatus (*getControlValueFromParm)(const char* parm, epicsUInt16* cv);
epicsStatus (*setIntrateRegister) (int card, epicsUInt16 rate);
epicsStatus (*getIntrateRegister) (int card, epicsUInt16* rate);
- hiddg85x_presence (*getPresence) (epicsIndex card);
+ hiddg85x_presence (*getPresence) (int card);
}
hiddgv85xDrv;
extern hiddgv85xDrv *phiddg85xDrv;
patch 4c486b09db2085c5c424803ea95ceb7a8b4648bb
Author: Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
Date: Mon Feb 5 19:47:06 CET 2018
tagged R2-3-4
patch a191bf315405476ee18ad420a5e4951a305d8918
Author: Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
Date: Mon Feb 5 19:32:54 CET 2018
* fixed broken command registration for iocsh
patch 788f9d68c4791224ca6cf1663d53de93ec0551b7
Author: Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
Date: Fri Nov 13 14:22:33 CET 2015
tagged R2-3-3
patch 94655e52756a370b6f302b2d10cdd4250d0f2e7e
Author: Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
Date: Fri Nov 13 14:20:36 CET 2015
* work around card initialization problem on RTEMS
On RTEMS highland V850 cards are not recognized due to a wrong result when
reading the VXITYPE register, for the first time, while reading it a second
time gives a correct result. It is entirely unclear why this is so.
Anyway, reading twice is what we do now, until the problem is properly
understood and fixed.
patch 2b75edce86a51ca756175e6a64600093172169c3
Author: benjamin.franksen@helmholtz-berlin.de
Date: Mon Nov 21 13:08:49 CET 2011
tagged R2-3-2
patch 817354bf3fda6ede2373074d0cd39bc7c3dea666
Author: benjamin.franksen@helmholtz-berlin.de
Date: Mon Nov 21 12:31:52 CET 2011
* base -> 3-14-12-2-1
patch 9d26c5b62c452f01e4fb49968434f3c696d485a8
Author: benjamin.franksen@helmholtz-berlin.de
Date: Fri Aug 26 17:43:29 CEST 2011
* fixed/improved the upload target (in top-level Makefile)
patch e2e25170a3675bc0c29aa01b6879d164c768d00a
Author: benjamin.franksen@helmholtz-berlin.de
Date: Fri Aug 26 17:17:09 CEST 2011
* changed type of card (number) from epicsIndex to int
patch 7952b319e3d15e084485153599ccae8c8705abe7
Author: benjamin.franksen@helmholtz-berlin.de
Date: Fri Aug 26 17:10:45 CEST 2011
* base release -> 3-14-12-1-1
patch 38b7516ab6ee68a9f8ebf0e4ba43c6b86baa5d24
Author: ben.franksen@online.de
Date: Sat Oct 30 01:55:59 CEST 2010
tagged R2-3-1
patch df5b9465309262f1231382c2ecea87f9b19e0ce5
Author: ben.franksen@online.de
Date: Sat Oct 30 01:54:57 CEST 2010
* should not delete when uploading
patch 338262621461bca7d5af73e4bd1fd08e10f070c1
Author: ben.franksen@online.de
Date: Sat Oct 30 01:49:45 CEST 2010
* added hiddg85x_config_card_mV for shells where floating point args do not work
patch afcc461ab40f8f676da54a47802845172e373123
Author: ben.franksen@online.de
Date: Fri Oct 8 21:26:53 CEST 2010
* added upload (to the web server) as make target
patch 62371dc54b3698768705b8622cab8812eec4e808
Author: benjamin.franksen@bessy.de
Date: Wed Sep 10 14:38:05 CEST 2008
tagged R2-