Skip to content

Commit

Permalink
debug output added
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-zimoch committed Jan 19, 2017
1 parent f858e81 commit ef8b270
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ifc.dbd
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ device(longin, VME_IO, devIfc1210Longin, "ifc1210")
device(longout, VME_IO, devIfc1210Longout, "ifc1210")
device(stringin, VME_IO, devIfc1210Stringin, "ifc1210")
driver(drvIfc1210)
variable(ifc1210Debug, int)
6 changes: 5 additions & 1 deletion ifcDev.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
#define I2CEXEC_MASK 0x0300000
#define BIT_31_SET 0x80000000

#define TOSCA_DEBUG_NAME ifc1210
#include "toscaDebug.h"
epicsExportAddress(int, ifc1210Debug);

long ifc1210Init(){ pev_init(0); return 0; }
struct {
long number;
Expand Down Expand Up @@ -161,7 +165,7 @@ long devIfc1210AiRead(aiRecord* record)
status = pev_bmr_read( p->card, p->address, &rval, p->count);
if((status&I2CEXEC_MASK) != I2CEXEC_OK)
{
fprintf(stderr, "%s: pev_bmr_read bmr=%d addr=%d failed",
debugErrno("%s: pev_bmr_read bmr=%d addr=%d",
record->name, p->card, p->address);
recGblSetSevr(record, READ_ALARM, INVALID_ALARM);
return -1;
Expand Down

0 comments on commit ef8b270

Please sign in to comment.