forked from epics_driver_modules/motorBase
Using EPICS portable typedefs.
This commit is contained in:
@@ -3,9 +3,9 @@ FILENAME... drvIM483PL.c
|
||||
USAGE... Motor record driver level support for Intelligent Motion
|
||||
Systems, Inc. IM483(I/IE).
|
||||
|
||||
Version: $Revision: 1.2 $
|
||||
Version: $Revision: 1.3 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2001-10-02 22:44:11 $
|
||||
Last Modified: $Date: 2001-12-14 20:49:10 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -335,7 +335,7 @@ STATIC int set_status(int card, int signal)
|
||||
{
|
||||
motor_info->position = NINT(motorData);
|
||||
if (motor_state[card]->motor_info[signal].encoder_present == YES)
|
||||
motor_info->encoder_position = (int32_t) motorData;
|
||||
motor_info->encoder_position = (epicsInt32) motorData;
|
||||
else
|
||||
motor_info->encoder_position = 0;
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ FILENAME... drvIM483SM.c
|
||||
USAGE... Motor record driver level support for Intelligent Motion
|
||||
Systems, Inc. IM483(I/IE).
|
||||
|
||||
Version: $Revision: 1.2 $
|
||||
Version: $Revision: 1.3 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2001-10-02 22:42:36 $
|
||||
Last Modified: $Date: 2001-12-14 20:49:11 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -336,7 +336,7 @@ STATIC int set_status(int card, int signal)
|
||||
{
|
||||
motor_info->position = NINT(motorData);
|
||||
if (motor_state[card]->motor_info[signal].encoder_present == YES)
|
||||
motor_info->encoder_position = (int32_t) motorData;
|
||||
motor_info->encoder_position = (epicsInt32) motorData;
|
||||
else
|
||||
motor_info->encoder_position = 0;
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ FILENAME... motordrvCom.h
|
||||
USAGE... This file contains definitions and structures that
|
||||
are common to all motor record driver support modules.
|
||||
|
||||
Version: $Revision: 1.6 $
|
||||
Version: $Revision: 1.7 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2001-10-02 22:52:27 $
|
||||
Last Modified: $Date: 2001-12-14 20:48:00 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -149,7 +149,7 @@ struct irqdatastr /* Used only for VME44. */
|
||||
{
|
||||
/* Interrupt Handling control elements */
|
||||
int irqErrno; /* Error indicator from isr */
|
||||
uint8_t irqEnable;
|
||||
epicsUInt8 irqEnable;
|
||||
RING_ID recv_rng; /* message receiving control */
|
||||
SEM_ID recv_sem;
|
||||
RING_ID send_rng; /* message transmitting control */
|
||||
@@ -160,9 +160,9 @@ struct mess_info
|
||||
{
|
||||
struct mess_node *motor_motion; /* in motion, NULL/node */
|
||||
int encoder_present; /* one YES/NO for each axis */
|
||||
int32_t position; /* one pos for each axis */
|
||||
int32_t encoder_position; /* one pos for each axis */
|
||||
int32_t velocity; /* Raw velocity readback(not implemented) */
|
||||
epicsInt32 position; /* one pos for each axis */
|
||||
epicsInt32 encoder_position; /* one pos for each axis */
|
||||
epicsInt32 velocity; /* Raw velocity readback(not implemented) */
|
||||
int no_motion_count;
|
||||
ULONG status_delay; /* Insure 10ms delay between motion/velocity
|
||||
* commands and status query. */
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
FILENAME... drvMM3000.c
|
||||
USAGE... Motor record driver level support for Newport MM3000.
|
||||
|
||||
Version: $Revision: 1.6 $
|
||||
Version: $Revision: 1.7 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2001-10-02 22:39:11 $
|
||||
Last Modified: $Date: 2001-12-14 20:50:31 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -380,9 +380,9 @@ STATIC int set_status(int card, int signal)
|
||||
motor_info->no_motion_count++;
|
||||
else
|
||||
{
|
||||
motor_info->position = (int32_t) motorData;
|
||||
motor_info->position = (epicsInt32) motorData;
|
||||
if (motor_state[card]->motor_info[signal].encoder_present == YES)
|
||||
motor_info->encoder_position = (int32_t) motorData;
|
||||
motor_info->encoder_position = (epicsInt32) motorData;
|
||||
else
|
||||
motor_info->encoder_position = 0;
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
FILENAME... drvMM4000.c
|
||||
USAGE... Motor record driver level support for Newport MM4000.
|
||||
|
||||
Version: $Revision: 1.7 $
|
||||
Version: $Revision: 1.8 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2001-10-02 22:17:59 $
|
||||
Last Modified: $Date: 2001-12-14 20:50:33 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -403,7 +403,7 @@ STATIC int set_status(int card, int signal)
|
||||
{
|
||||
motor_info->position = NINT(motorData);
|
||||
if (motor_state[card]->motor_info[signal].encoder_present == YES)
|
||||
motor_info->encoder_position = (int32_t) motorData;
|
||||
motor_info->encoder_position = (epicsInt32) motorData;
|
||||
else
|
||||
motor_info->encoder_position = 0;
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ FILENAME... drvMMCom.h
|
||||
USAGE... This file contains Newport Motion Master (MM) driver "include"
|
||||
information that is specific to Motion Master models 3000/4000.
|
||||
|
||||
Version: $Revision: 1.4 $
|
||||
Version: $Revision: 1.5 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2001-10-02 22:19:30 $
|
||||
Last Modified: $Date: 2001-12-14 20:50:34 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -88,7 +88,7 @@ struct MMcontroller
|
||||
/* Motor status response for MM[3000/4000/4005]. */
|
||||
typedef union
|
||||
{
|
||||
uint8_t All;
|
||||
epicsUInt8 All;
|
||||
struct
|
||||
{
|
||||
BOOLEAN bit7 :1; /* Bit #7 N/A. */
|
||||
|
||||
@@ -328,7 +328,7 @@ STATIC int set_status(int card, int signal)
|
||||
{
|
||||
motor_info->position = NINT(motorData);
|
||||
if (motor_state[card]->motor_info[signal].encoder_present == YES)
|
||||
motor_info->encoder_position = (int32_t) motorData;
|
||||
motor_info->encoder_position = (epicsInt32) motorData;
|
||||
else
|
||||
motor_info->encoder_position = 0;
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
FILENAME... drvOms.c
|
||||
USAGE... Driver level support for OMS models VME8, VME44 and VS4.
|
||||
|
||||
Version: $Revision: 1.6 $
|
||||
Version: $Revision: 1.7 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2001-07-24 18:23:50 $
|
||||
Last Modified: $Date: 2001-12-14 20:52:56 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -125,7 +125,7 @@ extern long locationProbe(epicsAddressType, char *);
|
||||
/* --- Local data common to all OMS drivers. --- */
|
||||
STATIC char *oms_addrs = 0x0;
|
||||
STATIC volatile unsigned omsInterruptVector = 0;
|
||||
STATIC volatile uint8_t omsInterruptLevel = OMS_INT_LEVEL;
|
||||
STATIC volatile epicsUInt8 omsInterruptLevel = OMS_INT_LEVEL;
|
||||
STATIC volatile int max_io_tries = MAX_COUNT;
|
||||
STATIC volatile int motionTO = 10;
|
||||
STATIC char oms_axis[] = {'X', 'Y', 'Z', 'T', 'U', 'V', 'R', 'S'};
|
||||
@@ -305,7 +305,7 @@ STATIC int set_status(int card, int signal)
|
||||
int temp;
|
||||
|
||||
sscanf(p, "%i", &temp);
|
||||
motor_info->encoder_position = (int32_t) temp;
|
||||
motor_info->encoder_position = (epicsInt32) temp;
|
||||
}
|
||||
break;
|
||||
case 3: /* encoder status */
|
||||
@@ -721,9 +721,9 @@ STATIC void motorIsr(int card)
|
||||
{
|
||||
volatile struct controller *pmotorState;
|
||||
volatile struct vmex_motor *pmotor;
|
||||
uint8_t control;
|
||||
uint8_t status;
|
||||
uint8_t doneFlags;
|
||||
epicsUInt8 control;
|
||||
epicsUInt8 status;
|
||||
epicsUInt8 doneFlags;
|
||||
char dataChar;
|
||||
|
||||
if (card >= total_cards || (pmotorState = motor_state[card]) == NULL)
|
||||
@@ -757,7 +757,7 @@ STATIC void motorIsr(int card)
|
||||
/* If command error is present - clear it */
|
||||
if (status & STAT_ERROR)
|
||||
{
|
||||
pmotor->data = (uint8_t) CMD_CLEAR;
|
||||
pmotor->data = (epicsUInt8) CMD_CLEAR;
|
||||
|
||||
/* Send null character to indicate error */
|
||||
if (drvOMSdebug >= 1)
|
||||
@@ -803,7 +803,7 @@ STATIC int motorIsrEnable(int card)
|
||||
volatile struct controller *pmotorState;
|
||||
volatile struct vmex_motor *pmotor;
|
||||
long status;
|
||||
uint8_t cardStatus;
|
||||
epicsUInt8 cardStatus;
|
||||
|
||||
Debug(5, "motorIsrEnable: Entry card#%d\n", card);
|
||||
|
||||
|
||||
+13
-13
@@ -3,9 +3,9 @@ FILENAME... drvOms.h
|
||||
USAGE... This file contains OMS driver "include" information that is
|
||||
specific to OMS models VME8 and VME44.
|
||||
|
||||
Version: $Revision: 1.1 $
|
||||
Version: $Revision: 1.2 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2000-02-08 22:19:02 $
|
||||
Last Modified: $Date: 2001-12-14 20:52:57 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -79,17 +79,17 @@ Last Modified: $Date: 2000-02-08 22:19:02 $
|
||||
|
||||
struct vmex_motor
|
||||
{
|
||||
uint8_t unused0;
|
||||
uint8_t data;
|
||||
uint8_t unused1;
|
||||
uint8_t done;
|
||||
uint8_t unused2;
|
||||
uint8_t control;
|
||||
uint8_t unused3;
|
||||
uint8_t status;
|
||||
uint8_t unused4;
|
||||
uint8_t vector;
|
||||
uint8_t unused5[6];
|
||||
epicsUInt8 unused0;
|
||||
epicsUInt8 data;
|
||||
epicsUInt8 unused1;
|
||||
epicsUInt8 done;
|
||||
epicsUInt8 unused2;
|
||||
epicsUInt8 control;
|
||||
epicsUInt8 unused3;
|
||||
epicsUInt8 status;
|
||||
epicsUInt8 unused4;
|
||||
epicsUInt8 vector;
|
||||
epicsUInt8 unused5[6];
|
||||
};
|
||||
|
||||
#endif /* INCdrvOmsh */
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
FILENAME... drvOms58.c
|
||||
USAGE... Motor record driver level support for OMS model VME58.
|
||||
|
||||
Version: $Revision: 1.5 $
|
||||
Version: $Revision: 1.6 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2001-06-19 18:25:10 $
|
||||
Last Modified: $Date: 2001-12-14 20:52:59 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -138,7 +138,7 @@ volatile int drvOms58debug = 0;
|
||||
/* --- Local data common to all OMS drivers. --- */
|
||||
STATIC char *oms_addrs = 0x0;
|
||||
STATIC volatile unsigned omsInterruptVector = 0;
|
||||
STATIC volatile uint8_t omsInterruptLevel = OMS_INT_LEVEL;
|
||||
STATIC volatile epicsUInt8 omsInterruptLevel = OMS_INT_LEVEL;
|
||||
STATIC volatile int max_io_tries = MAX_COUNT;
|
||||
STATIC volatile int motionTO = 10;
|
||||
STATIC char oms58_axis[] = {'X', 'Y', 'Z', 'T', 'U', 'V', 'R', 'S'};
|
||||
@@ -311,7 +311,7 @@ STATIC int set_status(int card, int signal)
|
||||
volatile struct vmex_motor *pmotor;
|
||||
CNTRL_REG cntrlReg;
|
||||
volatile MOTOR_DATA_REGS *pmotorData;
|
||||
int32_t motorData;
|
||||
epicsInt32 motorData;
|
||||
/* Message parsing variables */
|
||||
char *p, *tok_save;
|
||||
struct axis_status *ax_stat;
|
||||
@@ -487,8 +487,8 @@ STATIC int set_status(int card, int signal)
|
||||
STATIC int send_mess(int card, char const *com, char inchar)
|
||||
{
|
||||
volatile struct vmex_motor *pmotor;
|
||||
int16_t putIndex;
|
||||
int16_t deltaIndex;
|
||||
epicsInt16 putIndex;
|
||||
epicsInt16 deltaIndex;
|
||||
char outbuf[MAX_MSG_SIZE], *p;
|
||||
int return_code;
|
||||
|
||||
@@ -594,7 +594,7 @@ STATIC int send_mess(int card, char const *com, char inchar)
|
||||
STATIC int recv_mess(int card, char *com, int amount)
|
||||
{
|
||||
volatile struct vmex_motor *pmotor;
|
||||
int16_t getIndex;
|
||||
epicsInt16 getIndex;
|
||||
int i, trys;
|
||||
char junk;
|
||||
unsigned char inchar;
|
||||
@@ -771,7 +771,7 @@ STATIC void motorIsr(int card)
|
||||
volatile struct controller *pmotorState;
|
||||
volatile struct vmex_motor *pmotor;
|
||||
STATUS_REG statusBuf;
|
||||
uint8_t doneFlags, userIO, slipFlags, limitFlags, cntrlReg;
|
||||
epicsUInt8 doneFlags, userIO, slipFlags, limitFlags, cntrlReg;
|
||||
|
||||
if (card >= total_cards || (pmotorState = motor_state[card]) == NULL)
|
||||
{
|
||||
@@ -804,7 +804,7 @@ STATIC void motorIsr(int card)
|
||||
/* Assure proper control register settings */
|
||||
cntrlReg = pmotor->control.cntrlReg;
|
||||
if ((cntrlReg & 0x01) == 0)
|
||||
pmotor->control.cntrlReg = (uint8_t) 0x90;
|
||||
pmotor->control.cntrlReg = (epicsUInt8) 0x90;
|
||||
/* Questioniable Fix for undefined problem Ends Here. */
|
||||
|
||||
if (drvOms58debug >= 10)
|
||||
|
||||
+36
-36
@@ -3,9 +3,9 @@ FILENAME... drvOms58.h
|
||||
USAGE... OMS driver level "include" information that is specific to OMS
|
||||
model VME58.
|
||||
|
||||
Version: $Revision: 1.2 $
|
||||
Version: $Revision: 1.3 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2001-08-22 18:46:12 $
|
||||
Last Modified: $Date: 2001-12-14 20:53:00 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -87,7 +87,7 @@ typedef struct
|
||||
/* Control Register - Offset = 0x0FE1 */
|
||||
typedef union
|
||||
{
|
||||
uint8_t All;
|
||||
epicsUInt8 All;
|
||||
struct
|
||||
{
|
||||
unsigned int intReqEna :1; /* Master interrupt request enable */
|
||||
@@ -104,7 +104,7 @@ typedef union
|
||||
/* Status Register - Offset = 0x0FE3 */
|
||||
typedef union
|
||||
{
|
||||
uint8_t All;
|
||||
epicsUInt8 All;
|
||||
struct
|
||||
{
|
||||
unsigned int interrupt :1; /* Interrupt dectect */
|
||||
@@ -121,7 +121,7 @@ typedef union
|
||||
/* I/O Register(0-7) - Offset = 0x0FE5 */
|
||||
typedef union
|
||||
{
|
||||
uint8_t All;
|
||||
epicsUInt8 All;
|
||||
struct
|
||||
{
|
||||
unsigned int io_7 :1; /* Bit 7 */
|
||||
@@ -138,7 +138,7 @@ typedef union
|
||||
/* Slip Flag Register - Offset = 0x0FE7 */
|
||||
typedef union
|
||||
{
|
||||
uint8_t All;
|
||||
epicsUInt8 All;
|
||||
struct
|
||||
{
|
||||
unsigned int slip_s :1; /* status of S axis */
|
||||
@@ -155,7 +155,7 @@ typedef union
|
||||
/* Done Flag Register - Offset = 0x0FE9 */
|
||||
typedef union
|
||||
{
|
||||
uint8_t All;
|
||||
epicsUInt8 All;
|
||||
struct
|
||||
{
|
||||
unsigned int done_s :1; /* status of S axis */
|
||||
@@ -172,7 +172,7 @@ typedef union
|
||||
/* I/O High Register(8-13) - Offset = 0x0FEB */
|
||||
typedef union
|
||||
{
|
||||
uint8_t All;
|
||||
epicsUInt8 All;
|
||||
struct
|
||||
{
|
||||
unsigned int :1; /* Unused */
|
||||
@@ -190,7 +190,7 @@ typedef union
|
||||
/* Limit Switch Status Register - Offset = 0x0FED */
|
||||
typedef union
|
||||
{
|
||||
uint8_t All;
|
||||
epicsUInt8 All;
|
||||
struct
|
||||
{
|
||||
unsigned int limit_s :1; /* status of S axis */
|
||||
@@ -207,7 +207,7 @@ typedef union
|
||||
/* Home Switch Status Register - Offset = 0x0FEF */
|
||||
typedef union
|
||||
{
|
||||
uint8_t All;
|
||||
epicsUInt8 All;
|
||||
struct
|
||||
{
|
||||
unsigned int home_s :1; /* status of S axis */
|
||||
@@ -223,39 +223,39 @@ typedef union
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t unused00;
|
||||
uint8_t cntrlReg; /* Control Register - Read/Write */
|
||||
uint8_t unused02;
|
||||
uint8_t statusReg; /* Status Register - Read */
|
||||
uint8_t unused04;
|
||||
uint8_t ioLowReg; /* IO bits 0-7 status register - Read */
|
||||
uint8_t unused06;
|
||||
uint8_t slipReg; /* Encoder slip status register - Read */
|
||||
uint8_t unused08;
|
||||
uint8_t doneReg; /* Axis done status register - Read */
|
||||
uint8_t unused0A;
|
||||
uint8_t ioHighReg; /* IO bits 8-13 status register - Read */
|
||||
uint8_t unused0C;
|
||||
uint8_t limitReg; /* Limit switch status register - Read */
|
||||
uint8_t unused0E;
|
||||
uint8_t homeReg; /* Home switch status register - Read */
|
||||
uint8_t unusedF0;
|
||||
uint8_t intVector; /* Interrupt vector */
|
||||
epicsUInt8 unused00;
|
||||
epicsUInt8 cntrlReg; /* Control Register - Read/Write */
|
||||
epicsUInt8 unused02;
|
||||
epicsUInt8 statusReg; /* Status Register - Read */
|
||||
epicsUInt8 unused04;
|
||||
epicsUInt8 ioLowReg; /* IO bits 0-7 status register - Read */
|
||||
epicsUInt8 unused06;
|
||||
epicsUInt8 slipReg; /* Encoder slip status register - Read */
|
||||
epicsUInt8 unused08;
|
||||
epicsUInt8 doneReg; /* Axis done status register - Read */
|
||||
epicsUInt8 unused0A;
|
||||
epicsUInt8 ioHighReg; /* IO bits 8-13 status register - Read */
|
||||
epicsUInt8 unused0C;
|
||||
epicsUInt8 limitReg; /* Limit switch status register - Read */
|
||||
epicsUInt8 unused0E;
|
||||
epicsUInt8 homeReg; /* Home switch status register - Read */
|
||||
epicsUInt8 unusedF0;
|
||||
epicsUInt8 intVector; /* Interrupt vector */
|
||||
} MOTOR_CNTRL_REGS;
|
||||
|
||||
|
||||
/* OMS VME dual port memory map */
|
||||
struct vmex_motor
|
||||
{
|
||||
int16_t inPutIndex;
|
||||
int16_t outGetIndex;
|
||||
int16_t inBuffer[BUFFER_SIZE];
|
||||
int16_t reserved0[254];
|
||||
epicsInt16 inPutIndex;
|
||||
epicsInt16 outGetIndex;
|
||||
epicsInt16 inBuffer[BUFFER_SIZE];
|
||||
epicsInt16 reserved0[254];
|
||||
MOTOR_DATA_REGS data[OMS_NUM_CHANNELS];
|
||||
int16_t outPutIndex;
|
||||
int16_t inGetIndex;
|
||||
int16_t outBuffer[BUFFER_SIZE];
|
||||
int16_t reserved1[750];
|
||||
epicsInt16 outPutIndex;
|
||||
epicsInt16 inGetIndex;
|
||||
epicsInt16 outBuffer[BUFFER_SIZE];
|
||||
epicsInt16 reserved1[750];
|
||||
MOTOR_CNTRL_REGS control;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user