Re: Toggling GPIO at 38Khz

From: Chris Friesen
Date: Wed Oct 08 2008 - 13:00:32 EST


Jon Smirl wrote:

The existing LIRC driver for a serial port is here:
http://lirc.cvs.sourceforge.net/viewvc/lirc/lirc/drivers/lirc_serial/lirc_serial.c?view=markup

That driver basically does busy-wait bitbanging, using rdtsc on x86 if available or udelay() if not.

Your best bet is probably to use hrtimers combined with high res timestamps to correct for accumulated error.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/