}
#endif
-static int labpc_use_continuous_mode(const struct comedi_cmd *cmd,
- enum scan_mode mode)
+static bool labpc_use_continuous_mode(const struct comedi_cmd *cmd,
+ enum scan_mode mode)
{
- if (mode == MODE_SINGLE_CHAN)
- return 1;
-
- if (cmd->scan_begin_src == TRIG_FOLLOW)
- return 1;
+ if (mode == MODE_SINGLE_CHAN || cmd->scan_begin_src == TRIG_FOLLOW)
+ return true;
- return 0;
+ return false;
}
static unsigned int labpc_ai_convert_period(const struct comedi_cmd *cmd,
devpriv->cmd4 |= CMD4_ECLKRCV;
/* XXX should discard first scan when using interval scanning
* since manual says it is not synced with scan clock */
- if (labpc_use_continuous_mode(cmd, mode) == 0) {
+ if (!labpc_use_continuous_mode(cmd, mode)) {
devpriv->cmd4 |= CMD4_INTSCAN;
if (cmd->scan_begin_src == TRIG_EXT)
devpriv->cmd4 |= CMD4_EOIRCV;