From 69d4ffc9e80f8851e25602c6e51b5193e93df4db Mon Sep 17 00:00:00 2001 From: sluiter Date: Mon, 8 Feb 2016 16:54:39 -0600 Subject: [PATCH] Error check for invalid IRQ=1 value. --- README | 6 ++++++ motorApp/OmsSrc/drvMAXv.cc | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README b/README index a3849d8b..ca754d46 100644 --- a/README +++ b/README @@ -213,6 +213,12 @@ Modification Log for R6-10 Files modified: motor_init_record_com() in MotorSrc/motordevCom.cc init_controller() in MotorSrc/devMotorAsyn.c +7) The MAXv User's Manual specifies that "The IRQ interrupt level range is + 0x010-0x111 (IRQ2-7)...". The appropriate error check has been added to + the MAXvSetup() call. + + File modified: OmsSrc/drvMAXv.cc + Modification Log for R6-9 ========================= diff --git a/motorApp/OmsSrc/drvMAXv.cc b/motorApp/OmsSrc/drvMAXv.cc index 76af266e..97cb849f 100644 --- a/motorApp/OmsSrc/drvMAXv.cc +++ b/motorApp/OmsSrc/drvMAXv.cc @@ -93,6 +93,7 @@ USAGE... Motor record driver level support for OMS model MAXv. * command into two commands. * - Fix for intermittent wrong command displayed from Command Error message. motorIsr() saves the * message in a separate static buffer. + * 26 11-05-13 rls - Valid IRQ levels are 2 thru 6. * */ @@ -891,7 +892,7 @@ MAXvSetup(int num_cards, /* maximum number of cards in rack */ int addrs_type, /* VME address type; 16 - A16, 24 - A24 or 32 - A32. */ unsigned int addrs, /* Base Address. */ unsigned int vector, /* noninterrupting(0), valid vectors(64-255) */ - int int_level, /* interrupt level (1-6) */ + int int_level, /* interrupt level (2-6) */ int scan_rate) /* 1 <= polling rate <= (1/epicsThreadSleepQuantum) */ { int itera; @@ -991,9 +992,9 @@ MAXvSetup(int num_cards, /* maximum number of cards in rack */ } } - if (int_level < 1 || int_level > 6) + if (int_level < 2 || int_level > 6) { - char format[] = "%sinterrupt level = %d ***\n"; + char format[] = "%sinterrupt level = %d *** default = 5\n"; omsInterruptLevel = OMS_INT_LEVEL; errlogPrintf(format, errbase, int_level); epicsThreadSleep(5.0);