1 |
/** |
---|
2 |
CMP1 Generated Driver API Header File |
---|
3 |
|
---|
4 |
@Company |
---|
5 |
Microchip Technology Inc. |
---|
6 |
|
---|
7 |
@File Name |
---|
8 |
cmp1.h |
---|
9 |
|
---|
10 |
@Summary |
---|
11 |
This is the generated header file for the CMP1 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs |
---|
12 |
|
---|
13 |
@Description |
---|
14 |
This header file provides APIs for driver for CMP1. |
---|
15 |
Generation Information : |
---|
16 |
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.65.2 |
---|
17 |
Device : PIC16F1579 |
---|
18 |
Driver Version : 2.11 |
---|
19 |
The generated drivers are tested against the following: |
---|
20 |
Compiler : XC8 1.45 or later |
---|
21 |
MPLAB : MPLAB X 4.15 |
---|
22 |
*/ |
---|
23 |
|
---|
24 |
/* |
---|
25 |
(c) 2018 Microchip Technology Inc. and its subsidiaries. |
---|
26 |
|
---|
27 |
Subject to your compliance with these terms, you may use Microchip software and any |
---|
28 |
derivatives exclusively with Microchip products. It is your responsibility to comply with third party |
---|
29 |
license terms applicable to your use of third party software (including open source software) that |
---|
30 |
may accompany Microchip software. |
---|
31 |
|
---|
32 |
THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER |
---|
33 |
EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY |
---|
34 |
IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS |
---|
35 |
FOR A PARTICULAR PURPOSE. |
---|
36 |
|
---|
37 |
IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, |
---|
38 |
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND |
---|
39 |
WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP |
---|
40 |
HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO |
---|
41 |
THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL |
---|
42 |
CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT |
---|
43 |
OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS |
---|
44 |
SOFTWARE. |
---|
45 |
*/ |
---|
46 |
|
---|
47 |
#ifndef CMP1_H |
---|
48 |
#define CMP1_H |
---|
49 |
|
---|
50 |
/** |
---|
51 |
Section: Included Files |
---|
52 |
*/ |
---|
53 |
|
---|
54 |
#include <stdbool.h> |
---|
55 |
#include <stdint.h> |
---|
56 |
|
---|
57 |
#ifdef __cplusplus // Provide C++ Compatibility |
---|
58 |
|
---|
59 |
extern "C" { |
---|
60 |
|
---|
61 |
#endif |
---|
62 |
|
---|
63 |
/** |
---|
64 |
Section: CMP1 APIs |
---|
65 |
*/ |
---|
66 |
|
---|
67 |
/** |
---|
68 |
@Summary |
---|
69 |
Initializes the CMP1 |
---|
70 |
|
---|
71 |
@Description |
---|
72 |
This routine initializes the CMP1. |
---|
73 |
This routine must be called before any other CMP1 routine is called. |
---|
74 |
This routine should only be called once during system initialization. |
---|
75 |
|
---|
76 |
@Preconditions |
---|
77 |
None |
---|
78 |
|
---|
79 |
@Param |
---|
80 |
None |
---|
81 |
|
---|
82 |
@Returns |
---|
83 |
None |
---|
84 |
|
---|
85 |
@Comment |
---|
86 |
|
---|
87 |
@Example |
---|
88 |
<code> |
---|
89 |
CMP1_Initialize(); |
---|
90 |
</code> |
---|
91 |
*/ |
---|
92 |
void CMP1_Initialize(void); |
---|
93 |
|
---|
94 |
/** |
---|
95 |
@Summary |
---|
96 |
Gets the CMP1 output status. |
---|
97 |
|
---|
98 |
@Description |
---|
99 |
This routine gets the CMP1 output status. |
---|
100 |
|
---|
101 |
@Preconditions |
---|
102 |
The CMP1 initializer routine should be called |
---|
103 |
prior to use this routine. |
---|
104 |
|
---|
105 |
@Param |
---|
106 |
None |
---|
107 |
|
---|
108 |
@Returns |
---|
109 |
high - if the CMP1 output is high. |
---|
110 |
low - if the CMP1 output is low. |
---|
111 |
|
---|
112 |
@Example |
---|
113 |
<code> |
---|
114 |
#define LED_On LATAbits.LATA0=1 |
---|
115 |
#define LED_Off LATAbits.LATA0=0 |
---|
116 |
|
---|
117 |
CMP1_Initialize(); |
---|
118 |
|
---|
119 |
while(1) |
---|
120 |
{ |
---|
121 |
if(CMP1_GetOutputStatus()) |
---|
122 |
{ |
---|
123 |
LED_On; |
---|
124 |
} |
---|
125 |
else |
---|
126 |
{ |
---|
127 |
LED_Off; |
---|
128 |
} |
---|
129 |
} |
---|
130 |
</code> |
---|
131 |
*/ |
---|
132 |
bool CMP1_GetOutputStatus(void); |
---|
133 |
|
---|
134 |
|
---|
135 |
|
---|
136 |
#ifdef __cplusplus // Provide C++ Compatibility |
---|
137 |
|
---|
138 |
} |
---|
139 |
|
---|
140 |
#endif |
---|
141 |
|
---|
142 |
#endif // CMP1_H |
---|
143 |
/** |
---|
144 |
End of File |
---|
145 |
*/ |
---|
146 |
|
---|