Permalink
Browse files

Changes to use typed dset and drvet if available

  • Loading branch information...
anjohnson committed Oct 23, 2018
1 parent 56530e4 commit a7e0ff4089b9aa39108bc8569e95ba7fcf07cee9
@@ -32,6 +32,8 @@ LIBSRCS_vxWorks-pentium += drvAtc40.c

LIBSRCS_vxWorks += $(LIBSRCS_$(T_A))

USR_CFLAGS += -DUSE_TYPED_RSET -DUSE_TYPED_DSET -DUSE_TYPED_DRVET

Ipac_LIBS += $(EPICS_BASE_IOC_LIBS)

include $(TOP)/configure/RULES
@@ -82,12 +82,12 @@ LOCAL ipac_carrier_t nullCarrier = {

/* Driver Support Entry Table */

LOCAL int ipacInitialise(int after);
LOCAL long ipacInitialise(int after);

struct drvet drvIpac = {
2,
(DRVSUPFUN) ipacReport,
(DRVSUPFUN) ipacInitialise
drvet drvIpac = {
2,
ipacReport,
ipacInitialise
};
epicsExportAddress(drvet, drvIpac);

@@ -782,7 +782,7 @@ int ipmIntConnect (
*/

int ipacReport (
long ipacReport (
int interest
) {
int carrier, slot;
@@ -836,7 +836,7 @@ int ipacReport (
*/

LOCAL int ipacInitialise (
LOCAL long ipacInitialise (
int after
) {
return OK;
@@ -202,7 +202,7 @@ typedef struct {
/* Functions for startup and interactive use */

epicsShareFunc int ipacAddCarrier(ipac_carrier_t *pcarrier, const char *cardParams);
epicsShareFunc int ipacReport(int interest);
epicsShareFunc long ipacReport(int interest);
epicsShareFunc int ipacAddNullCarrier (void);
epicsShareFunc int ipacLatestCarrier(void);

@@ -24,7 +24,7 @@ LIBSRCS += devSiWiener.c
LIBSRCS += devBiTip810.c
LIBSRCS += drvTip810.c

USR_CFLAGS += -DUSE_TYPED_RSET
USR_CFLAGS += -DUSE_TYPED_RSET -DUSE_TYPED_DSET -DUSE_TYPED_DRVET

LIBRARY_IOC_vxWorks = Tip810
LIBRARY_IOC_RTEMS = Tip810
@@ -85,8 +85,8 @@ typedef struct aiCanBus_s {
int status;
} aiCanBus_t;

static long init_ai(struct aiRecord *prec);
static long get_ioint_info(int cmd, struct aiRecord *prec, IOSCANPVT *ppvt);
static long init_ai(struct dbCommon *prec);
static long get_ioint_info(int cmd, struct dbCommon *prec, IOSCANPVT *ppvt);
static long read_ai(struct aiRecord *prec);
static long special_linconv(struct aiRecord *prec, int after);
static void ProcessCallback(CALLBACK *pcallback);
@@ -95,19 +95,17 @@ static void busSignal(void *private, int status);
static void busCallback(CALLBACK *pCallback);

struct {
long number;
DEVSUPFUN report;
DEVSUPFUN init;
DEVSUPFUN init_record;
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_ai;
DEVSUPFUN special_linconv;
dset common;
long (*read_ai)(struct aiRecord *prec);
long (*linconv)(struct aiRecord *prec, int after);
} devAiCan = {
6,
NULL,
NULL,
init_ai,
get_ioint_info,
{
6,
NULL,
NULL,
init_ai,
get_ioint_info
},
read_ai,
special_linconv
};
@@ -117,8 +115,9 @@ static aiCanBus_t *firstBus;


static long init_ai (
struct aiRecord *prec
struct dbCommon *pcommon
) {
struct aiRecord *prec = (struct aiRecord *) pcommon;
aiCanPrivate_t *pcanAi;
aiCanBus_t *pbus;
int status;
@@ -257,9 +256,10 @@ static long init_ai (

static long get_ioint_info (
int cmd,
struct aiRecord *prec,
struct dbCommon *pcommon,
IOSCANPVT *ppvt
) {
struct aiRecord *prec = (struct aiRecord *) pcommon;
aiCanPrivate_t *pcanAi = prec->dpvt;

if (pcanAi->ioscanpvt == NULL) {
@@ -82,28 +82,26 @@ typedef struct aoCanBus_s {
int status;
} aoCanBus_t;

static long init_ao(struct aoRecord *prec);
static long get_ioint_info(int cmd, struct aoRecord *prec, IOSCANPVT *ppvt);
static long init_ao(struct dbCommon *prec);
static long get_ioint_info(int cmd, struct dbCommon *prec, IOSCANPVT *ppvt);
static long write_ao(struct aoRecord *prec);
static long special_linconv(struct aoRecord *prec, int after);
static void aoMessage(void *private, const canMessage_t *pmessage);
static void busSignal(void *private, int status);
static void busCallback(CALLBACK *pCallback);

struct {
long number;
DEVSUPFUN report;
DEVSUPFUN init;
DEVSUPFUN init_record;
DEVSUPFUN get_ioint_info;
DEVSUPFUN write_ao;
DEVSUPFUN special_linconv;
dset common;
long (*write_ao)(struct aoRecord *prec);
long (*linconv)(struct aoRecord *prec, int after);
} devAoCan = {
6,
NULL,
NULL,
init_ao,
get_ioint_info,
{
6,
NULL,
NULL,
init_ao,
get_ioint_info
},
write_ao,
special_linconv
};
@@ -113,8 +111,9 @@ static aoCanBus_t *firstBus;


static long init_ao (
struct aoRecord *prec
struct dbCommon *pcommon
) {
struct aoRecord *prec = (struct aoRecord *) pcommon;
aoCanPrivate_t *pcanAo;
aoCanBus_t *pbus;
int status;
@@ -238,9 +237,10 @@ static long init_ao (

static long get_ioint_info (
int cmd,
struct aoRecord *prec,
struct dbCommon *pcommon,
IOSCANPVT *ppvt
) {
struct aoRecord *prec = (struct aoRecord *) pcommon;
aoCanPrivate_t *pcanAo = prec->dpvt;

if (pcanAo->ioscanpvt == NULL) {
@@ -79,27 +79,25 @@ typedef struct biCanBus_s {
int status;
} biCanBus_t;

static long init_bi(struct biRecord *prec);
static long get_ioint_info(int cmd, struct biRecord *prec, IOSCANPVT *ppvt);
static long init_bi(struct dbCommon *prec);
static long get_ioint_info(int cmd, struct dbCommon *prec, IOSCANPVT *ppvt);
static long read_bi(struct biRecord *prec);
static void ProcessCallback(CALLBACK *pcallback);
static void biMessage(void *private, const canMessage_t *pmessage);
static void busSignal(void *private, int status);
static void busCallback(CALLBACK *pcallback);

struct {
long number;
DEVSUPFUN report;
DEVSUPFUN init;
DEVSUPFUN init_record;
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_bi;
dset common;
long (*read_bi)(struct biRecord *prec);
} devBiCan = {
5,
NULL,
NULL,
init_bi,
get_ioint_info,
{
5,
NULL,
NULL,
init_bi,
get_ioint_info
},
read_bi
};
epicsExportAddress(dset, devBiCan);
@@ -108,8 +106,9 @@ static biCanBus_t *firstBus;


static long init_bi (
struct biRecord *prec
struct dbCommon *pcommon
) {
struct biRecord *prec = (struct biRecord *) pcommon;
biCanPrivate_t *pcanBi;
biCanBus_t *pbus;
int status;
@@ -209,9 +208,10 @@ static long init_bi (

static long get_ioint_info (
int cmd,
struct biRecord *prec,
struct dbCommon *pcommon,
IOSCANPVT *ppvt
) {
struct biRecord *prec = (struct biRecord *) pcommon;
biCanPrivate_t *pcanBi = prec->dpvt;

if (pcanBi->ioscanpvt == NULL) {
@@ -54,28 +54,26 @@ Copyright (c) 1995-2000 Andrew Johnson


/* Create the dset for devBiTip810 */
static long init_bi(struct biRecord *prec);
static long init_bi(struct dbCommon *prec);
static long read_bi(struct biRecord *prec);

struct {
long number;
DEVSUPFUN report;
DEVSUPFUN init;
DEVSUPFUN init_record;
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_bi;
dset common;
long (*read_bi)(struct biRecord *prec);
} devBiTip810 = {
5,
NULL,
NULL,
init_bi,
NULL,
read_bi
{
5,
NULL,
NULL,
init_bi,
NULL
},
read_bi
};
epicsExportAddress(dset, devBiTip810);

static long init_bi(
struct biRecord *prec
struct dbCommon *pcommon
) {
static struct {
char *string;
@@ -92,6 +90,7 @@ static long init_bi(
{ NULL, 0 }
};

struct biRecord *prec = (struct biRecord *) pcommon;
char *canString;
char *name;
char separator;
@@ -76,26 +76,24 @@ typedef struct boCanBus_s {
int status;
} boCanBus_t;

static long init_bo(struct boRecord *prec);
static long get_ioint_info(int cmd, struct boRecord *prec, IOSCANPVT *ppvt);
static long init_bo(struct dbCommon *prec);
static long get_ioint_info(int cmd, struct dbCommon *prec, IOSCANPVT *ppvt);
static long write_bo(struct boRecord *prec);
static void boMessage(void *private, const canMessage_t *pmessage);
static void busSignal(void *private, int status);
static void busCallback(CALLBACK *pCallback);

struct {
long number;
DEVSUPFUN report;
DEVSUPFUN init;
DEVSUPFUN init_record;
DEVSUPFUN get_ioint_info;
DEVSUPFUN write_bo;
dset common;
long (*write_bo)(struct boRecord *prec);
} devBoCan = {
5,
NULL,
NULL,
init_bo,
get_ioint_info,
{
5,
NULL,
NULL,
init_bo,
get_ioint_info
},
write_bo
};
epicsExportAddress(dset, devBoCan);
@@ -104,8 +102,9 @@ static boCanBus_t *firstBus;


static long init_bo (
struct boRecord *prec
struct dbCommon *pcommon
) {
struct boRecord *prec = (struct boRecord *) pcommon;
boCanPrivate_t *pcanBo;
boCanBus_t *pbus;
int status;
@@ -192,9 +191,10 @@ static long init_bo (

static long get_ioint_info (
int cmd,
struct boRecord *prec,
struct dbCommon *pcommon,
IOSCANPVT *ppvt
) {
struct boRecord *prec = (struct boRecord *) pcommon;
boCanPrivate_t *pcanBo = prec->dpvt;

if (pcanBo->ioscanpvt == NULL) {
Oops, something went wrong.

0 comments on commit a7e0ff4

Please sign in to comment.