|  | Dual Active Bridge Development Board (Part-No. ) |
Content |  |  |  |  |  |

Loading...
Searching...
No Matches
tmr1.h
Go to the documentation of this file.
1
17/*
18© [2024] Microchip Technology Inc. and its subsidiaries.
19
20 Subject to your compliance with these terms, you may use Microchip
21 software and any derivatives exclusively with Microchip products.
22 You are responsible for complying with 3rd party license terms
23 applicable to your use of 3rd party software (including open source
24 software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
25 NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
26 SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
27 MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
28 WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
29 INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
30 KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
31 MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
32 FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
33 TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
34 EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
35 THIS SOFTWARE.
36*/
37
38#ifndef TMR1_H
39#define TMR1_H
40
41// Section: Included Files
42
43#include <stddef.h>
44#include <stdint.h>
45#include <xc.h>
46#include "timer_interface.h"
47// Section: Data Type Definitions
48
49
58extern const struct TIMER_INTERFACE Timer1;
59
64#define Timer1_Initialize TMR1_Initialize
69#define Timer1_Deinitialize TMR1_Deinitialize
74#define Timer1_Start TMR1_Start
79#define Timer1_Stop TMR1_Stop
80
81#if TIMER_PERIODCOUNTSET_API_SUPPORT
86#define Timer1_PeriodCountSet TMR1_PeriodCountSet
87#endif
88
93#define Timer1_PeriodSet TMR1_PeriodSet
98#define Timer1_PeriodGet TMR1_PeriodGet
103#define Timer1_CounterGet TMR1_CounterGet
108#define Timer1_Counter16BitGet TMR1_Counter16BitGet
113#define Timer1_InterruptPrioritySet TMR1_InterruptPrioritySet
118#define Timer1_TimeoutCallbackRegister TMR1_TimeoutCallbackRegister
119
120// Section: TMR1 Module APIs
127void TMR1_Initialize ( void );
128
135void TMR1_Deinitialize(void);
136
137
145void TMR1_Start( void );
146
154void TMR1_Stop( void );
155
162void TMR1_PeriodSet( uint32_t count );
163
170 inline static uint32_t TMR1_PeriodGet( void )
171{
172 return (uint32_t) PR1;
173}
174
181 inline static uint32_t TMR1_CounterGet( void )
182{
183 return (uint32_t)TMR1;
184}
185
192 inline static uint16_t TMR1_Counter16BitGet( void )
193{
194 return TMR1;
195}
196
203void TMR1_InterruptPrioritySet(enum INTERRUPT_PRIORITY priority);
204
212void TMR1_TimeoutCallbackRegister(void (*handler)(void));
213
222 void TMR1_TimeoutCallback(void);
223
224
225#if TIMER_PERIODCOUNTSET_API_SUPPORT
232void TMR1_PeriodCountSet(size_t count) __attribute__((deprecated ("\nThis will be removed in future MCC releases. \nUse TMR1_PeriodSet instead. ")));
233#endif
234
235#endif //TMR1_H
236
__attribute__
void __attribute__((weak))
Definition adc1.c:569
TMR1_PeriodCountSet
void TMR1_PeriodCountSet(size_t count)
Definition tmr1.c:143
TMR1_PeriodGet
static uint32_t TMR1_PeriodGet(void)
This inline function gets the TMR1 period count value.
Definition tmr1.h:170
TMR1_Stop
void TMR1_Stop(void)
Stops the timer.
Definition tmr1.c:105
TMR1_Deinitialize
void TMR1_Deinitialize(void)
Deinitializes the TMR1 to POR values.
Definition tmr1.c:85
Timer1
const struct TIMER_INTERFACE Timer1
Structure object of type TIMER_INTERFACE with the custom name given by the user in the Melody Driver ...
Definition tmr1.c:53
TMR1_CounterGet
static uint32_t TMR1_CounterGet(void)
This inline function gets the TMR1 elapsed time value.
Definition tmr1.h:181
TMR1_TimeoutCallback
void TMR1_TimeoutCallback(void)
This is the default callback with weak attribute. The user can override and implement the default cal...
TMR1_Counter16BitGet
static uint16_t TMR1_Counter16BitGet(void)
This inline function gets the 16 bit TMR1 elapsed time value.
Definition tmr1.h:192
TMR1_TimeoutCallbackRegister
void TMR1_TimeoutCallbackRegister(void(*handler)(void))
This function can be used to override default callback and to define custom callback for TMR1 Timeout...
Definition tmr1.c:124
TMR1_InterruptPrioritySet
void TMR1_InterruptPrioritySet(enum INTERRUPT_PRIORITY priority)
Sets the TMR1 interrupt priority value.
Definition tmr1.c:119
TMR1_Initialize
void TMR1_Initialize(void)
Initializes the TMR1 module.
Definition tmr1.c:71
TMR1_PeriodSet
void TMR1_PeriodSet(uint32_t count)
Sets the TMR1 period count value.
Definition tmr1.c:114
TMR1_Start
void TMR1_Start(void)
Starts the timer.
Definition tmr1.c:94
TIMER_INTERFACE
Structure containing the function pointers of TIMER driver.
Definition timer_interface.h:61