int picolcd_raw_cir(struct picolcd_data *data, struct hid_report *report, u8 *raw_data, int size)
{ unsignedlong flags; int i, w, sz; struct ir_raw_event rawir = {};
/* ignore if rc_dev is NULL or status is shunned */
spin_lock_irqsave(&data->lock, flags); if (!data->rc_dev || (data->status & PICOLCD_CIR_SHUN)) {
spin_unlock_irqrestore(&data->lock, flags); return1;
}
spin_unlock_irqrestore(&data->lock, flags);
/* PicoLCD USB packets contain 16-bit intervals in network order, *withvaluenegatedforpulse.Intervalsareinmicroseconds. * *Note:someuserspaceLIRCcodeforPicoLCDsaysnegatedvalues *forspace-isitamatterofIRchip?(pulseformyTSOP2236) * *Inaddition,thefirstintervalseemstobearound15000+base *intervalfornon-firstreportofIRdata-thusthequirkbelow *togetRC_CODEtounderstandSonyandJVCremotesIhaveathand
*/
sz = size > 0 ? min((int)raw_data[0], size-1) : 0; for (i = 0; i+1 < sz; i += 2) {
w = (raw_data[i] << 8) | (raw_data[i+1]);
rawir.pulse = !!(w & 0x8000);
rawir.duration = rawir.pulse ? (65536 - w) : w; /* Quirk!! - see above */ if (i == 0 && rawir.duration > 15000)
rawir.duration -= 15000;
ir_raw_event_store(data->rc_dev, &rawir);
}
ir_raw_event_handle(data->rc_dev);
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.