\r
typedef struct FLEXCAN_tag flexcan_t;\r
\r
+#if defined(CFG_CAN_TEST)\r
+Can_TestType Can_Test;\r
+#endif\r
+\r
typedef enum {\r
CAN_UNINIT = 0, CAN_READY\r
} Can_DriverStateType;\r
#endif\r
//-------------------------------------------------------------------\r
\r
+#if defined(CFG_CAN_TEST)\r
+Can_TestType * Can_Arc_GetTestInfo( void ) {\r
+ return &Can_Test;\r
+}\r
+#endif\r
\r
/**\r
* Hardware error ISR for CAN\r
/*\r
* Tx\r
*/\r
+#if defined(CFG_CAN_TEST)\r
+ Can_Test.mbMaskTx |= mbMask;\r
+#endif\r
+\r
+\r
for (; mbMask; mbMask &= ~(1ull << mbNr)) {\r
mbNr = ilog2_64(mbMask);\r
\r
\r
uint64_t iFlag = *(uint64_t*) (&canHw->IFRH.R);\r
\r
+#if defined(CFG_CAN_TEST)\r
+ Can_Test.mbMaskRx |= iFlag & uPtr->Can_Arc_RxMbMask;\r
+#endif\r
+\r
while (iFlag & uPtr->Can_Arc_RxMbMask) {\r
\r
/* Find mailbox */\r
} Can_Arc_StatisticsType;\r
\r
\r
+#if defined(CFG_CAN_TEST)\r
+typedef struct {\r
+ uint64_t mbMaskTx;\r
+ uint64_t mbMaskRx;\r
+} Can_TestType;\r
+#endif\r
+\r
// uint16: if only Standard IDs are used\r
// uint32: if also Extended IDs are used\r
typedef uint32 Can_IdType;\r
void Can_MainFunction_Wakeup( void );\r
\r
void Can_Arc_GetStatistics( uint8 controller, Can_Arc_StatisticsType * stat);\r
+#if defined(CFG_CAN_TEST)\r
+Can_TestType *Can_Arc_GetTestInfo( void );\r
+#endif\r
+\r
\r
#endif /*CAN_H_*/\r