Commit a699abfc authored by Federico Vaga's avatar Federico Vaga

wrtd:rt: fix typo bug in trig disable

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 6b648bfa
......@@ -115,7 +115,7 @@ static int __wrtd_out_trig_get(struct wrtd_desc *wrtd, uint32_t output,
trigger->latency_worst_us = (latency_worst + 124) / 125;
trigger->enabled = (state & HASH_ENT_DISABLED) ? 0 : 1;
trigger->enabled = !(state & HASH_ENT_DISABLED);
if (wrnc_msg_check_error(msg)) {
errno = EWRTD_INVALID_ANSWER_STATE;
......@@ -365,6 +365,7 @@ int wrtd_out_trig_get_all(struct wrtd_node *dev, unsigned int output,
{
int err, count = 0;
struct wrtd_trigger_handle handle = {0, 0, output};
/* Set ptr to 0 so that we get the first available */
if (output > FD_NUM_CHANNELS) {
errno = EWRTD_INVALID_CHANNEL;
......
......@@ -902,10 +902,10 @@ static inline void ctl_chan_enable_trigger (uint32_t seq, struct wrnc_msg *ibuf)
wrnc_msg_uint32(ibuf, (uint32_t *) &ent);
struct lrt_output_rule *rule = &ent->ocfg[ch];
if(enable)
if (enable)
rule->state &= ~HASH_ENT_DISABLED;
else
rule->state |= ~HASH_ENT_DISABLED;
rule->state |= HASH_ENT_DISABLED;
// fixme: purge pending pulses conditional pulses from the queue
ctl_ack(seq);
......
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