AM263x MCU+ SDK  08.03.00
cmpss/v0/cmpss.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (C) 2021 Texas Instruments Incorporated.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32 
42 #ifndef CMPSS_V0_H_
43 #define CMPSS_V0_H_
44 
45 //*****************************************************************************
46 //
47 // If building with a C++ compiler, make all of the definitions in this header
48 // have a C binding.
49 //
50 //*****************************************************************************
51 #ifdef __cplusplus
52 extern "C"
53 {
54 #endif
55 
56 //*****************************************************************************
57 //
59 //
60 //*****************************************************************************
61 
62 #include <stdbool.h>
63 #include <stdint.h>
64 #include <drivers/hw_include/cslr_cmpss.h>
65 #include <drivers/hw_include/cslr_soc.h>
66 #include <drivers/hw_include/hw_types.h>
67 #include <kernel/dpl/DebugP.h>
68 
69 //*****************************************************************************
70 //
71 // Useful defines used within the driver functions. Not intended for use by
72 // application code.
73 //
74 //*****************************************************************************
75 #define CMPSS_HICMP_CTL_M (CSL_CMPSSA_COMPCTL_COMPHSOURCE_MASK | \
76  CSL_CMPSSA_COMPCTL_COMPHINV_MASK | \
77  CSL_CMPSSA_COMPCTL_ASYNCHEN_MASK)
78 
79 #define CMPSS_LOCMP_CTL_M (CSL_CMPSSA_COMPCTL_COMPLSOURCE_MASK | \
80  CSL_CMPSSA_COMPCTL_COMPLINV_MASK | \
81  CSL_CMPSSA_COMPCTL_ASYNCLEN_MASK)
82 
83 //*****************************************************************************
84 //
85 // Values that can be passed to CMPSS_configLowComparator() and
86 // CMPSS_configHighComparator() as the config parameter.
87 //
88 //*****************************************************************************
89 //
90 // Comparator negative input source
91 //
93 #define CMPSS_INSRC_DAC (0x0000U)
94 #define CMPSS_INSRC_PIN (0x0001U)
96 
97 //
98 // Extra options
99 //
101 #define CMPSS_INV_INVERTED (0x0002U)
102 #define CMPSS_OR_ASYNC_OUT_W_FILT (0x0040U)
104 
105 //*****************************************************************************
106 //
107 // Values that can be passed to CMPSS_configOutputsLow() and
108 // CMPSS_configOutputsHigh() as the config parameter.
109 //
110 //*****************************************************************************
111 //
112 // Signal driving CTRIPOUT
113 //
115 #define CMPSS_TRIPOUT_ASYNC_COMP (0x0000U)
116 #define CMPSS_TRIPOUT_SYNC_COMP (0x0010U)
118 #define CMPSS_TRIPOUT_FILTER (0x0020U)
120 #define CMPSS_TRIPOUT_LATCH (0x0030U)
122 
123 //
124 // Signal driving CTRIP
125 //
127 #define CMPSS_TRIP_ASYNC_COMP (0x0000U)
128 #define CMPSS_TRIP_SYNC_COMP (0x0004U)
130 #define CMPSS_TRIP_FILTER (0x0008U)
132 #define CMPSS_TRIP_LATCH (0x000CU)
134 
135 //*****************************************************************************
136 //
137 // Values that can be returned by CMPSS_getStatus().
138 //
139 //*****************************************************************************
141 #define CMPSS_STS_HI_FILTOUT (0x0001U)
142 #define CMPSS_STS_HI_LATCHFILTOUT (0x0002U)
144 #define CMPSS_STS_LO_FILTOUT (0x0100U)
146 #define CMPSS_STS_LO_LATCHFILTOUT (0x0200U)
148 
149 //*****************************************************************************
150 //
151 // Values that can be passed to CMPSS_configDAC() the config parameter.
152 //
153 //*****************************************************************************
154 //
155 // When is DAC value loaded from shadow register
156 //
158 #define CMPSS_DACVAL_SYSCLK (0x0000U)
159 #define CMPSS_DACVAL_PWMSYNC (0x0080U)
161 
162 //
163 // DAC reference voltage
164 //
166 #define CMPSS_DACREF_VDDA (0x0000U)
167 #define CMPSS_DACREF_VDAC (0x0020U)
169 
170 //
171 // DAC value source
172 //
174 #define CMPSS_DACSRC_SHDW (0x0000U)
175 #define CMPSS_DACSRC_RAMP (0x0001U)
177 
178 //*****************************************************************************
179 //
180 // Prototypes for the APIs.
181 //
182 //*****************************************************************************
183 //*****************************************************************************
184 //
192 //
193 //*****************************************************************************
194 static inline void
195 CMPSS_enableModule(uint32_t base)
196 {
197  //
198  // Set the bit that enables the CMPSS module.
199  //
200  HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
201  HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) |
202  CSL_CMPSSA_COMPCTL_COMPDACE_MASK);
203 }
204 
205 //*****************************************************************************
206 //
214 //
215 //*****************************************************************************
216 static inline void
217 CMPSS_disableModule(uint32_t base)
218 {
219  //
220  // Clear the bit that enables the CMPSS module.
221  //
222  HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
223  HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) &
224  ~CSL_CMPSSA_COMPCTL_COMPDACE_MASK);
225 }
226 
227 //*****************************************************************************
228 //
252 //
253 //*****************************************************************************
254 static inline void
255 CMPSS_configHighComparator(uint32_t base, uint16_t config)
256 {
257  //
258  // Write the high comparator configuration to the appropriate register.
259  //
260  HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
261  (HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) & ~CMPSS_HICMP_CTL_M) | config);
262 }
263 
264 //*****************************************************************************
265 //
289 //
290 //*****************************************************************************
291 static inline void
292 CMPSS_configLowComparator(uint32_t base, uint16_t config)
293 {
294  //
295  // Write the low comparator configuration to the appropriate register.
296  //
297  HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
298  (HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) & ~CMPSS_LOCMP_CTL_M) |
299  (config << 8U));
300 }
301 
302 //*****************************************************************************
303 //
328 //
329 //*****************************************************************************
330 static inline void
331 CMPSS_configOutputsHigh(uint32_t base, uint16_t config)
332 {
333  //
334  // Write the high comparator output settings to the appropriate register.
335  //
336  HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
337  (HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) &
338  ~(CSL_CMPSSA_COMPCTL_CTRIPOUTHSEL_MASK |
339  CSL_CMPSSA_COMPCTL_CTRIPHSEL_MASK)) | config);
340 }
341 
342 //*****************************************************************************
343 //
368 //
369 //*****************************************************************************
370 static inline void
371 CMPSS_configOutputsLow(uint32_t base, uint16_t config)
372 {
373  //
374  // Write the low comparator output settings to the appropriate register.
375  //
376  HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
377  (HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) &
378  ~(CSL_CMPSSA_COMPCTL_CTRIPOUTLSEL_MASK |
379  CSL_CMPSSA_COMPCTL_CTRIPLSEL_MASK)) | (config << 8U));
380 }
381 
382 //*****************************************************************************
383 //
398 //
399 //*****************************************************************************
400 static inline uint16_t
401 CMPSS_getStatus(uint32_t base)
402 {
403  //
404  // Return contents of the status register.
405  //
406  return(HW_RD_REG16(base + CSL_CMPSSA_COMPSTS));
407 }
408 
409 //*****************************************************************************
410 //
440 //
441 //*****************************************************************************
442 static inline void
443 CMPSS_configDAC(uint32_t base, uint16_t config)
444 {
445  //
446  // Write the DAC configuration to the appropriate register.
447  //
448  HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL),
449  (HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL) &
450  ~(CSL_CMPSSA_COMPDACCTL_SWLOADSEL_MASK |
451  CSL_CMPSSA_COMPDACCTL_SELREF_MASK |
452  CSL_CMPSSA_COMPDACCTL_DACSOURCE_MASK)) | config);
453 }
454 
455 //*****************************************************************************
456 //
468 //
469 //*****************************************************************************
470 static inline void
471 CMPSS_setDACValueHigh(uint32_t base, uint16_t value)
472 {
473  DebugP_assert(value < 4096U);
474 
475  //
476  // Write the DAC value to the DAC value shadow register.
477  //
478  HW_WR_REG16((base + CSL_CMPSSA_DACHVALS), value);
479 }
480 
481 //*****************************************************************************
482 //
494 //
495 //*****************************************************************************
496 static inline void
497 CMPSS_setDACValueLow(uint32_t base, uint16_t value)
498 {
499  DebugP_assert(value < 4096U);
500 
501  //
502  // Write the DAC value to the DAC value shadow register.
503  //
504  HW_WR_REG16((base + CSL_CMPSSA_DACLVALS), value);
505 }
506 
507 //*****************************************************************************
508 //
520 //
521 //*****************************************************************************
522 static inline void
523 CMPSS_initFilterHigh(uint32_t base)
524 {
525  //
526  // Set the high comparator filter initialization bit.
527  //
528  HW_WR_REG16((base + CSL_CMPSSA_CTRIPHFILCTL),
529  HW_RD_REG16(base + CSL_CMPSSA_CTRIPHFILCTL) |
530  CSL_CMPSSA_CTRIPHFILCTL_FILINIT_MASK);
531 }
532 
533 //*****************************************************************************
534 //
546 //
547 //*****************************************************************************
548 static inline void
549 CMPSS_initFilterLow(uint32_t base)
550 {
551  //
552  // Set the low comparator filter initialization bit.
553  //
554  HW_WR_REG16((base + CSL_CMPSSA_CTRIPLFILCTL),
555  HW_RD_REG16(base + CSL_CMPSSA_CTRIPLFILCTL) |
556  CSL_CMPSSA_CTRIPLFILCTL_FILINIT_MASK);
557 }
558 
559 //*****************************************************************************
560 //
570 //
571 //*****************************************************************************
572 static inline uint16_t
573 CMPSS_getDACValueHigh(uint32_t base)
574 {
575  //
576  // Write the DAC value to the DAC value shadow register.
577  //
578  return(HW_RD_REG16(base + CSL_CMPSSA_DACHVALA));
579 }
580 
581 //*****************************************************************************
582 //
592 //
593 //*****************************************************************************
594 static inline uint16_t
595 CMPSS_getDACValueLow(uint32_t base)
596 {
597  //
598  // Write the DAC value to the DAC value shadow register.
599  //
600  return(HW_RD_REG16(base + CSL_CMPSSA_DACLVALA));
601 }
602 
603 //*****************************************************************************
604 //
613 //
614 //*****************************************************************************
615 static inline void
617 {
618  //
619  // Set the bit that generates a reset pulse to the digital filter latch.
620  //
621  HW_WR_REG16((base + CSL_CMPSSA_COMPSTSCLR),
622  HW_RD_REG16(base + CSL_CMPSSA_COMPSTSCLR) |
623  CSL_CMPSSA_COMPSTSCLR_HLATCHCLR_MASK);
624 }
625 
626 //*****************************************************************************
627 //
636 //
637 //*****************************************************************************
638 static inline void
640 {
641  //
642  // Set the bit that generates a reset pulse to the digital filter latch.
643  //
644  HW_WR_REG16((base + CSL_CMPSSA_COMPSTSCLR),
645  HW_RD_REG16(base + CSL_CMPSSA_COMPSTSCLR) |
646  CSL_CMPSSA_COMPSTSCLR_LLATCHCLR_MASK);
647 }
648 
649 //*****************************************************************************
650 //
660 //
661 //*****************************************************************************
662 static inline void
663 CMPSS_setMaxRampValue(uint32_t base, uint16_t value)
664 {
665  //
666  // Write the maximum ramp value to the shadow register.
667  //
668  HW_WR_REG16((base + CSL_CMPSSA_RAMPMAXREFS), value);
669 }
670 
671 //*****************************************************************************
672 //
679 //
680 //*****************************************************************************
681 static inline uint16_t
682 CMPSS_getMaxRampValue(uint32_t base)
683 {
684  //
685  // Read the maximum ramp value from the register.
686  //
687  return(HW_RD_REG16(base + CSL_CMPSSA_RAMPMAXREFA));
688 }
689 
690 //*****************************************************************************
691 //
701 //
702 //*****************************************************************************
703 static inline void
704 CMPSS_setRampDecValue(uint32_t base, uint16_t value)
705 {
706  //
707  // Write the ramp decrement value to the shadow register.
708  //
709  HW_WR_REG16((base + CSL_CMPSSA_RAMPDECVALS), value);
710 }
711 
712 //*****************************************************************************
713 //
720 //
721 //*****************************************************************************
722 static inline uint16_t
723 CMPSS_getRampDecValue(uint32_t base)
724 {
725  //
726  // Read the ramp decrement value from the register.
727  //
728  return(HW_RD_REG16(base + CSL_CMPSSA_RAMPDECVALA));
729 }
730 
731 //*****************************************************************************
732 //
743 //
744 //*****************************************************************************
745 static inline void
746 CMPSS_setRampDelayValue(uint32_t base, uint16_t value)
747 {
748  DebugP_assert(value < 8192U);
749 
750  //
751  // Write the ramp delay value to the shadow register.
752  //
753  HW_WR_REG16((base + CSL_CMPSSA_RAMPDLYS), value);
754 }
755 
756 //*****************************************************************************
757 //
764 //
765 //*****************************************************************************
766 static inline uint16_t
768 {
769  //
770  // Read the ramp delay value from the register.
771  //
772  return(HW_RD_REG16(base + CSL_CMPSSA_RAMPDLYA));
773 }
774 
775 //*****************************************************************************
776 //
790 //
791 //*****************************************************************************
792 static inline void
793 CMPSS_configBlanking(uint32_t base, uint16_t pwmBlankSrc)
794 {
795  DebugP_assert((pwmBlankSrc >= 1U) && (pwmBlankSrc <= 32U));
796 
797  //
798  // Write the blank source number to the appropriate register.
799  //
800 
801  //Program COMPDACCTL and COMPDACCTL2
802  HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL),
803  (HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL) &
804  ~CSL_CMPSSA_COMPDACCTL_BLANKSOURCE_MASK) | (((pwmBlankSrc - 1U)&0xF) <<
805  CSL_CMPSSA_COMPDACCTL_BLANKSOURCE_SHIFT));
806 
807 
808  HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL2),
809  (HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL2) &
810  ~CSL_CMPSSA_COMPDACCTL2_BLANKSOURCEUSEL_MASK) | ((((pwmBlankSrc-1)>>4) <<
811  CSL_CMPSSA_COMPDACCTL2_BLANKSOURCEUSEL_SHIFT) &
812  CSL_CMPSSA_COMPDACCTL2_BLANKSOURCEUSEL_MASK));
813 }
814 
815 //*****************************************************************************
816 //
825 //
826 //*****************************************************************************
827 static inline void
828 CMPSS_enableBlanking(uint32_t base)
829 {
830  //
831  // Set the bit that enables the PWMBLANK signal.
832  //
833  HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL),
834  HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL) |
835  CSL_CMPSSA_COMPDACCTL_BLANKEN_MASK);
836 }
837 
838 //*****************************************************************************
839 //
848 //
849 //*****************************************************************************
850 static inline void
851 CMPSS_disableBlanking(uint32_t base)
852 {
853  //
854  // Clear the bit that enables the PWMBLANK signal.
855  //
856  HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL),
857  HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL) &
858  ~CSL_CMPSSA_COMPDACCTL_BLANKEN_MASK);
859 }
860 
861 //*****************************************************************************
862 //
870 //
871 //*****************************************************************************
872 static inline void
873 CMPSS_enableDEmode(uint32_t base)
874 {
875  HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL2),
876  HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL2) |
877  (0x1<<CSL_CMPSSA_COMPDACCTL2_DEENABLE_SHIFT) &
878  CSL_CMPSSA_COMPDACCTL2_DEENABLE_MASK);
879 
880 }
881 
882 //*****************************************************************************
883 //
891 //
892 //*****************************************************************************
893 static inline void
894 CMPSS_disableDEmode(uint32_t base)
895 {
896  HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL2),
897  HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL2) &
898  ~((0x1<<CSL_CMPSSA_COMPDACCTL2_DEENABLE_SHIFT) &
899  CSL_CMPSSA_COMPDACCTL2_DEENABLE_MASK));
900 }
901 
902 //*****************************************************************************
903 //
912 //
913 //*****************************************************************************
914 static inline void
915 CMPSS_selectDEACTIVESource(uint32_t base, uint8_t deactivesel)
916 {
917  HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL2),
918  (HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL2) &
919  ~CSL_CMPSSA_COMPDACCTL2_DEACTIVESEL_MASK) |
920  ((deactivesel << CSL_CMPSSA_COMPDACCTL2_DEACTIVESEL_SHIFT) &
921  CSL_CMPSSA_COMPDACCTL2_DEACTIVESEL_MASK));
922 }
923 
924 //*****************************************************************************
925 //
936 //
937 //*****************************************************************************
938 static inline void
939 CMPSS_configHighDACShadowValue2(uint32_t base, uint16_t dacval)
940 {
941  HW_WR_REG16((base + CSL_CMPSSA_DACHVALS2),
942  dacval & CSL_CMPSSA_DACHVALS2_DACVAL_MASK);
943 }
944 
945 //*****************************************************************************
946 //
957 //
958 //*****************************************************************************
959 static inline void
960 CMPSS_configLowDACShadowValue2(uint32_t base, uint16_t dacval)
961 {
962  HW_WR_REG16((base + CSL_CMPSSA_DACLVALS2),
963  dacval & CSL_CMPSSA_DACLVALS2_DACVAL_MASK);
964 }
965 
966 //*****************************************************************************
967 //
986 //
987 //*****************************************************************************
988 static inline void
989 CMPSS_setComparatorHighHysteresis(uint32_t base, uint16_t value)
990 {
991  HW_WR_REG16((base + CSL_CMPSSA_CONFIG1),
992  CSL_CMPSSA_CONFIG1_COMPHHYS_MASK &
993  (value << CSL_CMPSSA_CONFIG1_COMPHHYS_SHIFT));
994 }
995 
996 //*****************************************************************************
997 //
1016 //
1017 //*****************************************************************************
1018 static inline void
1019 CMPSS_setComparatorLowHysteresis(uint32_t base, uint16_t value)
1020 {
1021  HW_WR_REG16((base + CSL_CMPSSA_CONFIG1),
1022  CSL_CMPSSA_CONFIG1_COMPLHYS_MASK &
1023  (value << CSL_CMPSSA_CONFIG1_COMPLHYS_SHIFT));
1024 }
1025 
1026 
1027 //*****************************************************************************
1028 //
1069 //
1070 //*****************************************************************************
1071 extern void
1072 CMPSS_configFilterHigh(uint32_t base, uint16_t samplePrescale,
1073  uint16_t sampleWindow, uint16_t threshold);
1074 
1075 //*****************************************************************************
1076 //
1117 //
1118 //*****************************************************************************
1119 extern void
1120 CMPSS_configFilterLow(uint32_t base, uint16_t samplePrescale,
1121  uint16_t sampleWindow, uint16_t threshold);
1122 
1123 //*****************************************************************************
1124 //
1139 //
1140 //*****************************************************************************
1141 extern void
1142 CMPSS_configLatchOnPWMSYNC(uint32_t base, bool highEnable, bool lowEnable);
1143 
1144 //*****************************************************************************
1145 //
1180 //
1181 //*****************************************************************************
1182 extern void
1183 CMPSS_configRamp(uint32_t base, uint16_t maxRampVal, uint16_t decrementVal,
1184  uint16_t delayVal, uint16_t pwmSyncSrc, bool useRampValShdw);
1185 
1186 //*****************************************************************************
1187 //
1188 // Close the Doxygen group.
1190 //
1191 //*****************************************************************************
1192 
1193 //*****************************************************************************
1194 //
1195 // Mark the end of the C bindings section for C++ compilers.
1196 //
1197 //*****************************************************************************
1198 #ifdef __cplusplus
1199 }
1200 #endif
1201 
1202 #endif // CMPSS_V0_H_
CMPSS_clearFilterLatchLow
static void CMPSS_clearFilterLatchLow(uint32_t base)
Definition: cmpss/v0/cmpss.h:639
CMPSS_setRampDecValue
static void CMPSS_setRampDecValue(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:704
CMPSS_configHighDACShadowValue2
static void CMPSS_configHighDACShadowValue2(uint32_t base, uint16_t dacval)
Definition: cmpss/v0/cmpss.h:939
CMPSS_setRampDelayValue
static void CMPSS_setRampDelayValue(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:746
CMPSS_LOCMP_CTL_M
#define CMPSS_LOCMP_CTL_M
Definition: cmpss/v0/cmpss.h:79
CMPSS_disableModule
static void CMPSS_disableModule(uint32_t base)
Definition: cmpss/v0/cmpss.h:217
CMPSS_selectDEACTIVESource
static void CMPSS_selectDEACTIVESource(uint32_t base, uint8_t deactivesel)
Definition: cmpss/v0/cmpss.h:915
CMPSS_setComparatorHighHysteresis
static void CMPSS_setComparatorHighHysteresis(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:989
CMPSS_enableDEmode
static void CMPSS_enableDEmode(uint32_t base)
Definition: cmpss/v0/cmpss.h:873
CMPSS_configOutputsLow
static void CMPSS_configOutputsLow(uint32_t base, uint16_t config)
Definition: cmpss/v0/cmpss.h:371
CMPSS_configOutputsHigh
static void CMPSS_configOutputsHigh(uint32_t base, uint16_t config)
Definition: cmpss/v0/cmpss.h:331
CMPSS_enableModule
static void CMPSS_enableModule(uint32_t base)
Definition: cmpss/v0/cmpss.h:195
CMPSS_configDAC
static void CMPSS_configDAC(uint32_t base, uint16_t config)
Definition: cmpss/v0/cmpss.h:443
CMPSS_getStatus
static uint16_t CMPSS_getStatus(uint32_t base)
Definition: cmpss/v0/cmpss.h:401
CMPSS_configRamp
void CMPSS_configRamp(uint32_t base, uint16_t maxRampVal, uint16_t decrementVal, uint16_t delayVal, uint16_t pwmSyncSrc, bool useRampValShdw)
CMPSS_setComparatorLowHysteresis
static void CMPSS_setComparatorLowHysteresis(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:1019
CMPSS_HICMP_CTL_M
#define CMPSS_HICMP_CTL_M
Header Files.
Definition: cmpss/v0/cmpss.h:75
CMPSS_setDACValueLow
static void CMPSS_setDACValueLow(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:497
CMPSS_getMaxRampValue
static uint16_t CMPSS_getMaxRampValue(uint32_t base)
Definition: cmpss/v0/cmpss.h:682
CMPSS_configHighComparator
static void CMPSS_configHighComparator(uint32_t base, uint16_t config)
Definition: cmpss/v0/cmpss.h:255
CMPSS_configLowDACShadowValue2
static void CMPSS_configLowDACShadowValue2(uint32_t base, uint16_t dacval)
Definition: cmpss/v0/cmpss.h:960
CMPSS_setDACValueHigh
static void CMPSS_setDACValueHigh(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:471
CMPSS_getRampDecValue
static uint16_t CMPSS_getRampDecValue(uint32_t base)
Definition: cmpss/v0/cmpss.h:723
CMPSS_getDACValueLow
static uint16_t CMPSS_getDACValueLow(uint32_t base)
Definition: cmpss/v0/cmpss.h:595
CMPSS_getRampDelayValue
static uint16_t CMPSS_getRampDelayValue(uint32_t base)
Definition: cmpss/v0/cmpss.h:767
CMPSS_configBlanking
static void CMPSS_configBlanking(uint32_t base, uint16_t pwmBlankSrc)
Definition: cmpss/v0/cmpss.h:793
CMPSS_initFilterLow
static void CMPSS_initFilterLow(uint32_t base)
Definition: cmpss/v0/cmpss.h:549
DebugP.h
CMPSS_initFilterHigh
static void CMPSS_initFilterHigh(uint32_t base)
Definition: cmpss/v0/cmpss.h:523
CMPSS_setMaxRampValue
static void CMPSS_setMaxRampValue(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:663
CMPSS_clearFilterLatchHigh
static void CMPSS_clearFilterLatchHigh(uint32_t base)
Definition: cmpss/v0/cmpss.h:616
CMPSS_getDACValueHigh
static uint16_t CMPSS_getDACValueHigh(uint32_t base)
Definition: cmpss/v0/cmpss.h:573
CMPSS_enableBlanking
static void CMPSS_enableBlanking(uint32_t base)
Definition: cmpss/v0/cmpss.h:828
DebugP_assert
#define DebugP_assert(expression)
Function to call for assert check.
Definition: DebugP.h:159
CMPSS_configFilterLow
void CMPSS_configFilterLow(uint32_t base, uint16_t samplePrescale, uint16_t sampleWindow, uint16_t threshold)
CMPSS_configLatchOnPWMSYNC
void CMPSS_configLatchOnPWMSYNC(uint32_t base, bool highEnable, bool lowEnable)
CMPSS_disableDEmode
static void CMPSS_disableDEmode(uint32_t base)
Definition: cmpss/v0/cmpss.h:894
CMPSS_configFilterHigh
void CMPSS_configFilterHigh(uint32_t base, uint16_t samplePrescale, uint16_t sampleWindow, uint16_t threshold)
CMPSS_configLowComparator
static void CMPSS_configLowComparator(uint32_t base, uint16_t config)
Definition: cmpss/v0/cmpss.h:292
CMPSS_disableBlanking
static void CMPSS_disableBlanking(uint32_t base)
Definition: cmpss/v0/cmpss.h:851