Moxa UC-8418-T-CE [44/48] Uc 8400 wince application development with the sdk and software libraries

Moxa UC-8410-T-CE [44/48] Uc 8400 wince application development with the sdk and software libraries
UC-8400 WinCE Application Development with the SDK and Software Libraries
B-7
Remarks
Function
int mxcan_outqueue(int fd);
Description This function get the number of bytes waiting for being transmitted to a CAN port.
Input <fd> Handle of the open port.
Return The number of bytes are queued.
Remarks
Function
int mxcan_get_parameters( int fd, CANPRM *param);
Description This function get the parameter of an open port.
Input <fd> Handle of the open port.
<param> pointer to a structure of CANPRM
Return 0 on success. Otherwise return a negative value
Remarks
Function
int mxcan_set_parameters( int fd, CANPRM *param);
Description This function set the parameter of an open port.
Input <fd> Handle of the open port.
<param> pointer to a structure of CANPRM
Return 0 on success. Otherwise return a negative value.
Remarks
Function
int mxcan_get_stat(int fd, CANBST *stat);
Description This function get the statistics of an open port.
Input <fd> Handle of the open port.
<stat> point to a container of statistics
Return 0 on success, otherwise failure
Remarks The CAN bus statistics never reset except system reboot or driver unloaded.
Function
int mxcan_get_registers ( int fd, unsigned char *buffer, int num);
Description
This function get the register values of an open port.
Input <fd> Handle of the open port.
<buffer> point to a buffer for these values
<num> number of register values. For module with sja1000 chipset, the value
must be 32.
Return 0 on success, otherwise failure.
Remarks
Structure of CANMSG
typedef struct _CANMSG
{
unsigned int identifier;
unsigned int flags;
unsigned int length; /* the length of data */
unsigned char data[8];
} CANMSG;
Structure of CANPRM:
typedef struct _CANPRM
{
unsigned int bus_timing; /* the bus speed in kHz (32-bit integer), default is 1000
*/

Содержание

Скачать