linux

canGetBusOutputControl

Syntax


#include <canlib.h>
canStatus canGetBusOutputControl(
   const int hnd, 
   unsigned int * drivertype
);

Description

This function retrieves the current CAN controller driver type. This corresponds loosely to the bus output control register in the CAN controller, hence the name of this function. CANLIB32 does not allow for direct manipulation of the bus output control register; instead, symbolic constants are used to select the desired driver type.

Parameters

hnd
An open handle to a CAN circuit.
driverType
A pointer to an unsigned int which receives the current driver type. The driver type can be either canDRIVER_NORMAL or canDRIVER_SILENT.
Return Value

canOK (zero) if success
canERR_xxx (negative) if failure.

Notes

Don't confuse the CAN controller driver type with the bus driver type. The CAN controller is not connected directly to the CAN bus; instead, it is connected to a bus transceiver circuit which interfaces directly to the bus. The "CAN controller driver type" we are talking about here refers to the mode which the CAN controller uses to drive the bus transceiver circuit. CANLIB supports two different modes:

Note that Silent Mode is not supported by all CAN controllers.

Related Topics

canSetBusOutputControl