Functions | |
| void | Timer_B_startCounter (uint16_t baseAddress, uint16_t timerMode) |
| Starts Timer_B counter. More... | |
| void | Timer_B_initContinuousMode (uint16_t baseAddress, Timer_B_initContinuousModeParam *param) |
| Configures Timer_B in continuous mode. More... | |
| void | Timer_B_initUpMode (uint16_t baseAddress, Timer_B_initUpModeParam *param) |
| Configures Timer_B in up mode. More... | |
| void | Timer_B_initUpDownMode (uint16_t baseAddress, Timer_B_initUpDownModeParam *param) |
| Configures Timer_B in up down mode. More... | |
| void | Timer_B_initCaptureMode (uint16_t baseAddress, Timer_B_initCaptureModeParam *param) |
| Initializes Capture Mode. More... | |
| void | Timer_B_initCompareMode (uint16_t baseAddress, Timer_B_initCompareModeParam *param) |
| Initializes Compare Mode. More... | |
| void | Timer_B_enableInterrupt (uint16_t baseAddress) |
| Enable Timer_B interrupt. More... | |
| void | Timer_B_disableInterrupt (uint16_t baseAddress) |
| Disable Timer_B interrupt. More... | |
| uint32_t | Timer_B_getInterruptStatus (uint16_t baseAddress) |
| Get Timer_B interrupt status. More... | |
| void | Timer_B_enableCaptureCompareInterrupt (uint16_t baseAddress, uint16_t captureCompareRegister) |
| Enable capture compare interrupt. More... | |
| void | Timer_B_disableCaptureCompareInterrupt (uint16_t baseAddress, uint16_t captureCompareRegister) |
| Disable capture compare interrupt. More... | |
| uint32_t | Timer_B_getCaptureCompareInterruptStatus (uint16_t baseAddress, uint16_t captureCompareRegister, uint16_t mask) |
| Return capture compare interrupt status. More... | |
| void | Timer_B_clear (uint16_t baseAddress) |
| Reset/Clear the Timer_B clock divider, count direction, count. More... | |
| uint8_t | Timer_B_getSynchronizedCaptureCompareInput (uint16_t baseAddress, uint16_t captureCompareRegister, uint16_t synchronized) |
| Get synchronized capturecompare input. More... | |
| uint8_t | Timer_B_getOutputForOutputModeOutBitValue (uint16_t baseAddress, uint16_t captureCompareRegister) |
| Get output bit for output mode. More... | |
| uint16_t | Timer_B_getCaptureCompareCount (uint16_t baseAddress, uint16_t captureCompareRegister) |
| Get current capturecompare count. More... | |
| void | Timer_B_setOutputForOutputModeOutBitValue (uint16_t baseAddress, uint16_t captureCompareRegister, uint16_t outputModeOutBitValue) |
| Set output bit for output mode. More... | |
| void | Timer_B_outputPWM (uint16_t baseAddress, Timer_B_outputPWMParam *param) |
| Generate a PWM with Timer_B running in up mode. More... | |
| void | Timer_B_stop (uint16_t baseAddress) |
| Stops the Timer_B. More... | |
| void | Timer_B_setCompareValue (uint16_t baseAddress, uint16_t compareRegister, uint16_t compareValue) |
| Sets the value of the capture-compare register. More... | |
| void | Timer_B_clearTimerInterrupt (uint16_t baseAddress) |
| Clears the Timer_B TBIFG interrupt flag. More... | |
| void | Timer_B_clearCaptureCompareInterrupt (uint16_t baseAddress, uint16_t captureCompareRegister) |
| Clears the capture-compare interrupt flag. More... | |
| void | Timer_B_selectCounterLength (uint16_t baseAddress, uint16_t counterLength) |
| Selects Timer_B counter length. More... | |
| void | Timer_B_selectLatchingGroup (uint16_t baseAddress, uint16_t groupLatch) |
| Selects Timer_B Latching Group. More... | |
| void | Timer_B_initCompareLatchLoadEvent (uint16_t baseAddress, uint16_t compareRegister, uint16_t compareLatchLoadEvent) |
| Selects Compare Latch Load Event. More... | |
| uint16_t | Timer_B_getCounterValue (uint16_t baseAddress) |
| Reads the current timer count value. More... | |
| void | Timer_B_setOutputMode (uint16_t baseAddress, uint16_t compareRegister, uint16_t compareOutputMode) |
| Sets the output mode. More... | |
| void Timer_B_clear | ( | uint16_t | baseAddress | ) |
Reset/Clear the Timer_B clock divider, count direction, count.
| baseAddress | is the base address of the TIMER_B module. |
Modified bits of TBxCTL register.
References Timer_B_getSynchronizedCaptureCompareInput().
| void Timer_B_clearCaptureCompareInterrupt | ( | uint16_t | baseAddress, |
| uint16_t | captureCompareRegister | ||
| ) |
Clears the capture-compare interrupt flag.
| baseAddress | is the base address of the TIMER_B module. |
| captureCompareRegister | selects the capture compare register being used. Refer to datasheet to ensure the device has the capture compare register being used. Valid values are:
|
Modified bits are CCIFG of TBxCCTLn register.
| void Timer_B_clearTimerInterrupt | ( | uint16_t | baseAddress | ) |
Clears the Timer_B TBIFG interrupt flag.
| baseAddress | is the base address of the TIMER_B module. |
Modified bits are TBIFG of TBxCTL register.
| void Timer_B_disableCaptureCompareInterrupt | ( | uint16_t | baseAddress, |
| uint16_t | captureCompareRegister | ||
| ) |
Disable capture compare interrupt.
| baseAddress | is the base address of the TIMER_B module. |
| captureCompareRegister | selects the capture compare register being used. Refer to datasheet to ensure the device has the capture compare register being used. Valid values are:
|
Modified bits of TBxCCTLn register.
| void Timer_B_disableInterrupt | ( | uint16_t | baseAddress | ) |
Disable Timer_B interrupt.
| baseAddress | is the base address of the TIMER_B module. |
Modified bits of TBxCTL register.
| void Timer_B_enableCaptureCompareInterrupt | ( | uint16_t | baseAddress, |
| uint16_t | captureCompareRegister | ||
| ) |
Enable capture compare interrupt.
| baseAddress | is the base address of the TIMER_B module. |
| captureCompareRegister | selects the capture compare register being used. Refer to datasheet to ensure the device has the capture compare register being used. Valid values are:
|
Modified bits of TBxCCTLn register.
| void Timer_B_enableInterrupt | ( | uint16_t | baseAddress | ) |
Enable Timer_B interrupt.
Enables Timer_B interrupt. Does not clear interrupt flags.
| baseAddress | is the base address of the TIMER_B module. |
Modified bits of TBxCTL register.
| uint16_t Timer_B_getCaptureCompareCount | ( | uint16_t | baseAddress, |
| uint16_t | captureCompareRegister | ||
| ) |
Get current capturecompare count.
| baseAddress | is the base address of the TIMER_B module. |
| captureCompareRegister | selects the capture compare register being used. Refer to datasheet to ensure the device has the capture compare register being used. Valid values are:
|
References Timer_B_setOutputForOutputModeOutBitValue().
Referenced by Timer_B_getOutputForOutputModeOutBitValue().
| uint32_t Timer_B_getCaptureCompareInterruptStatus | ( | uint16_t | baseAddress, |
| uint16_t | captureCompareRegister, | ||
| uint16_t | mask | ||
| ) |
Return capture compare interrupt status.
| baseAddress | is the base address of the TIMER_B module. |
| captureCompareRegister | selects the capture compare register being used. Refer to datasheet to ensure the device has the capture compare register being used. 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_B_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_B_THRESHOLD #define in the associated 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 module. |
| uint32_t Timer_B_getInterruptStatus | ( | uint16_t | baseAddress | ) |
Get Timer_B interrupt status.
| baseAddress | is the base address of the TIMER_B module. |
| uint8_t Timer_B_getOutputForOutputModeOutBitValue | ( | uint16_t | baseAddress, |
| uint16_t | captureCompareRegister | ||
| ) |
Get output bit for output mode.
| baseAddress | is the base address of the TIMER_B module. |
| captureCompareRegister | selects the capture compare register being used. Refer to datasheet to ensure the device has the capture compare register being used. Valid values are:
|
References Timer_B_getCaptureCompareCount().
Referenced by Timer_B_getSynchronizedCaptureCompareInput().
| uint8_t Timer_B_getSynchronizedCaptureCompareInput | ( | uint16_t | baseAddress, |
| uint16_t | captureCompareRegister, | ||
| uint16_t | synchronized | ||
| ) |
Get synchronized capturecompare input.
| baseAddress | is the base address of the TIMER_B module. |
| captureCompareRegister | selects the capture compare register being used. Refer to datasheet to ensure the device has the capture compare register being used. Valid values are:
|
| synchronized | selects the type of capture compare input Valid values are:
|
References Timer_B_getOutputForOutputModeOutBitValue().
Referenced by Timer_B_clear().
| void Timer_B_initCaptureMode | ( | uint16_t | baseAddress, |
| Timer_B_initCaptureModeParam * | param | ||
| ) |
Initializes Capture Mode.
| baseAddress | is the base address of the TIMER_B module. |
| param | is the pointer to struct for capture mode initialization. |
Modified bits of TBxCCTLn register.
References Timer_B_initCaptureModeParam::captureInputSelect, Timer_B_initCaptureModeParam::captureInterruptEnable, Timer_B_initCaptureModeParam::captureMode, Timer_B_initCaptureModeParam::captureOutputMode, Timer_B_initCaptureModeParam::captureRegister, and Timer_B_initCaptureModeParam::synchronizeCaptureSource.
| void Timer_B_initCompareLatchLoadEvent | ( | uint16_t | baseAddress, |
| uint16_t | compareRegister, | ||
| uint16_t | compareLatchLoadEvent | ||
| ) |
Selects Compare Latch Load Event.
| baseAddress | is the base address of the TIMER_B module. |
| compareRegister | selects the compare register being used. Refer to datasheet to ensure the device has the compare register being used. Valid values are:
|
| compareLatchLoadEvent | selects the latch load event Valid values are:
|
Modified bits are CLLD of TBxCCTLn register.
| void Timer_B_initCompareMode | ( | uint16_t | baseAddress, |
| Timer_B_initCompareModeParam * | param | ||
| ) |
Initializes Compare Mode.
| baseAddress | is the base address of the TIMER_B module. |
| param | is the pointer to struct for compare mode initialization. |
Modified bits of TBxCCTLn register and bits of TBxCCRn register.
References Timer_B_initCompareModeParam::compareInterruptEnable, Timer_B_initCompareModeParam::compareOutputMode, Timer_B_initCompareModeParam::compareRegister, and Timer_B_initCompareModeParam::compareValue.
| void Timer_B_initContinuousMode | ( | uint16_t | baseAddress, |
| Timer_B_initContinuousModeParam * | param | ||
| ) |
Configures Timer_B in continuous mode.
This API does not start the timer. Timer needs to be started when required using the Timer_B_startCounter API.
| baseAddress | is the base address of the TIMER_B module. |
| param | is the pointer to struct for continuous mode initialization. |
Modified bits of TBxCTL register.
References Timer_B_initContinuousModeParam::clockSource, Timer_B_initContinuousModeParam::clockSourceDivider, Timer_B_initContinuousModeParam::startTimer, Timer_B_initContinuousModeParam::timerClear, and Timer_B_initContinuousModeParam::timerInterruptEnable_TBIE.
| void Timer_B_initUpDownMode | ( | uint16_t | baseAddress, |
| Timer_B_initUpDownModeParam * | param | ||
| ) |
Configures Timer_B in up down mode.
This API does not start the timer. Timer needs to be started when required using the Timer_B_startCounter API.
| baseAddress | is the base address of the TIMER_B module. |
| param | is the pointer to struct for up-down mode initialization. |
Modified bits of TBxCTL register, bits of TBxCCTL0 register and bits of TBxCCR0 register.
References Timer_B_initUpDownModeParam::captureCompareInterruptEnable_CCR0_CCIE, Timer_B_initUpDownModeParam::clockSource, Timer_B_initUpDownModeParam::clockSourceDivider, Timer_B_initUpDownModeParam::startTimer, Timer_B_initUpDownModeParam::timerClear, Timer_B_initUpDownModeParam::timerInterruptEnable_TBIE, and Timer_B_initUpDownModeParam::timerPeriod.
| void Timer_B_initUpMode | ( | uint16_t | baseAddress, |
| Timer_B_initUpModeParam * | param | ||
| ) |
Configures Timer_B in up mode.
This API does not start the timer. Timer needs to be started when required using the Timer_B_startCounter API.
| baseAddress | is the base address of the TIMER_B module. |
| param | is the pointer to struct for up mode initialization. |
Modified bits of TBxCTL register, bits of TBxCCTL0 register and bits of TBxCCR0 register.
References Timer_B_initUpModeParam::captureCompareInterruptEnable_CCR0_CCIE, Timer_B_initUpModeParam::clockSource, Timer_B_initUpModeParam::clockSourceDivider, Timer_B_initUpModeParam::startTimer, Timer_B_initUpModeParam::timerClear, Timer_B_initUpModeParam::timerInterruptEnable_TBIE, and Timer_B_initUpModeParam::timerPeriod.
| void Timer_B_outputPWM | ( | uint16_t | baseAddress, |
| Timer_B_outputPWMParam * | param | ||
| ) |
Generate a PWM with Timer_B running in up mode.
| baseAddress | is the base address of the TIMER_B module. |
| param | is the pointer to struct for PWM configuration. |
Modified bits of TBxCCTLn register, bits of TBxCTL register, bits of TBxCCTL0 register and bits of TBxCCR0 register.
References Timer_B_outputPWMParam::clockSource, Timer_B_outputPWMParam::clockSourceDivider, Timer_B_outputPWMParam::compareOutputMode, Timer_B_outputPWMParam::compareRegister, Timer_B_outputPWMParam::dutyCycle, and Timer_B_outputPWMParam::timerPeriod.
| void Timer_B_selectCounterLength | ( | uint16_t | baseAddress, |
| uint16_t | counterLength | ||
| ) |
Selects Timer_B counter length.
| baseAddress | is the base address of the TIMER_B module. |
| counterLength | selects the value of counter length. Valid values are:
|
Modified bits are CNTL of TBxCTL register.
| void Timer_B_selectLatchingGroup | ( | uint16_t | baseAddress, |
| uint16_t | groupLatch | ||
| ) |
Selects Timer_B Latching Group.
| baseAddress | is the base address of the TIMER_B module. |
| groupLatch | selects the latching group. Valid values are:
|
Modified bits are TBCLGRP of TBxCTL register.
| void Timer_B_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_B module. |
| compareRegister | selects the compare register being used. Refer to datasheet to ensure the device has the compare register being used. Valid values are:
|
| compareValue | is the count to be compared with in compare mode |
Modified bits of TBxCCRn register.
| void Timer_B_setOutputForOutputModeOutBitValue | ( | uint16_t | baseAddress, |
| uint16_t | captureCompareRegister, | ||
| uint16_t | outputModeOutBitValue | ||
| ) |
Set output bit for output mode.
| baseAddress | is the base address of the TIMER_B module. |
| captureCompareRegister | selects the capture compare register being used. Refer to datasheet to ensure the device has the capture compare register being used. Valid values are:
|
| outputModeOutBitValue | the value to be set for out bit Valid values are:
|
Modified bits of TBxCCTLn register.
Referenced by Timer_B_getCaptureCompareCount().
| void Timer_B_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_B module. |
| compareRegister | selects the compare register being used. Valid values are:
|
| compareOutputMode | specifies the output mode. Valid values are:
|
Modified bits are OUTMOD of TBxCCTLn register.
| void Timer_B_startCounter | ( | uint16_t | baseAddress, |
| uint16_t | timerMode | ||
| ) |
Starts Timer_B counter.
This function assumes that the timer has been previously configured using Timer_B_initContinuousMode, Timer_B_initUpMode or Timer_B_initUpDownMode.
| baseAddress | is the base address of the TIMER_B module. |
| timerMode | selects the mode of the timer Valid values are:
|
Modified bits of TBxCTL register.
| void Timer_B_stop | ( | uint16_t | baseAddress | ) |
Stops the Timer_B.
| baseAddress | is the base address of the TIMER_B module. |
Modified bits of TBxCTL register.