From: Martin Kozusky <mkozusky@kkmicro.cz>
To: linux-can@vger.kernel.org
Subject: Re: Flexcan - timestamp from message buffer to userspace
Date: Fri, 18 Oct 2013 12:55:29 +0200 [thread overview]
Message-ID: <526113A1.8020403@kkmicro.cz> (raw)
In-Reply-To: <l3r0ki$hde$1@ger.gmane.org>
Dne 18.10.2013 11:56, Martin Kozusky napsal(a):
> Hello,
> is there any official way how to read timestamp from flexcans message
> buffer?
> I see there is a macro defined FLEXCAN_MB_CNT_TIMESTAMP in flexcan.c,
> but not used.
> I would modify function flecan_read_fifo like
>
> + u32 timestamp = FLEXCAN_MB_CNT_TIMESTAMP(reg_ctrl);
sorry, u32 should be just u16
> but what to do with timestamp variable next and how to read it in
> userspace? :) I could change structure can_frame and add u32 timestamp
also u16, not u32
> into it, but it wouldn't be very nice hack I think.
>
> BTW: is timestamp read with SO_TIMESTAMP actualy taken when CAN message
> arrives?
>
> Thanks,
> Martin
>
next prev parent reply other threads:[~2013-10-18 11:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 9:56 Flexcan - timestamp from message buffer to userspace Martin Kozusky
2013-10-18 10:55 ` Martin Kozusky [this message]
2013-10-18 14:42 ` Oliver Hartkopp
2013-10-21 6:54 ` Martin Kozusky
2013-10-21 8:00 ` Wolfgang Grandegger
2013-10-21 8:11 ` Wolfgang Grandegger
2013-10-21 8:54 ` Martin Kozusky
2013-10-21 9:51 ` Martin Kozusky
2013-10-21 11:23 ` Wolfgang Grandegger
2013-10-21 16:29 ` Oliver Hartkopp
2013-10-22 12:22 ` Martin Kozusky
2013-10-22 19:36 ` Oliver Hartkopp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=526113A1.8020403@kkmicro.cz \
--to=mkozusky@kkmicro.cz \
--cc=linux-can@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.