Data Structures | Macros | Typedefs | Functions
timer_a.h File Reference
#include <stdint.h>
#include "register_remap.h"
#include <msp432.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  _Timer_A_ContinuousModeConfig
 Configuration structure for continuous mode in the Timer_A module. See Timer_A_configureContinuousMode for parameter documentation. More...
 
struct  _Timer_A_UpModeConfig
 Configuration structure for Up mode in the Timer_A module. See Timer_A_configureUpMode for parameter documentation. More...
 
struct  _Timer_A_UpDownModeConfig
 Configuration structure for UpDown mode in the Timer_A module. See Timer_A_configureUpDownMode for parameter documentation. More...
 
struct  _Timer_A_CaptureModeConfig
 Configuration structure for capture mode in the Timer_A module. See Timer_A_initCapture for parameter documentation. More...
 
struct  _Timer_A_CompareModeConfig
 Configuration structure for compare mode in the Timer_A module. See Timer_A_initCompare for parameter documentation. More...
 
struct  _Timer_A_PWMConfig
 Configuration structure for PWM mode in the Timer_A module. See Timer_A_generatePWM for parameter documentation. More...
 

Macros

#define TIMER_A_CMSIS(x)   ((TIMER_A0_Type *) x)
 
#define TIMER_A_CCR0_INTERRUPT   0x00
 
#define TIMER_A_CCRX_AND_OVERFLOW_INTERRUPT   0x01
 
#define TIMER_A_THRESHOLD   50
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_1   0x01
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_2   0x02
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_4   0x04
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_8   0x08
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_3   0x03
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_5   0x05
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_6   0x06
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_7   0x07
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_10   0x0A
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_12   0x0C
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_14   0x0E
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_16   0x10
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_20   0x14
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_24   0x18
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_28   0x1C
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_32   0x20
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_40   0x28
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_48   0x30
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_56   0x38
 
#define TIMER_A_CLOCKSOURCE_DIVIDER_64   0x40
 
#define TIMER_A_STOP_MODE   MC_0
 
#define TIMER_A_UP_MODE   MC_1
 
#define TIMER_A_CONTINUOUS_MODE   MC_2
 
#define TIMER_A_UPDOWN_MODE   MC_3
 
#define TIMER_A_DO_CLEAR   TACLR
 
#define TIMER_A_SKIP_CLEAR   0x00
 
#define TIMER_A_CLOCKSOURCE_EXTERNAL_TXCLK   TASSEL__TACLK
 
#define TIMER_A_CLOCKSOURCE_ACLK   TASSEL__ACLK
 
#define TIMER_A_CLOCKSOURCE_SMCLK   TASSEL__SMCLK
 
#define TIMER_A_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK   TASSEL__INCLK
 
#define TIMER_A_TAIE_INTERRUPT_ENABLE   TAIE
 
#define TIMER_A_TAIE_INTERRUPT_DISABLE   0x00
 
#define TIMER_A_CCIE_CCR0_INTERRUPT_ENABLE   CCIE
 
#define TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE   0x00
 
#define TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE   0x00
 
#define TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE   CCIE
 
#define TIMER_A_CAPTURE_INPUTSELECT_CCIxA   CCIS_0
 
#define TIMER_A_CAPTURE_INPUTSELECT_CCIxB   CCIS_1
 
#define TIMER_A_CAPTURE_INPUTSELECT_GND   CCIS_2
 
#define TIMER_A_CAPTURE_INPUTSELECT_Vcc   CCIS_3
 
#define TIMER_A_OUTPUTMODE_OUTBITVALUE   OUTMOD_0
 
#define TIMER_A_OUTPUTMODE_SET   OUTMOD_1
 
#define TIMER_A_OUTPUTMODE_TOGGLE_RESET   OUTMOD_2
 
#define TIMER_A_OUTPUTMODE_SET_RESET   OUTMOD_3
 
#define TIMER_A_OUTPUTMODE_TOGGLE   OUTMOD_4
 
#define TIMER_A_OUTPUTMODE_RESET   OUTMOD_5
 
#define TIMER_A_OUTPUTMODE_TOGGLE_SET   OUTMOD_6
 
#define TIMER_A_OUTPUTMODE_RESET_SET   OUTMOD_7
 
#define TIMER_A_CAPTURECOMPARE_REGISTER_0   0x02
 
#define TIMER_A_CAPTURECOMPARE_REGISTER_1   0x04
 
#define TIMER_A_CAPTURECOMPARE_REGISTER_2   0x06
 
#define TIMER_A_CAPTURECOMPARE_REGISTER_3   0x08
 
#define TIMER_A_CAPTURECOMPARE_REGISTER_4   0x0A
 
#define TIMER_A_CAPTURECOMPARE_REGISTER_5   0x0C
 
#define TIMER_A_CAPTURECOMPARE_REGISTER_6   0x0E
 
#define TIMER_A_CAPTUREMODE_NO_CAPTURE   CM_0
 
#define TIMER_A_CAPTUREMODE_RISING_EDGE   CM_1
 
#define TIMER_A_CAPTUREMODE_FALLING_EDGE   CM_2
 
#define TIMER_A_CAPTUREMODE_RISING_AND_FALLING_EDGE   CM_3
 
#define TIMER_A_CAPTURE_ASYNCHRONOUS   0x00
 
#define TIMER_A_CAPTURE_SYNCHRONOUS   SCS
 
#define TIMER_A_CAPTURE_OVERFLOW   COV
 
#define TIMER_A_CAPTURECOMPARE_INTERRUPT_FLAG   CCIFG
 
#define TIMER_A_READ_SYNCHRONIZED_CAPTURECOMPAREINPUT   SCCI
 
#define TIMER_A_READ_CAPTURE_COMPARE_INPUT   CCI
 
#define TIMER_A_CAPTURECOMPARE_INPUT_HIGH   0x01
 
#define TIMER_A_CAPTURECOMPARE_INPUT_LOW   0x00
 
#define TIMER_A_OUTPUTMODE_OUTBITVALUE_HIGH   OUT
 
#define TIMER_A_OUTPUTMODE_OUTBITVALUE_LOW   0x00
 
#define TIMER_A_INTERRUPT_NOT_PENDING   0x00
 
#define TIMER_A_INTERRUPT_PENDING   0x01
 
#define Timer_A_setDutyCycle(timer, dutyCycle)   Timer_A_setCompareValue(timer,dutyCycle)
 
#define TIMER_A_startCounter   Timer_A_startCounter
 
#define TIMER_A_clearTimerInterruptFlag   Timer_A_clearInterruptFlag
 
#define TIMER_A_clearCaptureCompareInterruptFlag   Timer_A_clearCaptureCompareInterrupt
 
#define TIMER_A_getCounterValue   Timer_A_getCounterValue
 
#define TIMER_A_setCompareValue   Timer_A_setCompareValue
 
#define TIMER_A_stop   Timer_A_stopTimer
 
#define TIMER_A_setOutputForOutputModeOutBitValue   Timer_A_setOutputForOutputModeOutBitValue
 
#define TIMER_A_enableInterrupt   Timer_A_enableInterrupt
 
#define TIMER_A_disableInterrupt   Timer_A_disableInterrupt
 
#define TIMER_A_getInterruptStatus   Timer_A_getInterruptStatus
 
#define TIMER_A_enableCaptureCompareInterrupt   Timer_A_enableCaptureCompareInterrupt
 
#define TIMER_A_disableCaptureCompareInterrupt   Timer_A_disableCaptureCompareInterrupt
 
#define TIMER_A_getCaptureCompareInterruptStatus   Timer_A_getCaptureCompareInterruptStatus
 
#define TIMER_A_clear   Timer_A_clearTimer
 
#define TIMER_A_getSynchronizedCaptureCompareInput   Timer_A_getSynchronizedCaptureCompareInput
 
#define TIMER_A_getCaptureCompareCount   Timer_A_getCaptureCompareCount
 

Typedefs

typedef struct
_Timer_A_ContinuousModeConfig 
Timer_A_ContinuousModeConfig
 Type definition for _Timer_A_ContinuousModeConfig structure. More...
 
typedef struct
_Timer_A_UpModeConfig 
Timer_A_UpModeConfig
 Type definition for _Timer_A_UpModeConfig structure. More...
 
typedef struct
_Timer_A_UpDownModeConfig 
Timer_A_UpDownModeConfig
 Type definition for _Timer_A_UpDownModeConfig structure. More...
 
typedef struct
_Timer_A_CaptureModeConfig 
Timer_A_CaptureModeConfig
 Type definition for _Timer_A_CaptureModeConfig structure. More...
 
typedef struct
_Timer_A_CompareModeConfig 
Timer_A_CompareModeConfig
 Type definition for _Timer_A_CompareModeConfig structure. More...
 
typedef struct _Timer_A_PWMConfig Timer_A_PWMConfig
 Type definition for _Timer_A_PWMConfig structure. More...
 

Functions

void Timer_A_startCounter (uint32_t timer, uint_fast16_t timerMode)
 
void Timer_A_configureContinuousMode (uint32_t timer, const Timer_A_ContinuousModeConfig *config)
 
void Timer_A_configureUpMode (uint32_t timer, const Timer_A_UpModeConfig *config)
 
void Timer_A_configureUpDownMode (uint32_t timer, const Timer_A_UpDownModeConfig *config)
 
void Timer_A_initCapture (uint32_t timer, const Timer_A_CaptureModeConfig *config)
 
void Timer_A_initCompare (uint32_t timer, const Timer_A_CompareModeConfig *config)
 
void Timer_A_clearTimer (uint32_t timer)
 
uint_fast8_t Timer_A_getSynchronizedCaptureCompareInput (uint32_t timer, uint_fast16_t captureCompareRegister, uint_fast16_t synchronizedSetting)
 
uint_fast8_t Timer_A_getOutputForOutputModeOutBitValue (uint32_t timer, uint_fast16_t captureCompareRegister)
 
uint_fast16_t Timer_A_getCaptureCompareCount (uint32_t timer, uint_fast16_t captureCompareRegister)
 
void Timer_A_setOutputForOutputModeOutBitValue (uint32_t timer, uint_fast16_t captureCompareRegister, uint_fast8_t outputModeOutBitValue)
 
void Timer_A_generatePWM (uint32_t timer, const Timer_A_PWMConfig *config)
 
void Timer_A_stopTimer (uint32_t timer)
 
void Timer_A_setCompareValue (uint32_t timer, uint_fast16_t compareRegister, uint_fast16_t compareValue)
 
uint16_t Timer_A_getCounterValue (uint32_t timer)
 
void Timer_A_clearInterruptFlag (uint32_t timer)
 
void Timer_A_clearCaptureCompareInterrupt (uint32_t timer, uint_fast16_t captureCompareRegister)
 
void Timer_A_enableInterrupt (uint32_t timer)
 
void Timer_A_disableInterrupt (uint32_t timer)
 
uint32_t Timer_A_getInterruptStatus (uint32_t timer)
 
uint32_t Timer_A_getEnabledInterruptStatus (uint32_t timer)
 
void Timer_A_enableCaptureCompareInterrupt (uint32_t timer, uint_fast16_t captureCompareRegister)
 
void Timer_A_disableCaptureCompareInterrupt (uint32_t timer, uint_fast16_t captureCompareRegister)
 
uint32_t Timer_A_getCaptureCompareInterruptStatus (uint32_t timer, uint_fast16_t captureCompareRegister, uint_fast16_t mask)
 
uint32_t Timer_A_getCaptureCompareEnabledInterruptStatus (uint32_t timer, uint_fast16_t captureCompareRegister)
 
void Timer_A_registerInterrupt (uint32_t timer, uint_fast8_t interruptSelect, void(*intHandler)(void))
 
void Timer_A_unregisterInterrupt (uint32_t timer, uint_fast8_t interruptSelect)
 

Copyright 2014, Texas Instruments Incorporated