Блок счётчиков для ошибок CAN.
This commit is contained in:
41
Core/Inc/canerrorbox.h
Normal file
41
Core/Inc/canerrorbox.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef _canerrorbox
|
||||
#define _canerrorbox
|
||||
|
||||
#include "main.h"
|
||||
#define CAN_ERROR_BOX_ENABLED 1
|
||||
|
||||
typedef struct{
|
||||
struct canError{
|
||||
unsigned long counter;
|
||||
} EWG, EPV, BOF, STF, FOR, ACK,
|
||||
BR, BD, CRC_ERROR, RXFOV0, RXFOV1,
|
||||
TXALST0, TXTERR0, TXALST1, TXTERR1,
|
||||
TXALST2, TXTERR2, TIMEOUT,
|
||||
NOTINITIALIZED, NOTREADY,
|
||||
NOTSTARTED, PARAM;
|
||||
}CanErrorBox;
|
||||
|
||||
void CanErrorCallbackEWG();
|
||||
void CanErrorCallbackEPV();
|
||||
void CanErrorCallbackBOF();
|
||||
void CanErrorCallbackSTF();
|
||||
void CanErrorCallbackFOR();
|
||||
void CanErrorCallbackACK();
|
||||
void CanErrorCallbackBR();
|
||||
void CanErrorCallbackBD();
|
||||
void CanErrorCallbackCRC();
|
||||
void CanErrorCallbackRXFOV0();
|
||||
void CanErrorCallbackRXFOV1();
|
||||
void CanErrorCallbackTXALST0();
|
||||
void CanErrorCallbackTXTERR0();
|
||||
void CanErrorCallbackTXALST1();
|
||||
void CanErrorCallbackTXTERR1();
|
||||
void CanErrorCallbackTXALST2();
|
||||
void CanErrorCallbackTXTERR2();
|
||||
void CanErrorCallbackTIMEOUT();
|
||||
void CanErrorCallbackNOTINITIALIZED();
|
||||
void CanErrorCallbackNOTREADY();
|
||||
void CanErrorCallbackNOTSTARTED();
|
||||
void CanErrorCallbackPARAM();
|
||||
|
||||
#endif
|
||||
@@ -32,6 +32,7 @@ extern "C" {
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
#include "requester.h"
|
||||
#include "canerrorbox.h"
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user