You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
911 B

2 days ago
/*
* bsp_Error_Detect.c
*
* Created on: Oct 23, 2024
* Author: akeguo
*/
#include "bsp_Error_Detect.h"
void ErrorDetect();
HardWareController *HardWareErrorController;
void Error_Detect_Intialzie(uint16_t DispacherPeriod)
{
HardWareErrorController = (HardWareController*) malloc(
sizeof(HardWareController));
HardWareErrorController->pComHWHead = NULL;
HardWareErrorController->pComHWTail = NULL;
HardWareErrorController->Add_PCOMHardWare = ComHardWare_List_Add_t;
HardWareErrorController->Set_PCOMHardWare = Set_PCOMHardWare_t;
HardWareErrorController->PCOMHardWare_Check = PCOMHardWare_Check_t;
HardWareErrorController->DispacherCallTime = DispacherPeriod;//check the communicaton every 50ms
GF_BSP_Interrupt_Add_CallBack(
DF_BSP_InterCall_TIM8_2ms_PeriodElapsedCallback, ErrorDetect);
}
void ErrorDetect()
{
HardWareErrorController->PCOMHardWare_Check(HardWareErrorController);
}