Skip to contentSkip to conversation

accurate serial timestamp

DISCUSSION Anindha Parthy 1 participant 1 message Oct 30, 2006

lore
Share & tools
lore
#0 lore raw

Hello,

I would like to take a high accuracy timestamp whenever data is received on the serial port.

I think the best place to do this is in the tty_flip_buffer_push method of the tty_io.c file.

  2652 void tty_flip_buffer_push(struct tty_struct *tty)
  2653 {
  2654     if (tty->low_latency)
  2655         flush_to_ldisc((void *) tty);
  2656     else
  2657         schedule_delayed_work(&tty->flip.work, 1);
  2658 }

I would buffer the timestamps, and access them using an ioctl.

Is this the best way of doing this?

I am currently using the 2.6.15 kernel.

Regards,

Anindha