TIM_ICInitStructure.TIM_ICMode= TIM_ICMode_ICAP;//配置为输入捕获模式
TIM_ICInitStructure.TIM_Channel = TIM_Channel_1;
TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Falling;
TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI;
TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1;
TIM_ICInitStructure.TIM_ICFilter = 0x0;
TIM_ICInit(TIM2, &TIM_ICInitStructure);
TIM_ICInitStructure.TIM_Channel = TIM_Channel_2;
TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Falling;
TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI;
TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1;
TIM_ICInitStructure.TIM_ICFilter = 0x0;
TIM_ICInit(TIM2, &TIM_ICInitStructure);
一直提示没有找到TIM_ICMode??只有把TIM_ICInitStructure.TIM_ICMode= TIM_ICMode_ICAP;//配置为输入捕获模式 注释掉才能通过,那不就是没有设捕获类型了??
[
本帖最后由 squn 于 2011-7-22 10:29 编辑 ]
此帖出自
小平头技术问答
一周热门 更多>