Functions | |
void | Timer_A_startCounter (uint16_t baseAddress, uint16_t timerMode) |
Starts Timer_A counter. More... | |
void | Timer_A_initContinuousMode (uint16_t baseAddress, Timer_A_initContinuousModeParam *param) |
Configures Timer_A in continuous mode. More... | |
void | Timer_A_initUpMode (uint16_t baseAddress, Timer_A_initUpModeParam *param) |
Configures Timer_A in up mode. More... | |
void | Timer_A_initUpDownMode (uint16_t baseAddress, Timer_A_initUpDownModeParam *param) |
Configures Timer_A in up down mode. More... | |
void | Timer_A_initCaptureMode (uint16_t baseAddress, Timer_A_initCaptureModeParam *param) |
Initializes Capture Mode. More... | |
void | Timer_A_initCompareMode (uint16_t baseAddress, Timer_A_initCompareModeParam *param) |
Initializes Compare Mode. More... | |
void | Timer_A_enableInterrupt (uint16_t baseAddress) |
Enable timer interrupt. More... | |
void | Timer_A_disableInterrupt (uint16_t baseAddress) |
Disable timer interrupt. More... | |
uint32_t | Timer_A_getInterruptStatus (uint16_t baseAddress) |
Get timer interrupt status. More... | |
void | Timer_A_enableCaptureCompareInterrupt (uint16_t baseAddress, uint16_t captureCompareRegister) |
Enable capture compare interrupt. More... | |
void | Timer_A_disableCaptureCompareInterrupt (uint16_t baseAddress, uint16_t captureCompareRegister) |
Disable capture compare interrupt. More... | |
uint32_t | Timer_A_getCaptureCompareInterruptStatus (uint16_t baseAddress, uint16_t captureCompareRegister, uint16_t mask) |
Return capture compare interrupt status. More... | |
void | Timer_A_clear (uint16_t baseAddress) |
Reset/Clear the timer clock divider, count direction, count. More... | |
uint8_t | Timer_A_getSynchronizedCaptureCompareInput (uint16_t baseAddress, uint16_t captureCompareRegister, uint16_t synchronized) |
Get synchronized capturecompare input. More... | |
uint8_t | Timer_A_getOutputForOutputModeOutBitValue (uint16_t baseAddress, uint16_t captureCompareRegister) |
Get output bit for output mode. More... | |
uint16_t | Timer_A_getCaptureCompareCount (uint16_t baseAddress, uint16_t captureCompareRegister) |
Get current capturecompare count. More... | |
void | Timer_A_setOutputForOutputModeOutBitValue (uint16_t baseAddress, uint16_t captureCompareRegister, uint8_t outputModeOutBitValue) |
Set output bit for output mode. More... | |
void | Timer_A_outputPWM (uint16_t baseAddress, Timer_A_outputPWMParam *param) |
Generate a PWM with timer running in up mode. More... | |
void | Timer_A_stop (uint16_t baseAddress) |
Stops the timer. More... | |
void | Timer_A_setCompareValue (uint16_t baseAddress, uint16_t compareRegister, uint16_t compareValue) |
Sets the value of the capture-compare register. More... | |
void | Timer_A_setOutputMode (uint16_t baseAddress, uint16_t compareRegister, uint16_t compareOutputMode) |
Sets the output mode. More... | |
void | Timer_A_clearTimerInterrupt (uint16_t baseAddress) |
Clears the Timer TAIFG interrupt flag. More... | |
void | Timer_A_clearCaptureCompareInterrupt (uint16_t baseAddress, uint16_t captureCompareRegister) |
Clears the capture-compare interrupt flag. More... | |
uint16_t | Timer_A_getCounterValue (uint16_t baseAddress) |
Reads the current timer count value. More... | |
void Timer_A_clear | ( | uint16_t | baseAddress | ) |
Reset/Clear the timer clock divider, count direction, count.
baseAddress | is the base address of the TIMER_A module. |
Modified bits of TAxCTL register.
void Timer_A_clearCaptureCompareInterrupt | ( | uint16_t | baseAddress, |
uint16_t | captureCompareRegister | ||
) |
Clears the capture-compare interrupt flag.
baseAddress | is the base address of the TIMER_A module. |
captureCompareRegister | selects the Capture-compare register being used. Valid values are:
|
Modified bits are CCIFG of TAxCCTLn register.
void Timer_A_clearTimerInterrupt | ( | uint16_t | baseAddress | ) |
Clears the Timer TAIFG interrupt flag.
baseAddress | is the base address of the TIMER_A module. |
Modified bits are TAIFG of TAxCTL register.
void Timer_A_disableCaptureCompareInterrupt | ( | uint16_t | baseAddress, |
uint16_t | captureCompareRegister | ||
) |
Disable capture compare interrupt.
baseAddress | is the base address of the TIMER_A module. |
captureCompareRegister | is the selected capture compare register Valid values are:
|
Modified bits of TAxCCTLn register.
void Timer_A_disableInterrupt | ( | uint16_t | baseAddress | ) |
Disable timer interrupt.
baseAddress | is the base address of the TIMER_A module. |
Modified bits of TAxCTL register.
void Timer_A_enableCaptureCompareInterrupt | ( | uint16_t | baseAddress, |
uint16_t | captureCompareRegister | ||
) |
Enable capture compare interrupt.
Does not clear interrupt flags
baseAddress | is the base address of the TIMER_A module. |
captureCompareRegister | is the selected capture compare register Valid values are:
|
Modified bits of TAxCCTLn register.
void Timer_A_enableInterrupt | ( | uint16_t | baseAddress | ) |
Enable timer interrupt.
Does not clear interrupt flags
baseAddress | is the base address of the TIMER_A module. |
Modified bits of TAxCTL register.
uint16_t Timer_A_getCaptureCompareCount | ( | uint16_t | baseAddress, |
uint16_t | captureCompareRegister | ||
) |
Get current capturecompare count.
baseAddress | is the base address of the TIMER_A module. |
captureCompareRegister | Valid values are:
|
uint32_t Timer_A_getCaptureCompareInterruptStatus | ( | uint16_t | baseAddress, |
uint16_t | captureCompareRegister, | ||
uint16_t | mask | ||
) |
Return capture compare interrupt status.
baseAddress | is the base address of the TIMER_A module. |
captureCompareRegister | is the selected capture compare register Valid values are:
|
mask | is the mask for the interrupt status Mask value is the logical OR of any of the following:
|
uint16_t Timer_A_getCounterValue | ( | uint16_t | baseAddress | ) |
Reads the current timer count value.
Reads the current count value of the timer. There is a majority vote system in place to confirm an accurate value is returned. The TIMER_A_THRESHOLD #define in the corresponding header file can be modified so that the votes must be closer together for a consensus to occur.
baseAddress | is the base address of the TIMER_A module. |
uint32_t Timer_A_getInterruptStatus | ( | uint16_t | baseAddress | ) |
Get timer interrupt status.
baseAddress | is the base address of the TIMER_A module. |
uint8_t Timer_A_getOutputForOutputModeOutBitValue | ( | uint16_t | baseAddress, |
uint16_t | captureCompareRegister | ||
) |
Get output bit for output mode.
baseAddress | is the base address of the TIMER_A module. |
captureCompareRegister | Valid values are:
|
uint8_t Timer_A_getSynchronizedCaptureCompareInput | ( | uint16_t | baseAddress, |
uint16_t | captureCompareRegister, | ||
uint16_t | synchronized | ||
) |
Get synchronized capturecompare input.
baseAddress | is the base address of the TIMER_A module. |
captureCompareRegister | Valid values are:
|
synchronized | Valid values are:
|
void Timer_A_initCaptureMode | ( | uint16_t | baseAddress, |
Timer_A_initCaptureModeParam * | param | ||
) |
Initializes Capture Mode.
baseAddress | is the base address of the TIMER_A module. |
param | is the pointer to struct for capture mode initialization. |
Modified bits of TAxCCTLn register.
References Timer_A_initCaptureModeParam::captureInputSelect, Timer_A_initCaptureModeParam::captureInterruptEnable, Timer_A_initCaptureModeParam::captureMode, Timer_A_initCaptureModeParam::captureOutputMode, Timer_A_initCaptureModeParam::captureRegister, and Timer_A_initCaptureModeParam::synchronizeCaptureSource.
void Timer_A_initCompareMode | ( | uint16_t | baseAddress, |
Timer_A_initCompareModeParam * | param | ||
) |
Initializes Compare Mode.
baseAddress | is the base address of the TIMER_A module. |
param | is the pointer to struct for compare mode initialization. |
Modified bits of TAxCCRn register and bits of TAxCCTLn register.
References Timer_A_initCompareModeParam::compareInterruptEnable, Timer_A_initCompareModeParam::compareOutputMode, Timer_A_initCompareModeParam::compareRegister, and Timer_A_initCompareModeParam::compareValue.
void Timer_A_initContinuousMode | ( | uint16_t | baseAddress, |
Timer_A_initContinuousModeParam * | param | ||
) |
Configures Timer_A in continuous mode.
baseAddress | is the base address of the TIMER_A module. |
param | is the pointer to struct for continuous mode initialization. |
Modified bits of TAxCTL register.
References Timer_A_initContinuousModeParam::clockSource, Timer_A_initContinuousModeParam::clockSourceDivider, Timer_A_initContinuousModeParam::startTimer, Timer_A_initContinuousModeParam::timerClear, and Timer_A_initContinuousModeParam::timerInterruptEnable_TAIE.
void Timer_A_initUpDownMode | ( | uint16_t | baseAddress, |
Timer_A_initUpDownModeParam * | param | ||
) |
Configures Timer_A in up down mode.
baseAddress | is the base address of the TIMER_A module. |
param | is the pointer to struct for up-down mode initialization. |
Modified bits of TAxCTL register, bits of TAxCCTL0 register and bits of TAxCCR0 register.
References Timer_A_initUpDownModeParam::captureCompareInterruptEnable_CCR0_CCIE, Timer_A_initUpDownModeParam::clockSource, Timer_A_initUpDownModeParam::clockSourceDivider, Timer_A_initUpDownModeParam::startTimer, Timer_A_initUpDownModeParam::timerClear, Timer_A_initUpDownModeParam::timerInterruptEnable_TAIE, and Timer_A_initUpDownModeParam::timerPeriod.
void Timer_A_initUpMode | ( | uint16_t | baseAddress, |
Timer_A_initUpModeParam * | param | ||
) |
Configures Timer_A in up mode.
baseAddress | is the base address of the TIMER_A module. |
param | is the pointer to struct for up mode initialization. |
Modified bits of TAxCTL register, bits of TAxCCTL0 register and bits of TAxCCR0 register.
References Timer_A_initUpModeParam::captureCompareInterruptEnable_CCR0_CCIE, Timer_A_initUpModeParam::clockSource, Timer_A_initUpModeParam::clockSourceDivider, Timer_A_initUpModeParam::startTimer, Timer_A_initUpModeParam::timerClear, Timer_A_initUpModeParam::timerInterruptEnable_TAIE, and Timer_A_initUpModeParam::timerPeriod.
void Timer_A_outputPWM | ( | uint16_t | baseAddress, |
Timer_A_outputPWMParam * | param | ||
) |
Generate a PWM with timer running in up mode.
baseAddress | is the base address of the TIMER_A module. |
param | is the pointer to struct for PWM configuration. |
Modified bits of TAxCTL register, bits of TAxCCTL0 register, bits of TAxCCR0 register and bits of TAxCCTLn register.
References Timer_A_outputPWMParam::clockSource, Timer_A_outputPWMParam::clockSourceDivider, Timer_A_outputPWMParam::compareOutputMode, Timer_A_outputPWMParam::compareRegister, Timer_A_outputPWMParam::dutyCycle, and Timer_A_outputPWMParam::timerPeriod.
void Timer_A_setCompareValue | ( | uint16_t | baseAddress, |
uint16_t | compareRegister, | ||
uint16_t | compareValue | ||
) |
Sets the value of the capture-compare register.
baseAddress | is the base address of the TIMER_A module. |
compareRegister | selects the Capture register being used. Refer to datasheet to ensure the device has the capture compare register being used. Valid values are:
|
compareValue | is the count to be compared with in compare mode |
Modified bits of TAxCCRn register.
void Timer_A_setOutputForOutputModeOutBitValue | ( | uint16_t | baseAddress, |
uint16_t | captureCompareRegister, | ||
uint8_t | outputModeOutBitValue | ||
) |
Set output bit for output mode.
baseAddress | is the base address of the TIMER_A module. |
captureCompareRegister | Valid values are:
|
outputModeOutBitValue | is the value to be set for out bit Valid values are:
|
Modified bits of TAxCCTLn register.
void Timer_A_setOutputMode | ( | uint16_t | baseAddress, |
uint16_t | compareRegister, | ||
uint16_t | compareOutputMode | ||
) |
Sets the output mode.
Sets the output mode for the timer even the timer is already running.
baseAddress | is the base address of the TIMER_A module. |
compareRegister | selects the compare register being used. Valid values are:
|
compareOutputMode | specifies the output mode. Valid values are:
|
Modified bits are OUTMOD of TAxCCTLn register.
void Timer_A_startCounter | ( | uint16_t | baseAddress, |
uint16_t | timerMode | ||
) |
Starts Timer_A counter.
This function assumes that the timer has been previously configured using Timer_A_initContinuousMode, Timer_A_initUpMode or Timer_A_initUpDownMode.
baseAddress | is the base address of the TIMER_A module. |
timerMode | mode to put the timer in Valid values are:
|
Modified bits of TAxCTL register.
void Timer_A_stop | ( | uint16_t | baseAddress | ) |
Stops the timer.
baseAddress | is the base address of the TIMER_A module. |
Modified bits of TAxCTL register.