Bar Logo 3.8/7.6 kw Totem pole Demonstration Application (Part-No. (not specified))
 
Content
     
Loading...
Searching...
No Matches
timer_interface.h
1
16/*
17© [2024] Microchip Technology Inc. and its subsidiaries.
18
19 Subject to your compliance with these terms, you may use Microchip
20 software and any derivatives exclusively with Microchip products.
21 You are responsible for complying with 3rd party license terms
22 applicable to your use of 3rd party software (including open source
23 software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
24 NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
25 SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
26 MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
27 WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
28 INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
29 KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
30 MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
31 FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
32 TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
33 EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
34 THIS SOFTWARE.
35*/
36
37#ifndef TIMER_INTERFACE_H
38#define TIMER_INTERFACE_H
39
40// Section: Included Files
41#include <stddef.h>
42#include <stdint.h>
43#include <stdbool.h>
44#include "../system/interrupt_types.h"
45
46// Section: Data Type Definitions
47
53#define TIMER_PERIODCOUNTSET_API_SUPPORT false
54
60struct TIMER_INTERFACE
61{
62 void (*Initialize)(void);
64
65 void (*Deinitialize)(void);
67
68 void (*Start)(void);
70
71 void (*Stop)(void);
73
74 #if TIMER_PERIODCOUNTSET_API_SUPPORT
75 void (*PeriodCountSet)(size_t count);
77 #endif
78
79 void (*PeriodSet)(uint32_t count);
81
82 uint32_t (*PeriodGet)(void);
84
85 uint32_t (*CounterGet)(void);
87
88 void (*InterruptPrioritySet)(enum INTERRUPT_PRIORITY priority);
90
91 void (*TimeoutCallbackRegister)(void (*CallbackHandler)(void));
93
94 void (*Tasks)(void);
96};
97
98#endif // TIMER_INTERFACE_H
99
Structure containing the function pointers of TIMER driver.
void(* TimeoutCallbackRegister)(void(*CallbackHandler)(void))
Pointer to MCCPx_TimeoutCallbackRegister or SCCPx_TimeoutCallbackRegister or TMRx_TimeoutCallbackRegi...
void(* Initialize)(void)
Pointer to MCCPx_Timer_Initialize or SCCPx_Timer_Initialize or TMRx_Initialize e.g....
void(* Start)(void)
Pointer to MCCPx_Timer_Start or SCCPx_Timer_Start or TMRx_Start e.g. SCCP1_Timer_Start or TMR1_Start.
void(* Deinitialize)(void)
Pointer to MCCPx_Timer_Deinitialize or SCCPx_Timer_Deinitialize or TMRx_Deinitialize e....
uint32_t(* CounterGet)(void)
Pointer to MCCPx_Timer_CounterGet or SCCPx_Timer_CounterGet or TMRx_CounterGet e.g....
void(* PeriodSet)(uint32_t count)
Pointer to MCCPx_Timer_PeriodSet or SCCPx_Timer_PeriodSet or TMRx_PeriodSet e.g. SCCP1_Timer_PeriodSe...
void(* InterruptPrioritySet)(enum INTERRUPT_PRIORITY priority)
Pointer to MCCPx_Timer_InterruptPrioritySet or SCCPx_Timer_InterruptPrioritySet or TMRx_InterruptPrio...
uint32_t(* PeriodGet)(void)
Pointer to MCCPx_Timer_PeriodGet or SCCPx_Timer_PeriodGet or TMRx_PeriodGet e.g. SCCP1_Timer_PeriodGe...
void(* Stop)(void)
Pointer to MCCPx_Timer_Stop or SCCPx_Timer_Stop or TMRx_Stop e.g. SCCP1_Timer_Stop or TMR1_Stop.
void(* Tasks)(void)
Pointer to MCCPx_Timer_Tasks or SCCPx_Timer_Tasks or TMRx_Tasks e.g. SCCP1_Timer_Tasks or TMR1_Tasks ...