]> rtime.felk.cvut.cz Git - arc.git/blobdiff - boards/ti_tms570ls/examples/tms570_hdk_can/config/CanIf_Cfg.h
Added an example of CAN communication for the TMS570LS31x HDK
[arc.git] / boards / ti_tms570ls / examples / tms570_hdk_can / config / CanIf_Cfg.h
diff --git a/boards/ti_tms570ls/examples/tms570_hdk_can/config/CanIf_Cfg.h b/boards/ti_tms570ls/examples/tms570_hdk_can/config/CanIf_Cfg.h
new file mode 100644 (file)
index 0000000..4e1a363
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+* Configuration of module: CanIf (CanIf_Cfg.h)\r
+*\r
+* Created by:              ArcCore\r
+* Copyright:               \r
+*\r
+* Configured for (MCU):    TMS570\r
+*\r
+* Module vendor:           ArcCore\r
+* Generator version:       2.0.6\r
+*\r
+* Generated by Arctic Studio (http://arccore.com) \r
+*/\r
+\r
+
+#if !(((CANIF_SW_MAJOR_VERSION == 1) && (CANIF_SW_MINOR_VERSION == 3)) )
+#error CanIf: Configuration file expected BSW module version to be 1.3.*
+#endif
+
+\r
+#ifndef CANIF_CFG_H_\r
+#define CANIF_CFG_H_\r
+\r
+#include "Can.h"\r
+\r
+\r
+#define CANIF_VERSION_INFO_API              STD_ON\r
+#define CANIF_DEV_ERROR_DETECT                     STD_OFF\r
+#define CANIF_DLC_CHECK                     STD_ON\r
+#define CANIF_ARC_RUNTIME_PDU_CONFIGURATION    STD_OFF\r
+#define CANIF_MULITPLE_DRIVER_SUPPORT       STD_OFF  // Not supported\r
+#define CANIF_READRXPDU_DATA_API                       STD_OFF  // Not supported\r
+#define CANIF_READRXPDU_NOTIFY_STATUS_API      STD_OFF  // Not supported\r
+#define CANIF_READTXPDU_NOTIFY_STATUS_API      STD_OFF  // Not supported\r
+#define CANIF_SETDYNAMICTXID_API            STD_OFF  // Not supported\r
+#define CANIF_WAKEUP_EVENT_API                     STD_OFF  // Not supported\r
+#define CANIF_TRANSCEIVER_API               STD_OFF  // Not supported\r
+#define CANIF_TRANSMIT_CANCELLATION         STD_OFF  // Not supported\r
+\r
+\r
+#define CANIF_PDU_ID_RX_PDU            0\r
+#define CANIF_PDU_ID_FreqReq   1\r
+\r
+#define CANIF_PDU_ID_TX_PDU            0\r
+#define CANIF_PDU_ID_FreqInd   1\r
+\r
+// Identifiers for the elements in CanIfControllerConfig[]\r
+// This is the ConfigurationIndex in CanIf_InitController()\r
+typedef enum {\r
+       CANIF_Channel_1_CONFIG_0,       // DCAN1\r
+       CANIF_Channel_2_CONFIG_0,       // DCAN2\r
+       CANIF_CHANNEL_CONFIGURATION_CNT\r
+} CanIf_Arc_ConfigurationIndexType;\r
+\r
+typedef enum {\r
+       CANIF_Channel_1,        // DCAN1\r
+       CANIF_Channel_2,        // DCAN2\r
+       CANIF_CHANNEL_CNT\r
+} CanIf_Arc_ChannelIdType;\r
+\r
+#define CANIF_CONTROLLER_ID_Controller_1       CANIF_Channel_1\r
+#define CANIF_CONTROLLER_ID_Controller_2       CANIF_Channel_2\r
+\r
+\r
+#include "CanIf_ConfigTypes.h"\r
+\r
+extern CanIf_ConfigType CanIf_Config;\r
+\r
+#endif\r
+\r