Timer Driver is a 16-bit timer or 32-bit timer that can operate as a free-running interval timer using dsPIC MCUs.
More...
|
file | tmr1.c |
| This is the generated driver source file for TMR1 driver.
|
|
file | tmr1.h |
| This is the generated driver header file for the TMR1 driver.
|
|
|
void | TMR1_Initialize (void) |
| Initializes the TMR1 module.
|
|
void | TMR1_Deinitialize (void) |
| Deinitializes the TMR1 to POR values.
|
|
void | TMR1_Start (void) |
| Starts the timer.
|
|
void | TMR1_Stop (void) |
| Stops the timer.
|
|
void | TMR1_PeriodSet (uint32_t count) |
| Sets the TMR1 period count value.
|
|
static uint32_t | TMR1_PeriodGet (void) |
| This inline function gets the TMR1 period count value.
|
|
static uint32_t | TMR1_CounterGet (void) |
| This inline function gets the TMR1 elapsed time value.
|
|
static uint16_t | TMR1_Counter16BitGet (void) |
| This inline function gets the 16 bit TMR1 elapsed time value.
|
|
void | TMR1_InterruptPrioritySet (enum INTERRUPT_PRIORITY priority) |
| Sets the TMR1 interrupt priority value.
|
|
void | TMR1_TimeoutCallbackRegister (void(*handler)(void)) |
| This function can be used to override default callback and to define custom callback for TMR1 Timeout event.
|
|
void | TMR1_TimeoutCallback (void) |
| This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using TMR1_TimeoutCallbackRegister.
|
|
|
const struct TIMER_INTERFACE | Timer1 |
| Structure object of type TIMER_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Timer1 can be changed by the user in the TIMER user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.
|
|
◆ Timer1_Counter16BitGet
◆ Timer1_CounterGet
◆ Timer1_Deinitialize
◆ Timer1_Initialize
◆ Timer1_InterruptPrioritySet
◆ Timer1_PeriodGet
◆ Timer1_PeriodSet
◆ Timer1_Start
◆ Timer1_Stop
◆ Timer1_TimeoutCallbackRegister
◆ TIMER_PERIODCOUNTSET_API_SUPPORT
#define TIMER_PERIODCOUNTSET_API_SUPPORT false |
◆ TMR1_Counter16BitGet()
static uint16_t TMR1_Counter16BitGet |
( |
void | | ) |
|
|
inlinestatic |
- Parameters
-
- Returns
- 16 bit elapsed count value of the timer
Definition at line 192 of file tmr1.h.
◆ TMR1_CounterGet()
static uint32_t TMR1_CounterGet |
( |
void | | ) |
|
|
inlinestatic |
- Parameters
-
- Returns
- Elapsed count value of the timer
Definition at line 181 of file tmr1.h.
◆ TMR1_Deinitialize()
void TMR1_Deinitialize |
( |
void | | ) |
|
- Parameters
-
- Returns
- none
Definition at line 85 of file tmr1.c.
◆ TMR1_Initialize()
void TMR1_Initialize |
( |
void | | ) |
|
- Parameters
-
- Returns
- none
Definition at line 71 of file tmr1.c.
◆ TMR1_InterruptPrioritySet()
void TMR1_InterruptPrioritySet |
( |
enum INTERRUPT_PRIORITY | priority | ) |
|
- Parameters
-
[in] | priority | - value of interrupt priority |
- Returns
- none
Definition at line 119 of file tmr1.c.
◆ TMR1_PeriodGet()
static uint32_t TMR1_PeriodGet |
( |
void | | ) |
|
|
inlinestatic |
- Parameters
-
- Returns
- Number of clock counts
Definition at line 170 of file tmr1.h.
◆ TMR1_PeriodSet()
void TMR1_PeriodSet |
( |
uint32_t | count | ) |
|
- Parameters
-
[in] | count | - number of clock counts |
- Returns
- none
Definition at line 114 of file tmr1.c.
◆ TMR1_Start()
◆ TMR1_Stop()
◆ TMR1_TimeoutCallback()
void TMR1_TimeoutCallback |
( |
void | | ) |
|
◆ TMR1_TimeoutCallbackRegister()
void TMR1_TimeoutCallbackRegister |
( |
void(* | handler )(void) | ) |
|
- Parameters
-
[in] | handler | - Address of the callback function.
|
- Returns
- none
Definition at line 124 of file tmr1.c.
◆ Timer1