你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

STM32电机库例程的疑问

[复制链接]
wang12zhe-29129 提问时间:2014-11-21 13:02 /
#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 但是这个结构体在哪?它的定义没找到??



收藏 评论1 发布时间:2014-11-21 13:02

举报

1个回答
langgao183 回答时间:2014-11-21 16:26:59
帮顶                        

所属标签

相似问题

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32Cube扩展软件包
意法半导体边缘AI套件
ST - 理想汽车豪华SUV案例
ST意法半导体智能家居案例
STM32 ARM Cortex 32位微控制器
关注我们
st-img 微信公众号
st-img 手机版