Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - libio-can.a & canctl documentation : (4 Items)
   
libio-can.a & canctl documentation  
Hi,

I"m looking into the CAN driver in the Freescale i.MX6Q Sabre Lite BSP, and I see that it uses a closed sourced libio-
can.a and its configured using a canctl tool.

Is there any documentation on the interface exposed by libio-can.a? There is the can.h header but I was hoping for some 
additional information on it.

Thanks!
Re: libio-can.a & canctl documentation  
Why was this post removed from the list of posts in the forum?
Re: libio-can.a & canctl documentation  
Hi,

I've looked for some libio-can documentatiion, but all I can find is the readme and use files under hardware/can/mx6x.  
Here are some additional details... 

The libio-can library contains the generic resource manager portion of the CAN driver.  It supports the initialization 
and standard I/O read() and write() calls, as well as the following devctl commands:

CAN_DEVCTL_SET_MID: Set the mailbox Message ID.
CAN_DEVCTL_SET_MFILTER: Set the mailbox Message filter.
CAN_DEVCTL_SET_PRIO:  Set the mailbox priority.
CAN_DEVCTL_SET_TIMESTAMP: Set the timestamp to be transmitted.
CAN_DEVCTL_DEBUG_INFO: Print out a dump of the CAN registers.
CAN_DEVCTL_GET_MID: Get the mailbox Message ID.
CAN_DEVCTL_GET_MFILTER: Get the mailbox Message filter.
case CAN_DEVCTL_GET_PRIO: Get the mailbox priority.
CAN_DEVCTL_GET_TIMESTAMP: Get the current timestamp time.
CAN_DEVCTL_READ_CANMSG_EXT: Read the next received frame
CAN_DEVCTL_ERROR: read current CAN errors

The canctl app can be viewed as a utility that demonstrates how to interface to the driver. It exercises these devctl 
calls.  For these devctl calls, the work is done in the device-specific portion of the driver (/hardware/can/mx6x).

I hope this helps!

Andre 
Re: libio-can.a & canctl documentation  
Thanks