IPC@CHIP® RTOS-LNX – API Documentation

Header image

Main page

◆ canInit()

CanError canInit ( unsigned  port,
unsigned  baudrate,
unsigned long  options 

This function initialises a CAN port. It can also be used to re-initialise an already opened port. But please note that in this case only the hardware settings (baud rate, etc.) will be applied. Software settings like the usage of a high priority transmission queue cannot be changed without closing the port before.

portNumber of the desired CAN port (0 stands for CAN1, etc.)
baudrateDesired baud rate in kHz
optionsThis parameter can be used to set a couple of options. Several of the following constants can be OR-ed:
One of the following codes:
See also
canInitEx, canDeinit
CanError result;
/* Initialise the CAN1 port at 50 kBaud, enable an additional high priority
* transmission queue, use three sample points
result = canInit(CAN_PORT_CAN1, 50,
if(result != CAN_ERROR_NO)
... // Error handling

Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Tue Jul 10 2018 14:54:14 by Doxygen 1.8.13