![]() |
![]() |
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... | |
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) |
#define TIMER_A_CMSIS | ( | x | ) | ((TIMER_A0_Type *) x) |
Referenced by Timer_A_clearInterruptFlag(), Timer_A_clearTimer(), Timer_A_configureContinuousMode(), Timer_A_configureUpDownMode(), Timer_A_configureUpMode(), Timer_A_disableInterrupt(), Timer_A_enableInterrupt(), Timer_A_generatePWM(), Timer_A_getCounterValue(), Timer_A_getEnabledInterruptStatus(), Timer_A_getInterruptStatus(), Timer_A_startCounter(), and Timer_A_stopTimer().
#define TIMER_A_CCR0_INTERRUPT 0x00 |
Referenced by Timer_A_registerInterrupt(), and Timer_A_unregisterInterrupt().
#define TIMER_A_CCRX_AND_OVERFLOW_INTERRUPT 0x01 |
Referenced by Timer_A_registerInterrupt(), and Timer_A_unregisterInterrupt().
#define TIMER_A_THRESHOLD 50 |
Referenced by Timer_A_getCounterValue().
#define TIMER_A_CLOCKSOURCE_DIVIDER_1 0x01 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_2 0x02 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_4 0x04 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_8 0x08 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_3 0x03 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_5 0x05 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_6 0x06 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_7 0x07 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_10 0x0A |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_12 0x0C |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_14 0x0E |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_16 0x10 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_20 0x14 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_24 0x18 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_28 0x1C |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_32 0x20 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_40 0x28 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_48 0x30 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_56 0x38 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CLOCKSOURCE_DIVIDER_64 0x40 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_STOP_MODE MC_0 |
Referenced by Timer_A_configureUpDownMode().
#define TIMER_A_UP_MODE MC_1 |
Referenced by Timer_A_generatePWM(), and Timer_A_startCounter().
#define TIMER_A_CONTINUOUS_MODE MC_2 |
Referenced by Timer_A_startCounter().
#define TIMER_A_UPDOWN_MODE MC_3 |
#define TIMER_A_DO_CLEAR TACLR |
#define TIMER_A_SKIP_CLEAR 0x00 |
Referenced by Timer_A_configureContinuousMode(), Timer_A_configureUpDownMode(), and Timer_A_configureUpMode().
#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 |
Referenced by Timer_A_configureContinuousMode().
#define TIMER_A_CCIE_CCR0_INTERRUPT_ENABLE CCIE |
Referenced by Timer_A_configureUpDownMode(), and Timer_A_configureUpMode().
#define TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE 0x00 |
#define TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE 0x00 |
Referenced by Timer_A_initCapture(), and Timer_A_initCompare().
#define TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE CCIE |
Referenced by Timer_A_generatePWM(), Timer_A_initCapture(), and Timer_A_initCompare().
#define TIMER_A_CAPTURE_INPUTSELECT_CCIxA CCIS_0 |
Referenced by Timer_A_initCapture().
#define TIMER_A_CAPTURE_INPUTSELECT_CCIxB CCIS_1 |
Referenced by Timer_A_initCapture().
#define TIMER_A_CAPTURE_INPUTSELECT_GND CCIS_2 |
Referenced by Timer_A_initCapture().
#define TIMER_A_CAPTURE_INPUTSELECT_Vcc CCIS_3 |
Referenced by Timer_A_initCapture().
#define TIMER_A_OUTPUTMODE_OUTBITVALUE OUTMOD_0 |
Referenced by Timer_A_generatePWM(), Timer_A_initCapture(), and Timer_A_initCompare().
#define TIMER_A_OUTPUTMODE_SET OUTMOD_1 |
Referenced by Timer_A_generatePWM(), Timer_A_initCapture(), and Timer_A_initCompare().
#define TIMER_A_OUTPUTMODE_TOGGLE_RESET OUTMOD_2 |
Referenced by Timer_A_generatePWM(), Timer_A_initCapture(), and Timer_A_initCompare().
#define TIMER_A_OUTPUTMODE_SET_RESET OUTMOD_3 |
Referenced by Timer_A_generatePWM(), Timer_A_initCapture(), and Timer_A_initCompare().
#define TIMER_A_OUTPUTMODE_TOGGLE OUTMOD_4 |
Referenced by Timer_A_generatePWM(), Timer_A_initCapture(), and Timer_A_initCompare().
#define TIMER_A_OUTPUTMODE_RESET OUTMOD_5 |
Referenced by Timer_A_generatePWM(), Timer_A_initCapture(), and Timer_A_initCompare().
#define TIMER_A_OUTPUTMODE_TOGGLE_SET OUTMOD_6 |
Referenced by Timer_A_generatePWM(), Timer_A_initCapture(), and Timer_A_initCompare().
#define TIMER_A_OUTPUTMODE_RESET_SET OUTMOD_7 |
Referenced by Timer_A_generatePWM(), Timer_A_initCapture(), and Timer_A_initCompare().
#define TIMER_A_CAPTURECOMPARE_REGISTER_0 0x02 |
Referenced by Timer_A_clearCaptureCompareInterrupt(), Timer_A_disableCaptureCompareInterrupt(), Timer_A_enableCaptureCompareInterrupt(), Timer_A_generatePWM(), Timer_A_getCaptureCompareCount(), Timer_A_getOutputForOutputModeOutBitValue(), Timer_A_getSynchronizedCaptureCompareInput(), Timer_A_initCapture(), Timer_A_initCompare(), and Timer_A_setCompareValue().
#define TIMER_A_CAPTURECOMPARE_REGISTER_1 0x04 |
Referenced by Timer_A_clearCaptureCompareInterrupt(), Timer_A_disableCaptureCompareInterrupt(), Timer_A_enableCaptureCompareInterrupt(), Timer_A_generatePWM(), Timer_A_getCaptureCompareCount(), Timer_A_getOutputForOutputModeOutBitValue(), Timer_A_getSynchronizedCaptureCompareInput(), Timer_A_initCapture(), Timer_A_initCompare(), and Timer_A_setCompareValue().
#define TIMER_A_CAPTURECOMPARE_REGISTER_2 0x06 |
Referenced by Timer_A_clearCaptureCompareInterrupt(), Timer_A_disableCaptureCompareInterrupt(), Timer_A_enableCaptureCompareInterrupt(), Timer_A_generatePWM(), Timer_A_getCaptureCompareCount(), Timer_A_getOutputForOutputModeOutBitValue(), Timer_A_getSynchronizedCaptureCompareInput(), Timer_A_initCapture(), Timer_A_initCompare(), and Timer_A_setCompareValue().
#define TIMER_A_CAPTURECOMPARE_REGISTER_3 0x08 |
Referenced by Timer_A_clearCaptureCompareInterrupt(), Timer_A_disableCaptureCompareInterrupt(), Timer_A_enableCaptureCompareInterrupt(), Timer_A_generatePWM(), Timer_A_getCaptureCompareCount(), Timer_A_getOutputForOutputModeOutBitValue(), Timer_A_getSynchronizedCaptureCompareInput(), Timer_A_initCapture(), Timer_A_initCompare(), and Timer_A_setCompareValue().
#define TIMER_A_CAPTURECOMPARE_REGISTER_4 0x0A |
Referenced by Timer_A_clearCaptureCompareInterrupt(), Timer_A_disableCaptureCompareInterrupt(), Timer_A_enableCaptureCompareInterrupt(), Timer_A_generatePWM(), Timer_A_getCaptureCompareCount(), Timer_A_getOutputForOutputModeOutBitValue(), Timer_A_getSynchronizedCaptureCompareInput(), Timer_A_initCapture(), Timer_A_initCompare(), and Timer_A_setCompareValue().
#define TIMER_A_CAPTURECOMPARE_REGISTER_5 0x0C |
Referenced by Timer_A_clearCaptureCompareInterrupt(), Timer_A_disableCaptureCompareInterrupt(), Timer_A_enableCaptureCompareInterrupt(), Timer_A_generatePWM(), Timer_A_getCaptureCompareCount(), Timer_A_getOutputForOutputModeOutBitValue(), Timer_A_getSynchronizedCaptureCompareInput(), Timer_A_initCapture(), Timer_A_initCompare(), and Timer_A_setCompareValue().
#define TIMER_A_CAPTURECOMPARE_REGISTER_6 0x0E |
Referenced by Timer_A_clearCaptureCompareInterrupt(), Timer_A_disableCaptureCompareInterrupt(), Timer_A_enableCaptureCompareInterrupt(), Timer_A_generatePWM(), Timer_A_getCaptureCompareCount(), Timer_A_getOutputForOutputModeOutBitValue(), Timer_A_getSynchronizedCaptureCompareInput(), Timer_A_initCapture(), Timer_A_initCompare(), and Timer_A_setCompareValue().
#define TIMER_A_CAPTUREMODE_NO_CAPTURE CM_0 |
Referenced by Timer_A_initCapture().
#define TIMER_A_CAPTUREMODE_RISING_EDGE CM_1 |
Referenced by Timer_A_initCapture().
#define TIMER_A_CAPTUREMODE_FALLING_EDGE CM_2 |
Referenced by Timer_A_initCapture().
#define TIMER_A_CAPTUREMODE_RISING_AND_FALLING_EDGE CM_3 |
Referenced by Timer_A_initCapture().
#define TIMER_A_CAPTURE_ASYNCHRONOUS 0x00 |
Referenced by Timer_A_initCapture().
#define TIMER_A_CAPTURE_SYNCHRONOUS SCS |
Referenced by Timer_A_initCapture().
#define TIMER_A_CAPTURE_OVERFLOW COV |
Referenced by Timer_A_getCaptureCompareEnabledInterruptStatus().
#define TIMER_A_CAPTURECOMPARE_INTERRUPT_FLAG CCIFG |
Referenced by Timer_A_getCaptureCompareEnabledInterruptStatus().
#define TIMER_A_READ_SYNCHRONIZED_CAPTURECOMPAREINPUT SCCI |
Referenced by Timer_A_getSynchronizedCaptureCompareInput().
#define TIMER_A_READ_CAPTURE_COMPARE_INPUT CCI |
Referenced by Timer_A_getSynchronizedCaptureCompareInput().
#define TIMER_A_CAPTURECOMPARE_INPUT_HIGH 0x01 |
Referenced by Timer_A_getSynchronizedCaptureCompareInput().
#define TIMER_A_CAPTURECOMPARE_INPUT_LOW 0x00 |
Referenced by Timer_A_getSynchronizedCaptureCompareInput().
#define TIMER_A_OUTPUTMODE_OUTBITVALUE_HIGH OUT |
Referenced by Timer_A_getOutputForOutputModeOutBitValue().
#define TIMER_A_OUTPUTMODE_OUTBITVALUE_LOW 0x00 |
Referenced by Timer_A_getOutputForOutputModeOutBitValue().
#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 |
Referenced by 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 |
Type definition for _Timer_A_ContinuousModeConfig structure.
Type definition for _Timer_A_UpModeConfig structure.
Type definition for _Timer_A_UpDownModeConfig structure.
Type definition for _Timer_A_CaptureModeConfig structure.
Type definition for _Timer_A_CompareModeConfig structure.
Type definition for _Timer_A_PWMConfig structure.
void Timer_A_startCounter | ( | uint32_t | timer, |
uint_fast16_t | timerMode | ||
) |
Starts Timer_A counter
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
timerMode | selects Clock source. Valid values are
|
References ASSERT, TIMER_A_CMSIS, TIMER_A_CONTINUOUS_MODE, TIMER_A_UP_MODE, and TIMER_A_UPDOWN_MODE.
void Timer_A_configureContinuousMode | ( | uint32_t | timer, |
const Timer_A_ContinuousModeConfig * | config | ||
) |
Configures Timer_A in continuous mode.
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
config | Configuration structure for Timer_A continuous mode |
Configuration options for Timer_A_ContinuousModeConfig structure.
clockSource | selects Clock source. Valid values are
|
timerInterruptEnable_TAIE | is the divider for Clock source. Valid values are:
|
timerInterruptEnable_TAIE | is to enable or disable Timer_A interrupt. Valid values are
|
timerClear | decides if Timer_A clock divider, count direction, count need to be reset. Valid values are
|
References ASSERT, _Timer_A_ContinuousModeConfig::clockSource, _Timer_A_ContinuousModeConfig::clockSourceDivider, TIMER_A_CLOCKSOURCE_ACLK, TIMER_A_CLOCKSOURCE_DIVIDER_1, TIMER_A_CLOCKSOURCE_DIVIDER_10, TIMER_A_CLOCKSOURCE_DIVIDER_12, TIMER_A_CLOCKSOURCE_DIVIDER_14, TIMER_A_CLOCKSOURCE_DIVIDER_16, TIMER_A_CLOCKSOURCE_DIVIDER_2, TIMER_A_CLOCKSOURCE_DIVIDER_20, TIMER_A_CLOCKSOURCE_DIVIDER_24, TIMER_A_CLOCKSOURCE_DIVIDER_28, TIMER_A_CLOCKSOURCE_DIVIDER_3, TIMER_A_CLOCKSOURCE_DIVIDER_32, TIMER_A_CLOCKSOURCE_DIVIDER_4, TIMER_A_CLOCKSOURCE_DIVIDER_40, TIMER_A_CLOCKSOURCE_DIVIDER_48, TIMER_A_CLOCKSOURCE_DIVIDER_5, TIMER_A_CLOCKSOURCE_DIVIDER_56, TIMER_A_CLOCKSOURCE_DIVIDER_6, TIMER_A_CLOCKSOURCE_DIVIDER_64, TIMER_A_CLOCKSOURCE_DIVIDER_7, TIMER_A_CLOCKSOURCE_DIVIDER_8, TIMER_A_CLOCKSOURCE_EXTERNAL_TXCLK, TIMER_A_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK, TIMER_A_CLOCKSOURCE_SMCLK, TIMER_A_CMSIS, TIMER_A_DO_CLEAR, TIMER_A_SKIP_CLEAR, TIMER_A_TAIE_INTERRUPT_DISABLE, TIMER_A_TAIE_INTERRUPT_ENABLE, TIMER_A_UPDOWN_MODE, _Timer_A_ContinuousModeConfig::timerClear, and _Timer_A_ContinuousModeConfig::timerInterruptEnable_TAIE.
void Timer_A_configureUpMode | ( | uint32_t | timer, |
const Timer_A_UpModeConfig * | config | ||
) |
Configures Timer_A in up mode.
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
config | Configuration structure for Timer_A Up mode |
Configuration options for Timer_A_UpModeConfig structure.
clockSource | selects Clock source. Valid values are
|
clockSourceDivider | is the divider for Clock source. Valid values are:
|
timerPeriod | is the specified Timer_A period. This is the value that gets written into the CCR0. Limited to 16 bits[uint16_t] |
timerInterruptEnable_TAIE | is to enable or disable Timer_A interrupt. Valid values are:
|
captureCompareInterruptEnable_CCR0_CCIE | is to enable or disable Timer_A CCR0 captureComapre interrupt. Valid values are
|
timerClear | decides if Timer_A clock divider, count direction, count need to be reset. Valid values are
|
References ASSERT, _Timer_A_UpModeConfig::captureCompareInterruptEnable_CCR0_CCIE, _Timer_A_UpModeConfig::clockSource, _Timer_A_UpModeConfig::clockSourceDivider, TIMER_A_CCIE_CCR0_INTERRUPT_ENABLE, TIMER_A_CLOCKSOURCE_ACLK, TIMER_A_CLOCKSOURCE_EXTERNAL_TXCLK, TIMER_A_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK, TIMER_A_CLOCKSOURCE_SMCLK, TIMER_A_CMSIS, TIMER_A_DO_CLEAR, TIMER_A_SKIP_CLEAR, TIMER_A_TAIE_INTERRUPT_ENABLE, TIMER_A_UPDOWN_MODE, _Timer_A_UpModeConfig::timerClear, _Timer_A_UpModeConfig::timerInterruptEnable_TAIE, and _Timer_A_UpModeConfig::timerPeriod.
void Timer_A_configureUpDownMode | ( | uint32_t | timer, |
const Timer_A_UpDownModeConfig * | config | ||
) |
Configures Timer_A in up down mode.
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
config | Configuration structure for Timer_A UpDown mode |
Configuration options for Timer_A_UpDownModeConfig structure.
clockSource | selects Clock source. Valid values are
|
clockSourceDivider | is the divider for Clock source. Valid values are:
|
timerPeriod | is the specified Timer_A period |
timerInterruptEnable_TAIE | is to enable or disable Timer_A interrupt. Valid values are
|
captureCompareInterruptEnable_CCR0_CCIE | is to enable or disable Timer_A CCR0 captureComapre interrupt. Valid values are
|
timerClear | decides if Timer_A clock divider, count direction, count need to be reset. Valid values are
|
This API does not start the timer. Timer needs to be started when required using the Timer_A_startCounter API.
References ASSERT, _Timer_A_UpDownModeConfig::captureCompareInterruptEnable_CCR0_CCIE, _Timer_A_UpDownModeConfig::clockSource, _Timer_A_UpDownModeConfig::clockSourceDivider, TIMER_A_CCIE_CCR0_INTERRUPT_ENABLE, TIMER_A_CLOCKSOURCE_ACLK, TIMER_A_CLOCKSOURCE_EXTERNAL_TXCLK, TIMER_A_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK, TIMER_A_CLOCKSOURCE_SMCLK, TIMER_A_CMSIS, TIMER_A_DO_CLEAR, TIMER_A_SKIP_CLEAR, TIMER_A_STOP_MODE, TIMER_A_TAIE_INTERRUPT_ENABLE, TIMER_A_UPDOWN_MODE, _Timer_A_UpDownModeConfig::timerClear, _Timer_A_UpDownModeConfig::timerInterruptEnable_TAIE, and _Timer_A_UpDownModeConfig::timerPeriod.
void Timer_A_initCapture | ( | uint32_t | timer, |
const Timer_A_CaptureModeConfig * | config | ||
) |
Initializes Capture Mode
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
config | Configuration structure for Timer_A capture mode |
Configuration options for Timer_A_CaptureModeConfig structure.
captureRegister | selects the Capture register being used. Valid values are
|
captureMode | is the capture mode selected. Valid values are
|
captureInputSelect | decides the Input Select
|
synchronizeCaptureSource | decides if capture source should be synchronized with timer clock Valid values are
|
captureInterruptEnable | is to enable or disable timer captureComapre interrupt. Valid values are
|
captureOutputMode | specifies the ouput mode. Valid values are
|
References ASSERT, _Timer_A_CaptureModeConfig::captureInputSelect, _Timer_A_CaptureModeConfig::captureInterruptEnable, _Timer_A_CaptureModeConfig::captureMode, _Timer_A_CaptureModeConfig::captureOutputMode, _Timer_A_CaptureModeConfig::captureRegister, _Timer_A_CaptureModeConfig::synchronizeCaptureSource, TIMER_A_CAPTURE_ASYNCHRONOUS, TIMER_A_CAPTURE_INPUTSELECT_CCIxA, TIMER_A_CAPTURE_INPUTSELECT_CCIxB, TIMER_A_CAPTURE_INPUTSELECT_GND, TIMER_A_CAPTURE_INPUTSELECT_Vcc, TIMER_A_CAPTURE_SYNCHRONOUS, TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE, TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE, TIMER_A_CAPTURECOMPARE_REGISTER_0, TIMER_A_CAPTURECOMPARE_REGISTER_1, TIMER_A_CAPTURECOMPARE_REGISTER_2, TIMER_A_CAPTURECOMPARE_REGISTER_3, TIMER_A_CAPTURECOMPARE_REGISTER_4, TIMER_A_CAPTURECOMPARE_REGISTER_5, TIMER_A_CAPTURECOMPARE_REGISTER_6, TIMER_A_CAPTUREMODE_FALLING_EDGE, TIMER_A_CAPTUREMODE_NO_CAPTURE, TIMER_A_CAPTUREMODE_RISING_AND_FALLING_EDGE, TIMER_A_CAPTUREMODE_RISING_EDGE, TIMER_A_DO_CLEAR, TIMER_A_OUTPUTMODE_OUTBITVALUE, TIMER_A_OUTPUTMODE_RESET, TIMER_A_OUTPUTMODE_RESET_SET, TIMER_A_OUTPUTMODE_SET, TIMER_A_OUTPUTMODE_SET_RESET, TIMER_A_OUTPUTMODE_TOGGLE, TIMER_A_OUTPUTMODE_TOGGLE_RESET, TIMER_A_OUTPUTMODE_TOGGLE_SET, and TIMER_A_TAIE_INTERRUPT_ENABLE.
void Timer_A_initCompare | ( | uint32_t | timer, |
const Timer_A_CompareModeConfig * | config | ||
) |
Initializes Compare Mode
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
config | Configuration structure for Timer_A compare mode |
Configuration options for Timer_A_CompareModeConfig structure.
compareRegister | selects the Capture register being used. Valid values are
|
compareInterruptEnable | is to enable or disable timer captureComapre interrupt. Valid values are
|
compareOutputMode | specifies the output mode. Valid values are
|
compareValue | is the count to be compared with in compare mode |
References ASSERT, _Timer_A_CompareModeConfig::compareInterruptEnable, _Timer_A_CompareModeConfig::compareOutputMode, _Timer_A_CompareModeConfig::compareRegister, _Timer_A_CompareModeConfig::compareValue, OFS_TAxR, TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE, TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE, TIMER_A_CAPTURECOMPARE_REGISTER_0, TIMER_A_CAPTURECOMPARE_REGISTER_1, TIMER_A_CAPTURECOMPARE_REGISTER_2, TIMER_A_CAPTURECOMPARE_REGISTER_3, TIMER_A_CAPTURECOMPARE_REGISTER_4, TIMER_A_CAPTURECOMPARE_REGISTER_5, TIMER_A_CAPTURECOMPARE_REGISTER_6, TIMER_A_OUTPUTMODE_OUTBITVALUE, TIMER_A_OUTPUTMODE_RESET, TIMER_A_OUTPUTMODE_RESET_SET, TIMER_A_OUTPUTMODE_SET, TIMER_A_OUTPUTMODE_SET_RESET, TIMER_A_OUTPUTMODE_TOGGLE, TIMER_A_OUTPUTMODE_TOGGLE_RESET, and TIMER_A_OUTPUTMODE_TOGGLE_SET.
void Timer_A_clearTimer | ( | uint32_t | timer | ) |
Reset/Clear the timer clock divider, count direction, count
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
References TIMER_A_CMSIS.
uint_fast8_t Timer_A_getSynchronizedCaptureCompareInput | ( | uint32_t | timer, |
uint_fast16_t | captureCompareRegister, | ||
uint_fast16_t | synchronizedSetting | ||
) |
Get synchronized capture compare input
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
captureCompareRegister | selects the Capture register being used. Valid values are
|
synchronizedSetting | is to select type of capture compare input. Valid values are
|
References ASSERT, TIMER_A_CAPTURECOMPARE_INPUT_HIGH, TIMER_A_CAPTURECOMPARE_INPUT_LOW, TIMER_A_CAPTURECOMPARE_REGISTER_0, TIMER_A_CAPTURECOMPARE_REGISTER_1, TIMER_A_CAPTURECOMPARE_REGISTER_2, TIMER_A_CAPTURECOMPARE_REGISTER_3, TIMER_A_CAPTURECOMPARE_REGISTER_4, TIMER_A_CAPTURECOMPARE_REGISTER_5, TIMER_A_CAPTURECOMPARE_REGISTER_6, TIMER_A_READ_CAPTURE_COMPARE_INPUT, and TIMER_A_READ_SYNCHRONIZED_CAPTURECOMPAREINPUT.
uint_fast8_t Timer_A_getOutputForOutputModeOutBitValue | ( | uint32_t | timer, |
uint_fast16_t | captureCompareRegister | ||
) |
Get ouput bit for output mode
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
captureCompareRegister | selects the Capture register being used. Valid values are
|
References ASSERT, TIMER_A_CAPTURECOMPARE_REGISTER_0, TIMER_A_CAPTURECOMPARE_REGISTER_1, TIMER_A_CAPTURECOMPARE_REGISTER_2, TIMER_A_CAPTURECOMPARE_REGISTER_3, TIMER_A_CAPTURECOMPARE_REGISTER_4, TIMER_A_CAPTURECOMPARE_REGISTER_5, TIMER_A_CAPTURECOMPARE_REGISTER_6, TIMER_A_OUTPUTMODE_OUTBITVALUE_HIGH, and TIMER_A_OUTPUTMODE_OUTBITVALUE_LOW.
uint_fast16_t Timer_A_getCaptureCompareCount | ( | uint32_t | timer, |
uint_fast16_t | captureCompareRegister | ||
) |
Get current capture compare count
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
captureCompareRegister | selects the Capture register being used. Valid values are
|
References ASSERT, OFS_TAxR, TIMER_A_CAPTURECOMPARE_REGISTER_0, TIMER_A_CAPTURECOMPARE_REGISTER_1, TIMER_A_CAPTURECOMPARE_REGISTER_2, TIMER_A_CAPTURECOMPARE_REGISTER_3, TIMER_A_CAPTURECOMPARE_REGISTER_4, TIMER_A_CAPTURECOMPARE_REGISTER_5, and TIMER_A_CAPTURECOMPARE_REGISTER_6.
void Timer_A_setOutputForOutputModeOutBitValue | ( | uint32_t | timer, |
uint_fast16_t | captureCompareRegister, | ||
uint_fast8_t | outputModeOutBitValue | ||
) |
Set ouput bit for output mode
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
captureCompareRegister | selects the Capture register being used. are
|
outputModeOutBitValue | the value to be set for out bit. Valid values are:
|
References TIMER_A_setOutputForOutputModeOutBitValue.
void Timer_A_generatePWM | ( | uint32_t | timer, |
const Timer_A_PWMConfig * | config | ||
) |
Generate a PWM with timer running in up mode
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
config | Configuration structure for Timer_A PWM mode |
Configuration options for Timer_A_PWMConfig structure.
clockSource | selects Clock source. Valid values are
|
clockSourceDivider | is the divider for Clock source. Valid values are
|
timerPeriod | selects the desired timer period |
compareRegister | selects the compare register being used. Valid values are
|
compareOutputMode | specifies the ouput mode. Valid values are:
|
dutyCycle | specifies the dutycycle for the generated waveform |
References ASSERT, _Timer_A_PWMConfig::clockSource, _Timer_A_PWMConfig::clockSourceDivider, _Timer_A_PWMConfig::compareOutputMode, _Timer_A_PWMConfig::compareRegister, _Timer_A_PWMConfig::dutyCycle, OFS_TAxCCTL0, OFS_TAxR, TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE, TIMER_A_CAPTURECOMPARE_REGISTER_0, TIMER_A_CAPTURECOMPARE_REGISTER_1, TIMER_A_CAPTURECOMPARE_REGISTER_2, TIMER_A_CAPTURECOMPARE_REGISTER_3, TIMER_A_CAPTURECOMPARE_REGISTER_4, TIMER_A_CAPTURECOMPARE_REGISTER_5, TIMER_A_CAPTURECOMPARE_REGISTER_6, TIMER_A_CLOCKSOURCE_ACLK, TIMER_A_CLOCKSOURCE_EXTERNAL_TXCLK, TIMER_A_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK, TIMER_A_CLOCKSOURCE_SMCLK, TIMER_A_CMSIS, TIMER_A_DO_CLEAR, TIMER_A_OUTPUTMODE_OUTBITVALUE, TIMER_A_OUTPUTMODE_RESET, TIMER_A_OUTPUTMODE_RESET_SET, TIMER_A_OUTPUTMODE_SET, TIMER_A_OUTPUTMODE_SET_RESET, TIMER_A_OUTPUTMODE_TOGGLE, TIMER_A_OUTPUTMODE_TOGGLE_RESET, TIMER_A_OUTPUTMODE_TOGGLE_SET, TIMER_A_TAIE_INTERRUPT_ENABLE, TIMER_A_UP_MODE, TIMER_A_UPDOWN_MODE, and _Timer_A_PWMConfig::timerPeriod.
void Timer_A_stopTimer | ( | uint32_t | timer | ) |
Stops the timer
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
References TIMER_A_CMSIS.
void Timer_A_setCompareValue | ( | uint32_t | timer, |
uint_fast16_t | compareRegister, | ||
uint_fast16_t | compareValue | ||
) |
Sets the value of the capture-compare register
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
compareRegister | selects the Capture register being used. Valid values are
|
compareValue | is the count to be compared with in compare mode |
References ASSERT, OFS_TAxR, TIMER_A_CAPTURECOMPARE_REGISTER_0, TIMER_A_CAPTURECOMPARE_REGISTER_1, TIMER_A_CAPTURECOMPARE_REGISTER_2, TIMER_A_CAPTURECOMPARE_REGISTER_3, TIMER_A_CAPTURECOMPARE_REGISTER_4, TIMER_A_CAPTURECOMPARE_REGISTER_5, and TIMER_A_CAPTURECOMPARE_REGISTER_6.
uint16_t Timer_A_getCounterValue | ( | uint32_t | timer | ) |
Returns the current value of the specified timer. Note that according to the Timer A user guide, reading the value of the counter is unreliable if the system clock is asynchronous from the timer clock. The API addresses this concern by reading the timer count register twice and then determining the integrity of the value. If the two values are within 10 timer counts of each other, the value is deemed safe and returned. If not, the process is repeated until a reliable timer value is determined.
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
References TIMER_A_CMSIS, and TIMER_A_THRESHOLD.
void Timer_A_clearInterruptFlag | ( | uint32_t | timer | ) |
Clears the Timer TAIFG interrupt flag
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
References TIMER_A_CMSIS.
void Timer_A_clearCaptureCompareInterrupt | ( | uint32_t | timer, |
uint_fast16_t | captureCompareRegister | ||
) |
Clears the capture-compare interrupt flag
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
captureCompareRegister | selects the Capture-compare register being used. Valid values are
|
References ASSERT, TIMER_A_CAPTURECOMPARE_REGISTER_0, TIMER_A_CAPTURECOMPARE_REGISTER_1, TIMER_A_CAPTURECOMPARE_REGISTER_2, TIMER_A_CAPTURECOMPARE_REGISTER_3, TIMER_A_CAPTURECOMPARE_REGISTER_4, TIMER_A_CAPTURECOMPARE_REGISTER_5, and TIMER_A_CAPTURECOMPARE_REGISTER_6.
void Timer_A_enableInterrupt | ( | uint32_t | timer | ) |
Enable timer interrupt
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
References TIMER_A_CMSIS.
void Timer_A_disableInterrupt | ( | uint32_t | timer | ) |
Disable timer interrupt
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
References TIMER_A_CMSIS.
uint32_t Timer_A_getInterruptStatus | ( | uint32_t | timer | ) |
Get timer interrupt status
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
References TIMER_A_CMSIS.
Referenced by Timer_A_getEnabledInterruptStatus().
uint32_t Timer_A_getEnabledInterruptStatus | ( | uint32_t | timer | ) |
Get timer interrupt status masked with the enabled interrupts. This function is useful to call in ISRs to get a list of pending interrupts that are actually enabled and could have caused the ISR.
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
References TIMER_A_CMSIS, and Timer_A_getInterruptStatus().
void Timer_A_enableCaptureCompareInterrupt | ( | uint32_t | timer, |
uint_fast16_t | captureCompareRegister | ||
) |
Enable capture compare interrupt
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
captureCompareRegister | is the selected capture compare register |
References ASSERT, TIMER_A_CAPTURECOMPARE_REGISTER_0, TIMER_A_CAPTURECOMPARE_REGISTER_1, TIMER_A_CAPTURECOMPARE_REGISTER_2, TIMER_A_CAPTURECOMPARE_REGISTER_3, TIMER_A_CAPTURECOMPARE_REGISTER_4, TIMER_A_CAPTURECOMPARE_REGISTER_5, and TIMER_A_CAPTURECOMPARE_REGISTER_6.
void Timer_A_disableCaptureCompareInterrupt | ( | uint32_t | timer, |
uint_fast16_t | captureCompareRegister | ||
) |
Disable capture compare interrupt
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
captureCompareRegister | is the selected capture compare register |
References ASSERT, TIMER_A_CAPTURECOMPARE_REGISTER_0, TIMER_A_CAPTURECOMPARE_REGISTER_1, TIMER_A_CAPTURECOMPARE_REGISTER_2, TIMER_A_CAPTURECOMPARE_REGISTER_3, TIMER_A_CAPTURECOMPARE_REGISTER_4, TIMER_A_CAPTURECOMPARE_REGISTER_5, and TIMER_A_CAPTURECOMPARE_REGISTER_6.
uint32_t Timer_A_getCaptureCompareInterruptStatus | ( | uint32_t | timer, |
uint_fast16_t | captureCompareRegister, | ||
uint_fast16_t | mask | ||
) |
Return capture compare interrupt status
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
captureCompareRegister | is the selected capture compare register |
mask | is the mask for the interrupt status Mask value is the logical OR of any of the following:
|
Referenced by Timer_A_getCaptureCompareEnabledInterruptStatus().
uint32_t Timer_A_getCaptureCompareEnabledInterruptStatus | ( | uint32_t | timer, |
uint_fast16_t | captureCompareRegister | ||
) |
Return capture compare interrupt status masked with the enabled interrupts. This function is useful to call in ISRs to get a list of pending interrupts that are actually enabled and could have caused the ISR.
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
captureCompareRegister | is the selected capture compare register |
References TIMER_A_CAPTURE_OVERFLOW, TIMER_A_CAPTURECOMPARE_INTERRUPT_FLAG, and Timer_A_getCaptureCompareInterruptStatus().
void Timer_A_registerInterrupt | ( | uint32_t | timer, |
uint_fast8_t | interruptSelect, | ||
void(*)(void) | intHandler | ||
) |
Registers an interrupt handler for the timer capture compare interrupt.
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
interruptSelect | Selects which timer interrupt handler to register. For the timer module, there are two separate interrupt handlers that can be registered:
|
intHandler | is a pointer to the function to be called when the timer capture compare interrupt occurs. |
This function registers the handler to be called when a timer interrupt occurs. This function enables the global interrupt in the interrupt controller; specific Timer_Ainterrupts must be enabled via Timer_A_enableInterrupt(). It is the interrupt handler's responsibility to clear the interrupt source via Timer_A_clearCaptureCompareInterrupt().
References ASSERT, Interrupt_enableInterrupt(), Interrupt_registerInterrupt(), TIMER_A_CCR0_INTERRUPT, and TIMER_A_CCRX_AND_OVERFLOW_INTERRUPT.
void Timer_A_unregisterInterrupt | ( | uint32_t | timer, |
uint_fast8_t | interruptSelect | ||
) |
Unregisters the interrupt handler for the timer
timer | is the instance of the Timer_A module. Valid parameters vary from part to part, but can include:
|
interruptSelect | Selects which timer interrupt handler to register. For the timer module, there are two separate interrupt handlers that can be registered:
|
This function unregisters the handler to be called when timer interrupt occurs. This function also masks off the interrupt in the interrupt controller so that the interrupt handler no longer is called.
References ASSERT, Interrupt_disableInterrupt(), Interrupt_unregisterInterrupt(), TIMER_A_CCR0_INTERRUPT, and TIMER_A_CCRX_AND_OVERFLOW_INTERRUPT.