EPC9143 300 W 16th Brick DC/DC Module Reference Design
p33c_opa.h
1 /* Microchip Technology Inc. and its subsidiaries. You may use this software
2  * and any derivatives exclusively with Microchip products.
3  *
4  * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
5  * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
6  * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
7  * PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION
8  * WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION.
9  *
10  * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
11  * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
12  * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
13  * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
14  * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS
15  * IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF
16  * ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
17  *
18  * MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE
19  * TERMS.
20  */
21 
22 /*@@p33c_opa.h
23  * ************************************************************************************************
24  * Summary:
25  * Generic Operational Amplifier Driver Module (header file)
26  *
27  * Description:
28  * This additional header file contains defines for all required bit-settings of all related
29  * special function registers of a peripheral module and/or instance.
30  * This file is an additional header file on top of the generic device header file.
31  *
32  * See Also:
33  * p33c_opa.c
34  * ***********************************************************************************************/
35 
36 // This is a guard condition so that contents of this file are not included
37 // more than once.
38 #ifndef P33C_OPA_SFR_ABSTRACTION_H
39 #define P33C_OPA_SFR_ABSTRACTION_H
40 
41 // Include standard header files
42 #include <xc.h> // include processor files - each processor file is guarded.
43 #include <stdint.h> // include standard integer data types
44 #include <stdbool.h> // include standard boolean data types
45 #include <stddef.h> // include standard definition data types
46 
47 
48 // GENERIC PDM OP-AMP MODULE SPECIAL FUNCTION REGISTER SET
49 #ifndef P33C_OPA_MODULE_s
50 
51  typedef struct P33C_OPA_MODULE_s{
52  union {
53  volatile struct tagAMPCON1LBITS bits; // Register bit-field
54  volatile uint16_t value; // 16-bit wide register value
55  } AmpCon1L; // (AMPCON1L) OP-AMP CONTROL 1 REGISTER LOW
56  union {
57  volatile struct tagAMPCON1HBITS bits; // Register bit-field
58  volatile uint16_t value; // 16-bit wide register value
59  } AmpCon1H; // (AMPCON1H) OP-AMP CONTROL 2 REGISTER LOW
60  } __attribute__((packed)) P33C_OPA_MODULE_t; // PDM OP-AMP MODULE REGISTER SET
61 
62 #endif
63 
64 
65 /* ********************************************************************************************* *
66  * API FUNCTION PROTOTYPES
67  * ********************************************************************************************* */
68 
69 extern volatile struct P33C_OPA_MODULE_s* p33c_OpaModule_GetHandle(void);
70 
71 extern volatile uint16_t p33c_OpaModule_Dispose(void);
72 
73 extern volatile struct P33C_OPA_MODULE_s p33c_OpaModule_ConfigRead(void);
74 extern volatile uint16_t p33c_OpaModule_ConfigWrite(
75  volatile struct P33C_OPA_MODULE_s opaConfig
76  );
77 
78 
79 /* ********************************************************************************************* *
80  * OP-AMP INSTANCE CONFIGURATION TEMPLATES
81  * ********************************************************************************************* */
82 extern volatile struct P33C_OPA_MODULE_s opaModuleConfigClear;
83 extern volatile struct P33C_OPA_MODULE_s opaModuleDefault;
84 
85 #endif /* P33C_OPA_SFR_ABSTRACTION_H */
86 // END OF FILE
P33C_OPA_MODULE_s::AmpCon1H
union P33C_OPA_MODULE_s::@1 AmpCon1H
P33C_OPA_MODULE_s::bits
volatile struct tagAMPCON1LBITS bits
Definition: p33c_opa.h:53
p33c_OpaModule_ConfigWrite
volatile uint16_t p33c_OpaModule_ConfigWrite(volatile struct P33C_OPA_MODULE_s opaConfig)
Writes a user-defined configuration to the op-amp module base registers.
Definition: p33c_opa.c:125
opaModuleDefault
volatile struct P33C_OPA_MODULE_s opaModuleDefault
Default configuration of op-amp module running from 500 MHz input clock.
Definition: p33c_opa.c:176
p33c_OpaModule_GetHandle
volatile struct P33C_OPA_MODULE_s * p33c_OpaModule_GetHandle(void)
Gets pointer to op-amp Module SFR set.
Definition: p33c_opa.c:43
p33c_OpaModule_ConfigRead
volatile struct P33C_OPA_MODULE_s p33c_OpaModule_ConfigRead(void)
Read the current configuration from the op-amp module base registers.
Definition: p33c_opa.c:95
P33C_OPA_MODULE_s::AmpCon1L
union P33C_OPA_MODULE_s::@0 AmpCon1L
opaModuleConfigClear
volatile struct P33C_OPA_MODULE_s opaModuleConfigClear
Default RESET configuration of the op-amp module base SFRs.
Definition: p33c_opa.c:154
P33C_OPA_MODULE_s::value
volatile uint16_t value
Definition: p33c_opa.h:54
P33C_OPA_MODULE_s
Definition: p33c_opa.h:51
p33c_OpaModule_Dispose
volatile uint16_t p33c_OpaModule_Dispose(void)
Resets all Op-Amp Module registers to their RESET default values.
Definition: p33c_opa.c:72