summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/tiva/tiva_timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/tiva/tiva_timer.h')
-rw-r--r--nuttx/arch/arm/src/tiva/tiva_timer.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/tiva/tiva_timer.h b/nuttx/arch/arm/src/tiva/tiva_timer.h
index 5ccd8b834..d2d270f9d 100644
--- a/nuttx/arch/arm/src/tiva/tiva_timer.h
+++ b/nuttx/arch/arm/src/tiva/tiva_timer.h
@@ -123,6 +123,24 @@ struct tiva_timer32config_s
{
bool down; /* False: Count up; True: Count down */
/* TODO: Add fields to support ADC trigger events */
+
+ /* Mode-specific parameters */
+
+ union
+ {
+ /* 32-bit programmable one-shot or periodic timer */
+
+ struct
+ {
+ uint32_t interval; /* Value for interval load register */
+ } periodic;
+
+ /* 32-bit RTC with external 32.768-KHz input */
+
+ struct
+ {
+ } rtc;
+ } u;
};
/* This structure describes the configuration of one 16-bit timer A/B */
@@ -132,6 +150,36 @@ struct tiva_timer16config_s
uint8_t mode; /* See enum tiva_timermode_e */
bool down; /* False: Count up; True: Count down */
/* TODO: Add fields to support ADC trigger events */
+
+ /* Mode-specific parameters */
+
+ union
+ {
+ /* 16-bit programmable one-shot or periodic timer */
+
+ struct
+ {
+ uint16_t interval; /* Value for interval load register */
+ } periodic;
+
+ /* 16-bit input edge-count capture mode w/8-bit prescaler */
+
+ struct
+ {
+ } count;
+
+ /* 16-bit input time capture mode w/8-bit prescaler */
+
+ struct
+ {
+ } time;
+
+ /* 16-bit PWM output mode w/8-bit prescaler */
+
+ struct
+ {
+ } pwm;
+ } u;
};
/* This structure describes usage of both timers on a GPTIM module */