/* must be called with priv->lock held */ staticvoid img_ir_refresh_raw(struct img_ir_priv *priv, u32 irq_status)
{ struct img_ir_priv_raw *raw = &priv->raw; struct rc_dev *rc_dev = priv->raw.rdev; int multiple;
u32 ir_status;
/* find whether both rise and fall was detected */
multiple = ((irq_status & IMG_IR_IRQ_EDGE) == IMG_IR_IRQ_EDGE); /* *Ifso,weneedtoseeifthelevelhasactuallychanged. *Ifit'sjustnoisethatwedidn'thavetimetoprocess, *there'snopointreportingit.
*/
ir_status = img_ir_read(priv, IMG_IR_STATUS) & IMG_IR_IRRXD; if (multiple && ir_status == raw->last_status) return;
raw->last_status = ir_status;
/* report the edge to the IR raw decoders */ if (ir_status) /* low */
ir_raw_event_store_edge(rc_dev, false); else/* high */
ir_raw_event_store_edge(rc_dev, true);
ir_raw_event_handle(rc_dev);
}
/* called with priv->lock held */ void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status)
{ struct img_ir_priv_raw *raw = &priv->raw;
/* check not removing */ if (!raw->rdev) return;
img_ir_refresh_raw(priv, irq_status);
/* start / push back the echo timer */
mod_timer(&raw->timer, jiffies + msecs_to_jiffies(ECHO_TIMEOUT_MS));
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.