Bar Logo 3.8/7.6 kw Totem pole Demonstration Application (Part-No. (not specified))
 
Content
     
Loading...
Searching...
No Matches
adc_interface.h
1
18/*
19© [2024] Microchip Technology Inc. and its subsidiaries.
20
21 Subject to your compliance with these terms, you may use Microchip
22 software and any derivatives exclusively with Microchip products.
23 You are responsible for complying with 3rd party license terms
24 applicable to your use of 3rd party software (including open source
25 software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
26 NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
27 SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
28 MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
29 WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
30 INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
31 KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
32 MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
33 FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
34 TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
35 EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
36 THIS SOFTWARE.
37*/
38
39#ifndef ADC_INTERFACE_H
40#define ADC_INTERFACE_H
41
42// Section: Included Files
43#include <stdint.h>
44#include <stdbool.h>
45#include "adc_types.h"
46#include "../system/interrupt_types.h"
47
48#ifdef __cplusplus //Provide C++ Compatibility
49
50 extern "C" {
51
52#endif
53
54// Section: Data Type Definitions
55
62{
63 void (*Initialize)(void);
65
66 void (*Deinitialize)(void);
68
69 void (*Enable)(void);
71
72 void (*Disable)(void);
74
75 void (*SoftwareTriggerEnable)(void);
77
78 void (*SoftwareTriggerDisable)(void);
80
81 void (*ChannelSelect)(enum ADC_CHANNEL channel);
83
84 uint16_t (*ConversionResultGet)(enum ADC_CHANNEL channel);
86
87 bool (*IsConversionComplete)(enum ADC_CHANNEL channel);
89
90 void (*ResolutionSet)(enum ADC_RESOLUTION_TYPE resolution);
92
93 void (*InterruptEnable)(void);
95
96 void (*InterruptDisable)(void);
98
99 void (*InterruptFlagClear)(void);
101
102 void (*InterruptPrioritySet)(uint16_t priorityValue);
104
105 void (*CommonCallbackRegister)(void (*callback)(void));
107
108 void (*Tasks)(void);
110
113
114};
115
122{
123 void (*ChannelCallbackRegister)(void(*callback)(enum ADC_CHANNEL channel, uint16_t adcVal));
125
126 void (*ComparatorCallbackRegister)(void(*callback)(enum ADC_CMP comparator));
128
129 void (*ChannelTasks)(enum ADC_CHANNEL channel);
131
132 void (*ComparatorTasks)(enum ADC_CMP comparator);
134
137
140
143
144 void (*IndividualChannelInterruptPrioritySet)(enum ADC_CHANNEL channel,enum INTERRUPT_PRIORITY priorityValue);
146
149
150 void (*SharedCorePowerEnable) (void);
152
153
154 void (*PWMTriggerSourceSet)(enum ADC_CHANNEL channel, enum ADC_PWM_INSTANCE pwmInstance, enum ADC_PWM_TRIGGERS triggerNumber);
156};
157
158#ifdef __cplusplus // Provide C++ Compatibility
159
160 }
161
162#endif
163
164#endif //ADC_INTERFACE_H
This is the generated driver types header file for the ADC driver.
ADC_RESOLUTION_TYPE
Defines the supported ADC resolution types.
Definition adc_types.h:91
ADC_PWM_TRIGGERS
Defines the PWM triggers that are available in each individual PWM.
Definition adc_types.h:128
ADC_CMP
Defines the ADC comparators that are available for the module to use.
Definition adc_types.h:105
ADC_PWM_INSTANCE
Defines the ADC PWM trigger sources that are available for the module to use.
Definition adc_types.h:118
ADC_DEDICATED_CORE
Defines the ADC cores that are available for the module to use.
Definition adc_types.h:76
ADC_CHANNEL
Defines the ADC channles that are selected from the MCC Melody User Interface for the ADC conversions...
Definition adc_types.h:56
Structure containing the function pointers of ADC driver.
void(* Enable)(void)
Pointer to ADCx_Enable e.g. ADC1_Enable.
const struct ADC_MULTICORE * adcMulticoreInterface
Pointer to ADC_MULTICORE.
void(* Tasks)(void)
Pointer to ADCx_Tasks e.g. ADC1_Tasks (Supported only in polling mode)
void(* ChannelSelect)(enum ADC_CHANNEL channel)
Pointer to ADCx_ChannelSelect e.g. ADC1_ChannelSelect.
void(* ResolutionSet)(enum ADC_RESOLUTION_TYPE resolution)
Pointer to ADCx_ResolutionSet e.g. ADC1_ResolutionSet.
uint16_t(* ConversionResultGet)(enum ADC_CHANNEL channel)
Pointer to ADCx_ConversionResultGet e.g. ADC1_ConversionResultGet.
void(* InterruptEnable)(void)
Pointer to ADCx_InterruptEnable e.g. ADC1_InterruptEnable.
void(* CommonCallbackRegister)(void(*callback)(void))
Pointer to ADCx_CommonCallbackRegister e.g. ADC1_CommonCallbackRegister.
void(* InterruptPrioritySet)(uint16_t priorityValue)
Pointer to ADCx_InterruptPrioritySet e.g. ADC1_InterruptPrioritySet.
void(* Disable)(void)
Pointer to ADCx_Disable e.g. ADC1_Disable.
bool(* IsConversionComplete)(enum ADC_CHANNEL channel)
Pointer to ADCx_IsConversionComplete e.g. ADC1_IsConversionComplete.
void(* Deinitialize)(void)
Pointer to ADCx_Deinitialize e.g. ADC1_Deinitialize.
void(* InterruptFlagClear)(void)
Pointer to ADCx_InterruptFlagClear e.g. ADC1_InterruptFlagClear.
void(* SoftwareTriggerEnable)(void)
Pointer to ADCx_SoftwareTriggerEnable e.g. ADC1_SoftwareTriggerEnable.
void(* SoftwareTriggerDisable)(void)
Pointer to ADCx_SoftwareTriggerDisable e.g. ADC1_SoftwareTriggerDisable.
void(* InterruptDisable)(void)
Pointer to ADCx_InterruptDisable e.g. ADC1_InterruptDisable.
void(* Initialize)(void)
Pointer to ADCx_Initialize e.g. ADC1_Initialize.
Structure containing the function pointers of ADC driver.
void(* ComparatorCallbackRegister)(void(*callback)(enum ADC_CMP comparator))
Pointer to ADCx_ComparatorCallbackRegister e.g. ADC1_ComparatorCallbackRegister.
void(* IndividualChannelInterruptFlagClear)(enum ADC_CHANNEL channel)
Pointer to ADCx_IndividualChannelInterruptFlagClear e.g. ADC1_IndividualChannelInterruptFlagClear.
void(* IndividualChannelInterruptEnable)(enum ADC_CHANNEL channel)
Pointer to ADCx_IndividualChannelInterruptEnable e.g. ADC1_IndividualChannelInterruptEnable.
void(* CorePowerEnable)(enum ADC_DEDICATED_CORE core)
Pointer to ADCx_CorePowerEnable e.g. ADC1_CorePowerEnable.
void(* PWMTriggerSourceSet)(enum ADC_CHANNEL channel, enum ADC_PWM_INSTANCE pwmInstance, enum ADC_PWM_TRIGGERS triggerNumber)
Pointer to ADCx_PWMTriggerSourceSet e.g. ADC1_PWMTriggerSourceSet.
void(* IndividualChannelInterruptDisable)(enum ADC_CHANNEL channel)
Pointer to ADCx_IndividualChannelInterruptDisable e.g. ADC1_IndividualChannelInterruptDisable.
void(* ComparatorTasks)(enum ADC_CMP comparator)
Pointer to ADCx_ComparatorTasks e.g. ADC1_ComparatorTasks.
void(* SharedCorePowerEnable)(void)
Pointer to ADCx_SharedCorePowerEnable e.g. ADC1_SharedCorePowerEnable.
void(* ChannelCallbackRegister)(void(*callback)(enum ADC_CHANNEL channel, uint16_t adcVal))
Pointer to ADCx_ChannelCallbackRegister e.g. ADC1_ChannelCallbackRegister.
void(* IndividualChannelInterruptPrioritySet)(enum ADC_CHANNEL channel, enum INTERRUPT_PRIORITY priorityValue)
Pointer to ADCx_IndividualChannelInterruptPrioritySet e.g. ADC1_IndividualChannelInterruptPrioritySet...
void(* ChannelTasks)(enum ADC_CHANNEL channel)
Pointer to ADCx_ChannelTasks e.g. ADC1_ChannelTasks.