Using DLC or data byte count in frame in a CAN driver API
Heinz-Jürgen Oertel <[email protected]>
| Newsgroups | gmane.comp.hardware.bus.can |
|---|---|
| Organization | privat |
| Message-ID | <2418281.8HE0FQ9XXY@linux-edhj> |
Hello,
currently some of us working already on integrating CAN FD
in different CAN device driver software.
In the past we had the Data Length Code DLC,
which was a one to one translation to the number of bytes in a CAN frame.
This was used in the API for receiving and transmitting CAN frames.
With CAN FD that is more tricky.
There is the following relationship:
DLC bytes
-------------------
0 0
1 1
...
8 8
9 12
10 16
11 20
12 24
13 32
14 48
15 64
The question is now:
- should we still use the DLC
when exchanging data between user application and driver
- should we use a 'length' as number of bytes
- or both, (but who takes care that both fit together?)
Any suggestions and ideas are welcome.
May be some of you are later working with such kind of software.
It's on you to define the interface.
Regards
Heinz
--
Archives and useful links: http://groups.yahoo.com/group/CANbus
Subscribe and unsubscribe at www.vector.com/canlist/
Report any problems to <[email protected]>