/* * BHBF_ROBOT.c * * Created on: Oct 26, 2023 * Author: shiya */ #include "fsm.h" #include "BHBF_ROBOT.h" #include #include "bsp_FDCAN.h" //7 motors MotorParameters *Motor[3]; //Motor Error int32_t *Motor_ID_Errors[3] = { 0 }; //ComError int32_t* SystemErrorCode; ErrorData* SystemErrorData; TT_MotorParameters* TT_Motor[4]; //Declare a CV and initialize CV CV_struct_define CV = { 0 }; //Declare a GV and initialize CV GV_struct_define GV = { 0 }; //Declare a PV and initialize CV //PV_struct_define PV ={ 0 }; IV_struct_define IV ={ 0 }; void GF_MainLoop_Jump(int32_t Next_Index_U, int32_t Next_Index_N); void SET_BIT_1(int32_t* num,int32_t k) { *num=((*num) | (1 << (k))); } void SET_BIT_0(int32_t* num,int32_t k) { *num=((*num) & ~(1 << (k))); } int32_t Get_BIT(int32_t* num,int32_t k) { // return (*num >> (k -1)) & 1; return (*num >> (k)) & 1; } //100ms执行一次 void GF_WatchDog_Loop() { //硬件看门狗复位 //HAL_GPIO_TogglePin(RST_WDI_GPIO_Port, RST_WDI_Pin); //Hardware Watchdog,kicking the dog //硬件看门狗复位 }