ファームウェア関数一覧
TIM_PWMIConfig †
ヘッダ宣言 †
関数プロトタイプ †
TIM_PWMIConfig(TIM_TypeDef* TIMx, TIM_ICInitTypeDef* TIM_ICInitStruct)
動作 †
引数 †
- TIMx
タイマ周辺回路をTIMxで指定します。
xは1, 2, 3, 4, 5 又は 8を選択できます。
- TIM_ICInitStruct
- TIM_ICMode
TIM_OCMode_Timing | TIM Output Compare Timing mode. |
TIM_OCMode_Active | TIM Output Compare Active mode. |
TIM_OCMode_Inactive | TIM Output Compare Inactive mode. |
TIM_OCMode_Toggle | TIM Output Compare Toggle mode. |
TIM_OCMode_PWM1 | TIM Pulse Width Modulation mode1. |
TIM_OCMode_PWM2 | TIM Pulse Width Modulation mode2. |
- uint16_t TIM_OutputState
TIM_OutputState_Disable | Disables the TIM Output Compare state. |
TIM_OutputState_Enable | Enables the TIM Output Compare state. |
- uint16_t TIM_OutputNState
TIM_OutputNState_Disable | Disables the TIM Output N Compare state. |
TIM_OutputNState_Enable | Enables the TIM Output N Compare state. |
- uint16_t TIM_Pulse
0x0000 ~ 0xFFFF
- uint16_t TIM_OCPolarity
TIM_OCPolarity_High | Sets the TIM Output Compare polarity to high. |
TIM_OCPolarity_Low | Sets the TIM Output Compare polarity to low. |
- uint16_t TIM_OCNPolarity
TIM_OCNPolarity_High | Sets the Output Compare N Polarity to high. |
TIM_OCNPolarity_Low | Sets the Output Compare N Polarity to low. |
- uint16_t TIM_OCIdleState
TIM_OCIdleState_Set | TIM Output OC Idle state set when MOE = 0 |
TIM_OCIdleState_Reset | TIM Output OC Idle state reset when MOE = 0 |
- uint16_t TIM_OCNIdleState
TIM_OCNIdleState_Set | TIM Output OCN Idle state set when MOE = 0 |
TIM_OCNIdleState_Reset | TIM Output OCN Idle state reset when MOE = 0 |
戻り値 †
場所 †
呼び出し関数 †
サンプル †
/* TIM1 PWM Input Channel 1 mode Configuration */
TIM_ICInitTypeDef TIM_ICInitStructure;
TIM_ICInitStructure.TIM_Channel = TIM_Channel_1;
TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Rising;
TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI;
TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1;
TIM_ICInitStructure.TIM_ICFilter = 0x0;
TIM_PWMIConfig(TIM1, &TIM_ICInitStructure);
参照 †