IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


CAN functions


Detailed Description

This sections describes the various functions defined by the @CHIP-RTOS-PPC CAN API.

Here is what you need to get started:

Defines

#define canEncodeId(id, ext, rtr)
 Encode a CAN identifier.
#define canDecodeId(encodedId)
 Decode a CAN identifier.
#define canIdIsRtr(encodedId)
 Check if CAN ID is a Remote Transmission Request.
#define canIdIsExt(encodedId)
 Check if CAN ID is in extended format.

Functions

CanError canInit (unsigned port, unsigned baudrate, unsigned long options)
 Initialise CAN port.
CanError canInitEx (unsigned port, unsigned prescaler, unsigned timeSeg1, unsigned timeSeg2, unsigned syncJumpWidth, unsigned long options)
 Initialise CAN port (extended).
CanError canSetFilter (unsigned port, const CanFilter *filter)
 Set acceptance filters.
CanError canRegisterCallback (unsigned port, CanCallback callback, unsigned events)
 Register a user callback function.
CanError canDeinit (unsigned port)
 Deinitialise CAN port.
CanError canSend (unsigned port, const CanMsg *msg, BOOL prio)
 Send a CAN message.
CanError canRecv (unsigned port, CanMsg *msg, unsigned timeout)
 Receive a CAN message.
CanError canPeek (unsigned port, CanMsg *msg)
 Peek for the next CAN message.
CanError canEnableRx (unsigned port, BOOL enable)
 Enable/disable reception.
CanError canPurgeRx (unsigned port)
 Purge reception queue.
CanError canPurgeTx (unsigned port, BOOL prio)
 Purge transmission queue.
CanError canGetBaud (unsigned port, unsigned *baudrate, unsigned *prescaler, unsigned *timeSeg1, unsigned *timeSeg2, unsigned *syncJumpWidth)
 Determine baud rate.
CanError canGetErrorCounters (unsigned port, unsigned *rxErrors, unsigned *txErrors)
 Get error counter values.
CanError canGetErrorState (unsigned port, CanErrorState *errorState)
 Get error state of the CAN node.
CanError canGetNRxMsg (unsigned port, unsigned *nMsg)
 Get number of messages available in software receive queue.





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:36 2017 by Doxygen 1.6.1