Commit fd40a823 authored by Karol Adrianek's avatar Karol Adrianek

libwr2rf: added support for the 'NONE' debug signal ('libwr2rf_configure_lemo_debug()')

parent 8b124566
......@@ -1327,7 +1327,7 @@ libwr2rf_configure_lemo_debug(struct libwr2rf_dev *dev, unsigned lemo, unsigned
unsigned baddr = WR2RF_VME_REGS_INIT;
unsigned addr = 0;
if (dbg > LIBWR2RF_LEMO_DBG_WRS_SOFTSTART)
if (dbg > LIBWR2RF_LEMO_DBG_NONE)
return LIBWR2RF_ERROR_BAD_PARAM;
switch (lemo) {
......@@ -1352,8 +1352,9 @@ libwr2rf_configure_lemo_debug(struct libwr2rf_dev *dev, unsigned lemo, unsigned
default:
return LIBWR2RF_ERROR_BAD_ID;
}
libwr2rf_write16(dev, baddr + addr, (1 << dbg));
uint16_t val = (dbg == LIBWR2RF_LEMO_DBG_NONE) ? 0x0 : (1 << dbg);
libwr2rf_write16(dev, baddr + addr, val);
return 0;
}
......
......@@ -162,6 +162,8 @@ int libwr2rf_read_diag(struct libwr2rf_dev *dev, unsigned id,
#define LIBWR2RF_LEMO_DBG_WRS_RF_RST 11
#define LIBWR2RF_LEMO_DBG_WRS_SOFTSTOP 12
#define LIBWR2RF_LEMO_DBG_WRS_SOFTSTART 13
#define LIBWR2RF_LEMO_DBG_NONE 14
/* LEMO front panel debug selection */
int libwr2rf_configure_lemo_debug(struct libwr2rf_dev *dev,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment