IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


CAN constants and data types


Detailed Description

This section describes constants and data types defined by the @CHIP-RTOS-PPC CAN API.

Data Structures

struct  CanFilter
struct  CanFilterSc2x3
struct  CanMsg

Defines

#define CAN_PORT_CAN1   0
 CAN1 port.
#define CAN_PORT_CAN2   1
 CAN2 port.
#define CAN_INIT_OPTION_PRIOS
 Use a normal and a high priority transmission queue.
#define CAN_INIT_OPTION_3_SAMPLE_POINTS
 Use three sample points.
#define CAN_INIT_OPTION_LOOP_BACK_MODE
 Switch controller into loop back mode.
#define CAN_INIT_OPTION_PASSIVE_MODE
 Switch controller into passive or listen-only mode.
#define CAN_FILTER_CONTROLLER_TYPE_SC2X3
 Constant representing the SC2x3 CAN controller.
#define CAN_MSG_MAX_LEN
 Constant representing the maximum length of CAN message data.

Typedefs

typedef int(* CanCallback )(CanEvent event, const CanMsg *msg)

Enumerations

enum  CanError {
  CAN_ERROR_NO = 0,
  CAN_ERROR_ILLEGAL_ARGUMENT = -1,
  CAN_ERROR_ILLEGAL_BAUDRATE = -2,
  CAN_ERROR_TIMEOUT = -3,
  CAN_ERROR_OUT_OF_MEMORY = -4,
  CAN_ERROR_OUT_OF_RESOURCES = -5,
  CAN_ERROR_QUEUE_MAX = -6
}
enum  CanFilterSc2x3Mode {
  CAN_FILTER_SC2X3_MODE_32_BIT = 0x00,
  CAN_FILTER_SC2X3_MODE_16_BIT = 0x01,
  CAN_FILTER_SC2X3_MODE_8_BIT = 0x02,
  CAN_FILTER_SC2X3_MODE_CLOSED = 0x03
}
enum  CanEvent {
  CAN_EVENT_RX = 0,
  CAN_EVENT_TX = 1,
  CAN_EVENT_BUS_OFF = 2,
  CAN_EVENT_OVERRUN = 3
}
enum  CanErrorState {
  CAN_ERROR_STATE_ACTIVE = 0,
  CAN_ERROR_STATE_WARNING = 1,
  CAN_ERROR_STATE_PASSIVE = 2,
  CAN_ERROR_STATE_BUS_OFF = 3
}





Top of page | Main page

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