www.beck-ipc.com

@CHIP-RTOS C Library V2.06 - CAN API


CAN_Reconfig

Adjust baud rate or bit timing parameters on an open CAN port.

int CAN_Reconfig ( unsigned int port_idx,

   const CAN_CONFIG far *config);

Parameters

port_idx

CAN port specifier:   CAN0_PORT = 0, or CAN1_PORT = 1

config

Pointer to a CAN_CONFIG data structure containing requested bit timing (baud) and control information set by caller.

Return Value

Error code -
CAN_EC_SUCCESS = 0:   Success, new settings were accepted.
CAN_EC_INVALID_PARAMS = -1:   port_idx or config pointer is invalid.
CAN_EC_INVALID_BAUD = -2:   Invalid baud rate or bit timing specification.
CAN_EC_PORT_NOT_OPENED = -3:   Port has not been opened.

Comments

This function allows bit timing to be adjusted on a CAN port which has already been opened.   (Under normal circumstances it is not expected that this function will be used.)

This function may also be used to manually switch back on a CAN bus following a bus off event.   By default, this is performed automatically by the driver.   However the user may specify a manual restart mode.

Inside this API the interrupts are masked for a short period and then re-enabled.   This function is reentrant.

See Also

RTOS API

This library function uses a dynamic link to reach the service offered by RTOS software interrupt.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3
    n/an/an/aV0.90

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.01

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document