#if defined(EXAMPLE_SPEEDMONITOR) //这些宏定义是在哪定义的 void speedmonitor_start(void); #endif #if defined(EXAMPLE_POTENTIOMETER) void potentiometer_start(void); #endif #if defined(EXAMPLE_RAMP) void ramp_start(void); #endif #if defined(EXAMPLE_PI) void NewPIval_start(void); #endif #if defined(EXAMPLE_CONTROLMODE) void TqSpeedMode_start(void); #endif 上边是STM32电机库一个工程的部分程序,使用了很多的#if defined() 以#if defined(EXAMPLE_SPEEDMONITOR) //这些宏定义是在哪定义的 void speedmonitor_start(void); #endif 为例 EXAMPLE_SPEEDMONITOR是在呢定义的, 或者是说怎么 使 void speedmonitor_start(void);这一句有效,难道需要自己添加对应的宏定义? 那么 下边类似的使用方法,这些宏 也需要自己定义??? /* PWMC derived class object instantiation M1 */ #if ((defined STM32PERFORMANCE)&&(defined THREE_SHUNT)&&(defined SINGLEDRIVE)) oCurrSensor[M1] = (CPWMC)R3LM1_NewObject(&PWMnCurrFdbkParamsM1, &R3_LM1ParamsSD); #elif ((defined STM32PERFORMANCE)&&(defined SINGLE_SHUNT)&&(defined SINGLEDRIVE)) oCurrSensor[M1] = (CPWMC)R1LM1_NewObject(&PWMnCurrFdbkParamsM1, &R1_LM1ParamsSD); #elif ((defined STM32PERFORMANCE)&&(defined ICS_SENSORS)&&(defined SINGLEDRIVE)) oCurrSensor[M1] = (CPWMC)ILM1_NewObject(&PWMnCurrFdbkParamsM1, &ICS_LM1ParamsSD); #elif ((defined STM32VALUE)&&(defined SINGLE_SHUNT)&&(defined SINGLEDRIVE)) oCurrSensor[M1] = (CPWMC)R1VL1_NewObject(&PWMnCurrFdbkParamsM1, &R1_VL1ParamsSD); #elif ((defined STM32HD)&&(defined SINGLE_SHUNT)) oCurrSensor[M1] = (CPWMC)R1HD2_NewObject(&PWMnCurrFdbkParamsM1, &R1_DDParamsM1); #elif ((defined STM32HD)&&(defined THREE_SHUNT)) oCurrSensor[M1] = (CPWMC)R3HD2_NewObject(&PWMnCurrFdbkParamsM1, &R3_DDParamsM1); #elif ((defined STM32HD)&&(defined ICS_SENSORS)) oCurrSensor[M1] = (CPWMC)IHD2_NewObject(&PWMnCurrFdbkParamsM1, &ICS_DDParamsM1); #elif ((defined STM32F2XX)&&(defined THREE_SHUNT)) oCurrSensor[M1] = (CPWMC)R3F2XX_NewObject(&PWMnCurrFdbkParamsM1, &R3_DDParamsM1); #elif ((defined STM32F2XX)&&(defined SINGLE_SHUNT)) oCurrSensor[M1] = (CPWMC)R1F2XX_NewObject(&PWMnCurrFdbkParamsM1, &R1_DDParamsM1); #elif ((defined STM32F2XX)&&(defined ICS_SENSORS)) oCurrSensor[M1] = (CPWMC)IF2XX_NewObject(&PWMnCurrFdbkParamsM1, &ICS_DDParamsM1); #elif ((defined STM32F40XX)&&(defined THREE_SHUNT)) oCurrSensor[M1] = (CPWMC)R3F4XX_NewObject(&PWMnCurrFdbkParamsM1, &R3_DDParamsM1); #elif ((defined STM32F40XX)&&(defined SINGLE_SHUNT)) oCurrSensor[M1] = (CPWMC)R1F4XX_NewObject(&PWMnCurrFdbkParamsM1, &R1_DDParamsM1); #elif ((defined STM32F40XX)&&(defined ICS_SENSORS)) oCurrSensor[M1] = (CPWMC)IF4XX_NewObject(&PWMnCurrFdbkParamsM1, &ICS_DDParamsM1); #elif ((defined STM32F0XX)&&(defined SINGLE_SHUNT)) oCurrSensor[M1] = (CPWMC)R1F0XX_NewObject(&PWMnCurrFdbkParamsM1, &R1_SDParams); #elif ((defined STM32F30X)&&(defined THREE_SHUNT_INDEPENDENT_RESOURCES)) oCurrSensor[M1] = (CPWMC)R3_4_F3XX_NewObject(&PWMnCurrFdbkParamsM1, &R3_4_F30XParamsM1); #elif ((defined STM32F30X)&&(defined THREE_SHUNT_SHARED_RESOURCES)) oCurrSensor[M1] = (CPWMC)R3_2_F3XX_NewObject(&PWMnCurrFdbkParamsM1, &R3_2_F30XParamsM1); #elif ((defined STM32F30X)&&(defined SINGLE_SHUNT)) oCurrSensor[M1] = (CPWMC)R1F3XX_NewObject(&PWMnCurrFdbkParamsM1,&R1_F30XParamsM1); #elif ((defined STM32F30X)&&(defined ICS_SENSORS)) oCurrSensor[M1] = (CPWMC)IF3XX_NewObject(&PWMnCurrFdbkParamsM1, &ICS_DDParamsM1); + typedef struct CMCI_t *CMCI; 从上边这个语句中 应该有一个结构体struct CMCI_t 但是这个结构体在哪?它的定义没找到?? |
帮顶 |