CANpie FD
CAN programming interface environment - Version 3.08
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Modules Pages
Macros
CANpie configuration options

Macros

#define CP_AUTOBAUD   0
 
#define CP_BUFFER_MAX   8
 
#define CP_CAN_FD   0
 
#define CP_CAN_MSG_MACRO   1
 
#define CP_CAN_MSG_MARKER   0
 
#define CP_CAN_MSG_TIME   0
 
#define CP_CAN_MSG_USER   1
 
#define CP_CHANNEL_MAX   1
 
#define CP_SMALL_CODE   0
 
#define CP_STATISTIC   0
 

Detailed Description

If symbols are not defined, they get a default value which is assigned in the canpie.h header file.

Macro Definition Documentation

◆ CP_AUTOBAUD

#define CP_AUTOBAUD   0

This symbol enables or disables the automatic bit-rate detection feature of the CAN driver. The default value is 0 (disabled).

  • 0 = disable bit-rate detection (not supported by hardware)
  • 1 = enable bit-rate detection

◆ CP_BUFFER_MAX

#define CP_BUFFER_MAX   8

This symbol defines the number of message buffers (mailboxes) of a CAN controller. In case the controller has no message buffers, it is also possible to emulate these. A value of 0 is not allowed for this symbol.

◆ CP_CAN_FD

#define CP_CAN_FD   0

This symbol defines if ISO CAN FD support is enabled.

  • 0 = disable ISO CAN FD support
  • 1 = enable ISO CAN FD support

◆ CP_CAN_MSG_MACRO

#define CP_CAN_MSG_MACRO   1

This symbol defines if access to the CAN message structure CpCanMsg_s is done via macros or via functions.

  • 0 = access via functions
  • 1 = access via macros

◆ CP_CAN_MSG_MARKER

#define CP_CAN_MSG_MARKER   0

This symbol defines if the CAN message structure CpCanMsg_s has a marker field.

  • 0 = no marker field (not supported by hardware / driver)
  • 1 = include marker field

◆ CP_CAN_MSG_TIME

#define CP_CAN_MSG_TIME   0

This symbol defines if the CAN message structure CpCanMsg_s has a time-stamp field.

  • 0 = no time-stamp field (not supported by hardware / driver)
  • 1 = include time-stamp field

◆ CP_CAN_MSG_USER

#define CP_CAN_MSG_USER   1

This symbol defines if the CAN message structure CpCanMsg_s has a user-defined field.

  • 0 = no user-defined field (not supported by driver)
  • 1 = include user-defined field

◆ CP_CHANNEL_MAX

#define CP_CHANNEL_MAX   1

This symbol defines the total number of physical CAN interfaces supported by the driver. For a LPC2294 microcontroller the value would be 4 (4 CAN channels).

◆ CP_SMALL_CODE

#define CP_SMALL_CODE   0

This symbol is used to control the usage of the ptsPortV parameter in the core functions during compilation time. For microcontrollers with small resources and only one CAN channel the port parameter can be omitted.

  • 0 = use ptsPortV parameter in core functions
  • 1 = do not use ptsPortV parameter in core functions

◆ CP_STATISTIC

#define CP_STATISTIC   0

This symbol defines if the driver support statistic information. A value of 0 denotes that no statistic information is available. This also means that the function CpCoreStatistic() returns the error code eCP_ERR_NOT_SUPPORTED.

  • 0 = no statistic information (not supported by driver)
  • 1 = enable statistic information