mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
stm32/qenco: fix compilation for STM32F1. GTIM_CCER_CCxNP bits are not present in F1
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
af6c311fd1
commit
21f59c874f
@@ -824,7 +824,11 @@ static int stm32_setup(FAR struct qe_lowerhalf_s *lower)
|
|||||||
|
|
||||||
/* Select the Polarity=rising and set the CC1E Bit */
|
/* Select the Polarity=rising and set the CC1E Bit */
|
||||||
|
|
||||||
|
#ifdef HAVE_GTIM_CCXNP
|
||||||
ccer &= ~(GTIM_CCER_CC1P | GTIM_CCER_CC1NP);
|
ccer &= ~(GTIM_CCER_CC1P | GTIM_CCER_CC1NP);
|
||||||
|
#else
|
||||||
|
ccer &= ~(GTIM_CCER_CC1P);
|
||||||
|
#endif
|
||||||
ccer |= GTIM_CCER_CC1E;
|
ccer |= GTIM_CCER_CC1E;
|
||||||
|
|
||||||
/* Write to TIM CCMR1 and CCER registers */
|
/* Write to TIM CCMR1 and CCER registers */
|
||||||
@@ -860,7 +864,11 @@ static int stm32_setup(FAR struct qe_lowerhalf_s *lower)
|
|||||||
|
|
||||||
/* Select the Polarity=rising and set the CC2E Bit */
|
/* Select the Polarity=rising and set the CC2E Bit */
|
||||||
|
|
||||||
|
#ifdef HAVE_GTIM_CCXNP
|
||||||
ccer &= ~(GTIM_CCER_CC2P | GTIM_CCER_CC2NP);
|
ccer &= ~(GTIM_CCER_CC2P | GTIM_CCER_CC2NP);
|
||||||
|
#else
|
||||||
|
ccer &= ~(GTIM_CCER_CC2P);
|
||||||
|
#endif
|
||||||
ccer |= GTIM_CCER_CC2E;
|
ccer |= GTIM_CCER_CC2E;
|
||||||
|
|
||||||
/* Write to TIM CCMR1 and CCER registers */
|
/* Write to TIM CCMR1 and CCER registers */
|
||||||
|
|||||||
Reference in New Issue
Block a user