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

Moxa UC-8416-CE [43/48] Uc 8400 wince application development with the sdk and software libraries
UC-8400 WinCE Application Development with the SDK and Software Libraries
B-6
Function
int mxcan_set_bus_timing ( int fd, unsigned int speed);
Description This function set the bus timing of an open port.
Input <fd> Handle of the open port.
<speed> speed bus timing in kHz
Return
0 on success, otherwise returns a negative value.
Remarks
The speed should be 5, 10, 20, 40, 50, 80, 100, 125, 200, 250, 400, 500, 666, 800,
1000.
Function
unsigned int mxcan_get_bus_timing(int fd);
Description
This function get the bus timing of an open port.
Input <fd> Handle of the open port.
Return 0 on failure, otherwise the bus speed in KHz
Remarks
Function
int mxcan_purge_buffer( int fd, unsigned int purge);
Description This function purges the buffers of an open port.
Input <fd> Handle of the open port.
<purge> 1: receive data buffer, 2: transmit data buffer, otherwise: both
Return 0 on success, otherwise failure.
Remarks
Function
int mxcan_set_read_timeout(int fd, unsigned int to);
Description This function set data reading timeout of an open port.
Input <fd> Handle of the open port.
<to> timeout in milliseconds
Return 0 on success, otherwise failure.
Remarks
Function
int mxcan_set_write_timeout(int fd, unsigned int to);
Description This function set data writing timeout of an open port.
Input <fd> Handle of the open port.
<to> timeout in milliseconds
Return 0 on success, otherwise failure.
Remarks
Function
int mxcan_set_nonblocking(int fd);
Description This function set the open fd to be non-blocking.
Input <fd> Handle of the open port.
Return 0 on success, otherwise failure.
Remarks
Function
int mxcan_set_write_timeout(int fd, unsigned int to);
Description This function set data writing timeout of an open port
Input <fd> Handle of the open port.
<to> timeout in milliseconds
Return 0 on success, otherwise failure.
Remarks
Function
int mxcan_inqueue(int fd);
Description
This function get the number of received bytes that are queued.
Input <fd> Handle of the open port.
Return The number of bytes are queued.

Содержание

Скачать