linux

canSetBusOutputControl

Syntax


#include <canlib.h>
canStatus canSetBusOutputControl(int handle, unsigned int drivertype);

Description

This function sets the driver type for a CAN controller. 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.

Input Parameters

handle
A handle to an open circuit.
drivertype
Any one of the following values:
ValueMeaning
canDRIVER_NORMAL The "normal" driver type (push-pull). This is the default.
canDRIVER_SILENT Sets the CAN controller in Silent Mode; that is, it doesn't send anything, not even ACK bits, on the bus. Reception works as usual.
Output Parameters

None.

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

canGetBusOutputControl