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

Loading...
Searching...
No Matches
pwm_hs_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 PWM_HS_INTERFACE_H
40#define PWM_HS_INTERFACE_H
41
42// Section: Included Files
43
44#include <stdbool.h>
45#include <stdint.h>
46#include "pwm_hs_types.h"
47
48// Section: Data Type Definitions
49
56 struct PWM_HS_INTERFACE{
57 void (*Initialize)(void);
59
60 void (*Deinitialize)(void);
62
63 void (*Disable)(void);
65
66 void (*Enable)(void);
68
69 void (*MasterPeriodSet)(uint16_t period);
71
72 void (*MasterDutyCycleSet)(uint16_t masterDutyCycle);
74
75 void (*MasterPhaseSet)(uint16_t masterPhase);
77
78 void (*PeriodSet)(enum PWM_GENERATOR genNum, uint16_t period);
80
81 void (*ModeSet)(enum PWM_GENERATOR genNum, enum PWM_MODES mode);
83
84 void (*DutyCycleSet)(enum PWM_GENERATOR genNum, uint16_t dutyCycle);
86
87 void (*PhaseSelect)(enum PWM_GENERATOR genNum, enum PWM_SOURCE_SELECT source);
89
90 void (*PhaseSet)(enum PWM_GENERATOR genNum, uint16_t phase);
92
93 void (*OverrideDataSet)(enum PWM_GENERATOR genNum, uint16_t overrideData);
95
96 void (*OverrideDataHighSet)(enum PWM_GENERATOR genNum, bool overrideDataHigh);
98
99 void (*OverrideDataLowSet)(enum PWM_GENERATOR genNum, bool overrideDataLow);
101
102 uint16_t (*OverrideDataGet)(enum PWM_GENERATOR genNum);
104
105 void (*OverrideHighEnable)(enum PWM_GENERATOR genNum);
107
108 void (*OverrideLowEnable)(enum PWM_GENERATOR genNum);
110
111 void (*OverrideHighDisable)(enum PWM_GENERATOR genNum);
113
114 void (*OverrideLowDisable)(enum PWM_GENERATOR genNum);
116
117 void (*DeadTimeLowSet)(enum PWM_GENERATOR genNum,uint16_t deadtimeLow);
119
120 void (*DeadTimeHighSet)(enum PWM_GENERATOR genNum,uint16_t deadtimeHigh);
122
123 void (*DeadTimeSet)(enum PWM_GENERATOR genNum,uint16_t deadtime);
125
126 void (*TriggerCompareValueSet)(enum PWM_GENERATOR genNum, uint16_t trigCompValue);
128
129 void (*GeneratorInterruptEnable)(enum PWM_GENERATOR genNum, enum PWM_GENERATOR_INTERRUPT interrupt);
131
132 void (*GeneratorInterruptDisable)(enum PWM_GENERATOR genNum, enum PWM_GENERATOR_INTERRUPT interrupt);
134
135 bool (*GeneratorEventStatusGet)(enum PWM_GENERATOR genNum, enum PWM_GENERATOR_INTERRUPT interrupt);
137
138 void (*GeneratorEventStatusClear)(enum PWM_GENERATOR genNum, enum PWM_GENERATOR_INTERRUPT interrupt);
140
141 void (*SpecialEventPrimaryCompareValueSet)(uint16_t compareValue);
143
144 void (*SpecialEventTriggerInterruptFlagClear)(void);
146
147 void (*SpecialEventPrimaryInterruptEnable)(void);
149
150 void (*SpecialEventPrimaryInterruptDisable)(void);
152
153 void (*FaultModeLatchDisable)(enum PWM_GENERATOR genNum);
155
156 void (*FaultModeLatchEnable)(enum PWM_GENERATOR genNum);
158
159 void (*GeneratorDisable)(enum PWM_GENERATOR genNum);
161
162 void (*GeneratorEnable)(enum PWM_GENERATOR genNum);
164
165 void (*TriggerACompareValueSet)(enum PWM_GENERATOR genNum, uint16_t trigCompValue);
167
168 void (*TriggerBCompareValueSet)(enum PWM_GENERATOR genNum, uint16_t trigCompValue);
170
171 void (*TriggerCCompareValueSet)(enum PWM_GENERATOR genNum, uint16_t trigCompValue);
173
174 void (*SoftwareUpdateRequest)(enum PWM_GENERATOR genNum);
176
177 bool (*SoftwareUpdatePending)(enum PWM_GENERATOR genNum);
179
180 void (*FaultModeLatchClear)(enum PWM_GENERATOR genNum);
182
183 void (*Trigger1Enable)(enum PWM_GENERATOR genNum, enum PWM_TRIGGER_COMPARE compareRegister);
185
186 void (*Trigger1Disable)(enum PWM_GENERATOR genNum, enum PWM_TRIGGER_COMPARE compareRegister);
188
189 void (*Trigger2Enable)(enum PWM_GENERATOR genNum, enum PWM_TRIGGER_COMPARE compareRegister);
191
192 void (*Trigger2Disable)(enum PWM_GENERATOR genNum, enum PWM_TRIGGER_COMPARE compareRegister);
194
195 void (*GeneratorEOCEventCallbackRegister)(void (*callback)(enum PWM_GENERATOR genNum));
197
198 void (*CommonEventCallbackRegister)(void (*callback)(enum PWM_COMMON_EVENT event));
200
201 void (*GeneratorTasks)(enum PWM_GENERATOR intGen);
203
204 void (*CommonEventTasks)(enum PWM_COMMON_EVENT event);
206};
207
208#endif //PWM_HS_INTERFACE_H
pwm_hs_types.h
This is the generated driver types header file for the PWM driver.
PWM_GENERATOR_INTERRUPT
PWM_GENERATOR_INTERRUPT
Definition pwm_hs_types.h:68
PWM_TRIGGER_COMPARE
PWM_TRIGGER_COMPARE
Definition pwm_hs_types.h:98
PWM_MODES
PWM_MODES
Definition pwm_hs_types.h:110
PWM_GENERATOR
PWM_GENERATOR
Definition pwm_hs_types.h:54
PWM_SOURCE_SELECT
PWM_SOURCE_SELECT
Definition pwm_hs_types.h:126
PWM_COMMON_EVENT
PWM_COMMON_EVENT
Definition pwm_hs_types.h:82
PWM_HS_INTERFACE
Structure containing the function pointers of PWM driver.
Definition pwm_hs_interface.h:56
PWM_HS_INTERFACE::DutyCycleSet
void(* DutyCycleSet)(enum PWM_GENERATOR genNum, uint16_t dutyCycle)
Pointer to PWM_DutyCycleSet.
Definition pwm_hs_interface.h:84
PWM_HS_INTERFACE::Enable
void(* Enable)(void)
Pointer to PWM_Enable.
Definition pwm_hs_interface.h:66
PWM_HS_INTERFACE::SpecialEventPrimaryInterruptDisable
void(* SpecialEventPrimaryInterruptDisable)(void)
Pointer to PWM_SpecialEventPrimaryInterruptDisable (Defined if PWM_SPECIAL_EVENT_FEATURE_AVAILABLE is...
Definition pwm_hs_interface.h:150
PWM_HS_INTERFACE::TriggerCompareValueSet
void(* TriggerCompareValueSet)(enum PWM_GENERATOR genNum, uint16_t trigCompValue)
Pointer to PWM_TriggerCompareValueSet.
Definition pwm_hs_interface.h:126
PWM_HS_INTERFACE::OverrideLowEnable
void(* OverrideLowEnable)(enum PWM_GENERATOR genNum)
Pointer to PWM_OverrideLowEnable.
Definition pwm_hs_interface.h:108
PWM_HS_INTERFACE::TriggerBCompareValueSet
void(* TriggerBCompareValueSet)(enum PWM_GENERATOR genNum, uint16_t trigCompValue)
Pointer to PWM_TriggerBCompareValueSet (Defined if PWM_MULTIPLE_TRIGGER_FEATURE_AVAILABLE is 1 in PWM...
Definition pwm_hs_interface.h:168
PWM_HS_INTERFACE::DeadTimeSet
void(* DeadTimeSet)(enum PWM_GENERATOR genNum, uint16_t deadtime)
Pointer to PWM_DeadTimeSet.
Definition pwm_hs_interface.h:123
PWM_HS_INTERFACE::OverrideDataHighSet
void(* OverrideDataHighSet)(enum PWM_GENERATOR genNum, bool overrideDataHigh)
Pointer to PWM_OverrideDataHighSet.
Definition pwm_hs_interface.h:96
PWM_HS_INTERFACE::GeneratorDisable
void(* GeneratorDisable)(enum PWM_GENERATOR genNum)
Pointer to PWM_GeneratorDisable (Defined if PWM_GENERATOR_ENABLE_FEATURE_AVAILABLE is 1 in PWM_featur...
Definition pwm_hs_interface.h:159
PWM_HS_INTERFACE::CommonEventTasks
void(* CommonEventTasks)(enum PWM_COMMON_EVENT event)
Pointer to PWM_CommonEventTasks (Supported only in polling mode)
Definition pwm_hs_interface.h:204
PWM_HS_INTERFACE::OverrideHighDisable
void(* OverrideHighDisable)(enum PWM_GENERATOR genNum)
Pointer to PWM_OverrideHighDisable.
Definition pwm_hs_interface.h:111
PWM_HS_INTERFACE::SoftwareUpdateRequest
void(* SoftwareUpdateRequest)(enum PWM_GENERATOR genNum)
Pointer to PWM_SoftwareUpdateRequest (Defined if PWM_SOFTWARE_UPDATE_FEATURE_AVAILABLE is 1 in PWM_fe...
Definition pwm_hs_interface.h:174
PWM_HS_INTERFACE::OverrideDataSet
void(* OverrideDataSet)(enum PWM_GENERATOR genNum, uint16_t overrideData)
Pointer to PWM_OverrideDataSet.
Definition pwm_hs_interface.h:93
PWM_HS_INTERFACE::DeadTimeLowSet
void(* DeadTimeLowSet)(enum PWM_GENERATOR genNum, uint16_t deadtimeLow)
Pointer to PWM_DeadTimeLowSet.
Definition pwm_hs_interface.h:117
PWM_HS_INTERFACE::ModeSet
void(* ModeSet)(enum PWM_GENERATOR genNum, enum PWM_MODES mode)
Pointer to PWM_ModeSet.
Definition pwm_hs_interface.h:81
PWM_HS_INTERFACE::GeneratorEventStatusClear
void(* GeneratorEventStatusClear)(enum PWM_GENERATOR genNum, enum PWM_GENERATOR_INTERRUPT interrupt)
Pointer to PWM_GeneratorEventStatusClear.
Definition pwm_hs_interface.h:138
PWM_HS_INTERFACE::MasterPeriodSet
void(* MasterPeriodSet)(uint16_t period)
Pointer to PWM_MasterPeriodSet.
Definition pwm_hs_interface.h:69
PWM_HS_INTERFACE::SpecialEventPrimaryCompareValueSet
void(* SpecialEventPrimaryCompareValueSet)(uint16_t compareValue)
Pointer to PWM_SpecialEventPrimaryCompareValueSet (Defined if PWM_SPECIAL_EVENT_FEATURE_AVAILABLE is ...
Definition pwm_hs_interface.h:141
PWM_HS_INTERFACE::PeriodSet
void(* PeriodSet)(enum PWM_GENERATOR genNum, uint16_t period)
Pointer to PWM_PeriodSet.
Definition pwm_hs_interface.h:78
PWM_HS_INTERFACE::FaultModeLatchClear
void(* FaultModeLatchClear)(enum PWM_GENERATOR genNum)
Pointer to PWM_FaultModeLatchClear (Defined if PWM_FAULT_LATCH_SOFTWARE_CLEAR_FEATURE_AVAILABLE is 1 ...
Definition pwm_hs_interface.h:180
PWM_HS_INTERFACE::GeneratorEOCEventCallbackRegister
void(* GeneratorEOCEventCallbackRegister)(void(*callback)(enum PWM_GENERATOR genNum))
Pointer to PWM_GeneratorEOCEventCallbackRegister.
Definition pwm_hs_interface.h:195
PWM_HS_INTERFACE::Trigger2Enable
void(* Trigger2Enable)(enum PWM_GENERATOR genNum, enum PWM_TRIGGER_COMPARE compareRegister)
Pointer to PWM_Trigger2Enable (Defined if PWM_TRIGGER_ENABLE_FEATURE_AVAILABLE is 1 in PWM_features....
Definition pwm_hs_interface.h:189
PWM_HS_INTERFACE::FaultModeLatchEnable
void(* FaultModeLatchEnable)(enum PWM_GENERATOR genNum)
Pointer to PWM_FaultModeLatchEnable (Defined if PWM_FAULT_MODE_FEATURE_AVAILABLE is 1 in PWM_features...
Definition pwm_hs_interface.h:156
PWM_HS_INTERFACE::MasterDutyCycleSet
void(* MasterDutyCycleSet)(uint16_t masterDutyCycle)
Pointer to PWM_MasterDutyCycleSet.
Definition pwm_hs_interface.h:72
PWM_HS_INTERFACE::GeneratorInterruptEnable
void(* GeneratorInterruptEnable)(enum PWM_GENERATOR genNum, enum PWM_GENERATOR_INTERRUPT interrupt)
Pointer to PWM_GeneratorInterruptEnable.
Definition pwm_hs_interface.h:129
PWM_HS_INTERFACE::Trigger1Disable
void(* Trigger1Disable)(enum PWM_GENERATOR genNum, enum PWM_TRIGGER_COMPARE compareRegister)
Pointer to PWM_Trigger1Disable (Defined if PWM_TRIGGER_ENABLE_FEATURE_AVAILABLE is 1 in PWM_features....
Definition pwm_hs_interface.h:186
PWM_HS_INTERFACE::GeneratorEnable
void(* GeneratorEnable)(enum PWM_GENERATOR genNum)
Pointer to PWM_GeneratorEnable (Defined if PWM_GENERATOR_ENABLE_FEATURE_AVAILABLE is 1 in PWM_feature...
Definition pwm_hs_interface.h:162
PWM_HS_INTERFACE::Disable
void(* Disable)(void)
Pointer to PWM_Disable.
Definition pwm_hs_interface.h:63
PWM_HS_INTERFACE::GeneratorTasks
void(* GeneratorTasks)(enum PWM_GENERATOR intGen)
Pointer to PWM_GeneratorTasks (Supported only in polling mode)
Definition pwm_hs_interface.h:201
PWM_HS_INTERFACE::OverrideHighEnable
void(* OverrideHighEnable)(enum PWM_GENERATOR genNum)
Pointer to PWM_OverrideHighEnable.
Definition pwm_hs_interface.h:105
PWM_HS_INTERFACE::SpecialEventPrimaryInterruptEnable
void(* SpecialEventPrimaryInterruptEnable)(void)
Pointer to PWM_SpecialEventPrimaryInterruptEnable (Defined if PWM_SPECIAL_EVENT_FEATURE_AVAILABLE is ...
Definition pwm_hs_interface.h:147
PWM_HS_INTERFACE::CommonEventCallbackRegister
void(* CommonEventCallbackRegister)(void(*callback)(enum PWM_COMMON_EVENT event))
Pointer to PWM_CommonEventCallbackRegister.
Definition pwm_hs_interface.h:198
PWM_HS_INTERFACE::GeneratorInterruptDisable
void(* GeneratorInterruptDisable)(enum PWM_GENERATOR genNum, enum PWM_GENERATOR_INTERRUPT interrupt)
Pointer to PWM_GeneratorInterruptDisable.
Definition pwm_hs_interface.h:132
PWM_HS_INTERFACE::MasterPhaseSet
void(* MasterPhaseSet)(uint16_t masterPhase)
Pointer to PWM_MasterPhaseSet (Defined if PWM_GENERATOR_MASTER_PHASE_FEATURE_AVAILABLE is 1 in PWM_fe...
Definition pwm_hs_interface.h:75
PWM_HS_INTERFACE::PhaseSelect
void(* PhaseSelect)(enum PWM_GENERATOR genNum, enum PWM_SOURCE_SELECT source)
Pointer to PWM_PhaseSelect.
Definition pwm_hs_interface.h:87
PWM_HS_INTERFACE::SoftwareUpdatePending
bool(* SoftwareUpdatePending)(enum PWM_GENERATOR genNum)
Pointer to PWM_SoftwareUpdatePending (Defined if PWM_SOFTWARE_UPDATE_FEATURE_AVAILABLE is 1 in PWM_fe...
Definition pwm_hs_interface.h:177
PWM_HS_INTERFACE::DeadTimeHighSet
void(* DeadTimeHighSet)(enum PWM_GENERATOR genNum, uint16_t deadtimeHigh)
Pointer to PWM_DeadTimeHighSet.
Definition pwm_hs_interface.h:120
PWM_HS_INTERFACE::TriggerACompareValueSet
void(* TriggerACompareValueSet)(enum PWM_GENERATOR genNum, uint16_t trigCompValue)
Pointer to PWM_TriggerACompareValueSet (Defined if PWM_MULTIPLE_TRIGGER_FEATURE_AVAILABLE is 1 in PWM...
Definition pwm_hs_interface.h:165
PWM_HS_INTERFACE::GeneratorEventStatusGet
bool(* GeneratorEventStatusGet)(enum PWM_GENERATOR genNum, enum PWM_GENERATOR_INTERRUPT interrupt)
Pointer to PWM_GeneratorEventStatusGet.
Definition pwm_hs_interface.h:135
PWM_HS_INTERFACE::Deinitialize
void(* Deinitialize)(void)
Pointer to PWM_Deinitialize.
Definition pwm_hs_interface.h:60
PWM_HS_INTERFACE::OverrideLowDisable
void(* OverrideLowDisable)(enum PWM_GENERATOR genNum)
Pointer to PWM_OverrideLowDisable.
Definition pwm_hs_interface.h:114
PWM_HS_INTERFACE::SpecialEventTriggerInterruptFlagClear
void(* SpecialEventTriggerInterruptFlagClear)(void)
Pointer to PWM_SpecialEventTriggerInterruptFlagClear (Defined if PWM_SPECIAL_EVENT_FEATURE_AVAILABLE ...
Definition pwm_hs_interface.h:144
PWM_HS_INTERFACE::PhaseSet
void(* PhaseSet)(enum PWM_GENERATOR genNum, uint16_t phase)
Pointer to PWM_PhaseSet.
Definition pwm_hs_interface.h:90
PWM_HS_INTERFACE::OverrideDataLowSet
void(* OverrideDataLowSet)(enum PWM_GENERATOR genNum, bool overrideDataLow)
Pointer to PWM_OverrideDataLowSet.
Definition pwm_hs_interface.h:99
PWM_HS_INTERFACE::OverrideDataGet
uint16_t(* OverrideDataGet)(enum PWM_GENERATOR genNum)
Pointer to PWM_OverrideDataGet.
Definition pwm_hs_interface.h:102
PWM_HS_INTERFACE::Trigger1Enable
void(* Trigger1Enable)(enum PWM_GENERATOR genNum, enum PWM_TRIGGER_COMPARE compareRegister)
Pointer to PWM_Trigger1Enable (Defined if PWM_TRIGGER_ENABLE_FEATURE_AVAILABLE is 1 in PWM_features....
Definition pwm_hs_interface.h:183
PWM_HS_INTERFACE::FaultModeLatchDisable
void(* FaultModeLatchDisable)(enum PWM_GENERATOR genNum)
Pointer to PWM_FaultModeLatchDisable (Defined if PWM_FAULT_MODE_FEATURE_AVAILABLE is 1 in PWM_feature...
Definition pwm_hs_interface.h:153
PWM_HS_INTERFACE::TriggerCCompareValueSet
void(* TriggerCCompareValueSet)(enum PWM_GENERATOR genNum, uint16_t trigCompValue)
Pointer to PWM_TriggerCCompareValueSet (Defined if PWM_MULTIPLE_TRIGGER_FEATURE_AVAILABLE is 1 in PWM...
Definition pwm_hs_interface.h:171
PWM_HS_INTERFACE::Trigger2Disable
void(* Trigger2Disable)(enum PWM_GENERATOR genNum, enum PWM_TRIGGER_COMPARE compareRegister)
Pointer to PWM_Trigger2Disable (Defined if PWM_TRIGGER_ENABLE_FEATURE_AVAILABLE is 1 in PWM_features....
Definition pwm_hs_interface.h:192
PWM_HS_INTERFACE::Initialize
void(* Initialize)(void)
Pointer to PWM_Initialize.
Definition pwm_hs_interface.h:57