[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5637BFB5.6070706@hartkopp.net>
Date: Mon, 02 Nov 2015 20:55:33 +0100
From: Oliver Hartkopp <socketcan@...tkopp.net>
To: Aleksander Morgado <aleksander@...ksander.es>
CC: Marc Kleine-Budde <mkl@...gutronix.de>,
Marek Vasut <marex@...x.de>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Wolfgang Grandegger <wg@...ndegger.com>,
Andrew Lunn <andrew@...n.ch>,
Andrey Vostrikov <andrey.vostrikov@...entembedded.com>
Subject: Re: [RFC][PATCH] net: arinc429: Add ARINC-429 stack
On 11/02/2015 08:41 PM, Aleksander Morgado wrote:
> On Mon, Nov 2, 2015 at 12:14 PM, Oliver Hartkopp <socketcan@...tkopp.net> wrote:
>>
>> What about defining some overlay data structure to map ARINC-429 frames into
>> CAN frames?
>>
>> E.g. we could write the ARINC 32 bit data completely into data[0..3] and
>> additionally copy the 8 bit label information (or should it better be 10 bit
>> including the Source/Destination Identifiers?) additionally into the can_id.
>
> Note that the only bits which are always treated as non-data are the 8
> label bits (well, and the parity bit #31). The 2 SDI bits (#8, #9) may
> be used as data bits when a high resolution is needed, like Lat/Long
> encoded in binary words 310 and 311. I wouldn't make any assumption on
> what's on those 2 bits; i.e. they're not always "source/destination".
>
You definitely know these details better than me. That's why I'm asking.
Would hosting the 32 bit in the struct can_frame.data and just the 8 bit label
in struct can_frame.can_id offer the functionality you need?
Besides the arinc429_frame struct
struct arinc429_frame {
__u8 label; /* 8 bit label */
__u8 data[3]; /* Up-to 23 bits are valid. */
};
everything else roughly looks like copy&paste from PF_CAN with renaming.
So when we can fit the arinc frames into CAN frames and re-use the existing
CAN infrastructure - we are almost done.
Regards,
Oliver
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists