我需要用TIM1 第4通道来触发ADC1转换,为何触发源里面没有OC4REF, TIM1_TRGOSource_OC1 这个又是什么东西。
事件源又是什么东西?
下面两个有什么区别。
/** TIM1 Event Source */
typedef enum
{
TIM1_EVENTSOURCE_UPDATE = ((uint8_t)0x01),
TIM1_EVENTSOURCE_CC1 = ((uint8_t)0x02),
TIM1_EVENTSOURCE_CC2 = ((uint8_t)0x04),
TIM1_EVENTSOURCE_CC3 = ((uint8_t)0x08),
TIM1_EVENTSOURCE_CC4 = ((uint8_t)0x10),
TIM1_EVENTSOURCE_COM = ((uint8_t)0x20),
TIM1_EVENTSOURCE_TRIGGER = ((uint8_t)0x40),
TIM1_EVENTSOURCE_BREAK = ((uint8_t)0x80)
}TIM1_EventSource_TypeDef;
/** TIM1 Trigger Output Source */
typedef enum
{
TIM1_TRGOSOURCE_RESET = ((uint8_t)0x00),
TIM1_TRGOSOURCE_ENABLE = ((uint8_t)0x10),
TIM1_TRGOSOURCE_UPDATE = ((uint8_t)0x20),
TIM1_TRGOSource_OC1 = ((uint8_t)0x30),
TIM1_TRGOSOURCE_OC1REF = ((uint8_t)0x40),
TIM1_TRGOSOURCE_OC2REF = ((uint8_t)0x50),
TIM1_TRGOSOURCE_OC3REF = ((uint8_t)0x60)
}TIM1_TRGOSource_TypeDef;
|