diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-02-17 13:50:30 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-02-17 13:50:30 -0600 |
commit | d1018d2050c594a1bf5b7be1b0b93dceb90897cb (patch) | |
tree | e7ff26a925fa8a4be8f4bf24dcf59c5c9b3582dd /nuttx/arch/arm/src/tiva/tiva_timerlib.c | |
parent | 7be2bcbe438b6210d274492254135a9056b59b8e (diff) | |
download | nuttx-d1018d2050c594a1bf5b7be1b0b93dceb90897cb.tar.gz nuttx-d1018d2050c594a1bf5b7be1b0b93dceb90897cb.tar.bz2 nuttx-d1018d2050c594a1bf5b7be1b0b93dceb90897cb.zip |
Tiva: Updated files to allow for ADC triggering by the timer. I’ve cleaned up some parts of the ADC code, too, and fleshed out the PWM triggering ioctl. From Calvin Maguranis
Diffstat (limited to 'nuttx/arch/arm/src/tiva/tiva_timerlib.c')
-rw-r--r-- | nuttx/arch/arm/src/tiva/tiva_timerlib.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/nuttx/arch/arm/src/tiva/tiva_timerlib.c b/nuttx/arch/arm/src/tiva/tiva_timerlib.c index 6eb253ce7..75a49bcac 100644 --- a/nuttx/arch/arm/src/tiva/tiva_timerlib.c +++ b/nuttx/arch/arm/src/tiva/tiva_timerlib.c @@ -901,14 +901,6 @@ static int tiva_oneshot_periodic_mode32(struct tiva_gptmstate_s *priv, /* Enable and configure ADC trigger outputs */ if (TIMER_ISADCTIMEOUT(timer) || TIMER_ISADCMATCH(timer)) { - /* Enable ADC trigger outputs by setting the TAOTE bit in the - * control register. - */ - - regval = tiva_getreg(priv, TIVA_TIMER_CTL_OFFSET); - regval |= TIMER_CTL_TAOTE; - tiva_putreg(priv, TIVA_TIMER_CTL_OFFSET, regval); - #ifdef CONFIG_ARCH_CHIP_TM4C129 /* Enable timeout triggers now (match triggers will be * enabled when the first match value is set). @@ -918,7 +910,15 @@ static int tiva_oneshot_periodic_mode32(struct tiva_gptmstate_s *priv, { tiva_putreg(priv, TIVA_TIMER_ADCEV_OFFSET, TIMER_ADCEV_TATOADCEN); } -#endif /* CONFIG_ARCH_CHIP_TM4C129 */ +#endif + + /* Enable ADC trigger outputs by setting the TAOTE bit in the + * control register. + */ + + regval = tiva_getreg(priv, TIVA_TIMER_CTL_OFFSET); + regval |= TIMER_CTL_TAOTE; + tiva_putreg(priv, TIVA_TIMER_CTL_OFFSET, regval); } /* In addition, if using CCP pins, the TCACT field can be programmed to |