49 #ifndef ti_dl_m0p_dl_comp__include 50 #define ti_dl_m0p_dl_comp__include 55 #include <ti/devices/msp/msp.h> 58 #ifdef __MSPM0_HAS_COMP__ 64 #ifdef COMP_SYS_DACOUT_EN 68 #define DEVICE_HAS_DAC_OUT_TO_PIN 79 #define DL_COMP_INTERRUPT_OUTPUT_READY (COMP_CPU_INT_IMASK_OUTRDYIFG_SET) 85 #define DL_COMP_INTERRUPT_OUTPUT_EDGE (COMP_CPU_INT_IMASK_COMPIFG_SET) 91 #define DL_COMP_INTERRUPT_OUTPUT_EDGE_INV (COMP_CPU_INT_IMASK_COMPINVIFG_SET) 101 #define DL_COMP_EVENT_OUTPUT_READY (COMP_GEN_EVENT_IMASK_OUTRDYIFG_SET) 107 #define DL_COMP_EVENT_OUTPUT_EDGE (COMP_GEN_EVENT_IMASK_COMPIFG_SET) 113 #define DL_COMP_EVENT_OUTPUT_EDGE_INV (COMP_GEN_EVENT_IMASK_COMPINVIFG_SET) 225 (COMP_CTL0_IPEN_DISABLE | COMP_CTL0_IMEN_DISABLE),
232 (COMP_CTL0_IPEN_ENABLE | COMP_CTL0_IMEN_ENABLE),
265 #if (DeviceFamily_PARENT == DeviceFamily_PARENT_MSPM0L122X_L222X) 379 comp->GPRCM.PWREN = (COMP_PWREN_KEY_UNLOCK_W | COMP_PWREN_ENABLE_ENABLE);
395 comp->GPRCM.PWREN = (COMP_PWREN_KEY_UNLOCK_W | COMP_PWREN_ENABLE_DISABLE);
418 return ((comp->GPRCM.PWREN & COMP_PWREN_ENABLE_MASK) ==
419 COMP_PWREN_ENABLE_ENABLE);
430 (COMP_RSTCTL_KEY_UNLOCK_W | COMP_RSTCTL_RESETSTKYCLR_CLR |
431 COMP_RSTCTL_RESETASSERT_ASSERT);
445 return ((comp->GPRCM.STAT & COMP_GPRCM_STAT_RESETSTKY_MASK) ==
446 COMP_GPRCM_STAT_RESETSTKY_RESET);
464 COMP_CTL0_IMSEL_MASK | COMP_CTL0_IPSEL_MASK | COMP_CTL0_IPEN_MASK |
465 COMP_CTL0_IMEN_MASK);
470 COMP_CTL1_MODE_MASK | COMP_CTL1_HYST_MASK | COMP_CTL1_OUTPOL_MASK);
487 (uint32_t) config->
mode | (uint32_t) config->
source |
490 COMP_CTL2_REFMODE_MASK | COMP_CTL2_REFSRC_MASK |
491 COMP_CTL2_REFSEL_MASK | COMP_CTL2_DACCTL_MASK |
492 COMP_CTL2_DACSW_MASK);
502 comp->CTL1 |= COMP_CTL1_ENABLE_ON;
518 return ((comp->CTL1 & COMP_CTL1_ENABLE_MASK) == COMP_CTL1_ENABLE_ON);
528 comp->CTL1 &= ~(COMP_CTL1_ENABLE_MASK);
562 uint32_t mode = (comp->CTL1 & COMP_CTL1_MODE_MASK);
564 return (DL_COMP_MODE)(mode);
579 comp->CTL1 |= COMP_CTL1_EXCH_EXC;
595 return ((comp->CTL1 & COMP_CTL1_EXCH_MASK) == COMP_CTL1_EXCH_EXC);
608 comp->CTL1 &= ~(COMP_CTL1_EXCH_MASK);
621 comp->CTL1 |= COMP_CTL1_SHORT_SHT;
637 return ((comp->CTL1 & COMP_CTL1_SHORT_MASK) == COMP_CTL1_SHORT_SHT);
647 comp->CTL1 &= ~(COMP_CTL1_SHORT_MASK);
665 COMP_Regs *comp, DL_COMP_OUTPUT_INT_EDGE edge)
682 uint32_t interruptEdge = (comp->CTL1 & COMP_CTL1_IES_MASK);
684 return (DL_COMP_OUTPUT_INT_EDGE)(interruptEdge);
694 COMP_Regs *comp, DL_COMP_HYSTERESIS voltage)
710 uint32_t hysteresis = (comp->CTL1 & COMP_CTL1_HYST_MASK);
712 return (DL_COMP_HYSTERESIS)(hysteresis);
722 COMP_Regs *comp, DL_COMP_POLARITY polarity)
725 &comp->CTL1, (uint32_t) polarity, COMP_CTL1_OUTPOL_MASK);
739 uint32_t polarity = (comp->CTL1 & COMP_CTL1_OUTPOL_MASK);
741 return (DL_COMP_POLARITY)(polarity);
756 COMP_Regs *comp, DL_COMP_FILTER_DELAY delay)
758 comp->CTL1 |= (COMP_CTL1_FLTEN_ENABLE | (uint32_t) delay);
773 return ((comp->CTL1 & COMP_CTL1_FLTEN_MASK) == COMP_CTL1_FLTEN_ENABLE);
783 comp->CTL1 &= ~(COMP_CTL1_FLTEN_MASK);
798 uint32_t delay = (comp->CTL1 & COMP_CTL1_FLTDLY_MASK);
800 return (DL_COMP_FILTER_DELAY)(delay);
810 comp->CTL1 |= COMP_CTL1_WINCOMPEN_ON;
825 return ((comp->CTL1 & COMP_CTL1_WINCOMPEN_MASK) == COMP_CTL1_WINCOMPEN_ON);
835 comp->CTL1 &= ~(COMP_CTL1_WINCOMPEN_MASK);
838 #ifdef DEVICE_HAS_DAC_OUT_TO_PIN 847 __STATIC_INLINE
void DL_COMP_enableDACOutputToPin(COMP_Regs *comp)
849 comp->CTL1 |= COMP_CTL1_DACOUTEN_ENABLE;
862 __STATIC_INLINE
bool DL_COMP_isDACOutputToPinEnabled(COMP_Regs *comp)
865 (comp->CTL1 & COMP_CTL1_DACOUTEN_MASK) == COMP_CTL1_DACOUTEN_ENABLE);
873 __STATIC_INLINE
void DL_COMP_disableDACOutputToPin(COMP_Regs *comp)
875 comp->CTL1 &= ~(COMP_CTL1_DACOUTEN_MASK);
893 (COMP_CTL0_IMEN_MASK | COMP_CTL0_IPEN_MASK));
909 (comp->CTL0 & (COMP_CTL0_IMEN_MASK | COMP_CTL0_IPEN_MASK));
928 COMP_Regs *comp, DL_COMP_IPSEL_CHANNEL input)
945 uint32_t channel = (comp->CTL0 & COMP_CTL0_IPSEL_MASK);
947 return (DL_COMP_IPSEL_CHANNEL)(channel);
964 COMP_Regs *comp, DL_COMP_IMSEL_CHANNEL input)
981 uint32_t channel = (comp->CTL0 & COMP_CTL0_IMSEL_MASK);
983 return (DL_COMP_IMSEL_CHANNEL)(channel);
1002 COMP_Regs *comp, DL_COMP_REF_MODE mode)
1018 uint32_t mode = (comp->CTL2 & COMP_CTL2_REFMODE_MASK);
1020 return (DL_COMP_REF_MODE)(mode);
1030 COMP_Regs *comp, DL_COMP_REF_SOURCE source)
1046 uint32_t source = (comp->CTL2 & COMP_CTL2_REFSRC_MASK);
1048 return (DL_COMP_REF_SOURCE)(source);
1065 COMP_Regs *comp, DL_COMP_REF_TERMINAL_SELECT terminal)
1068 &comp->CTL2, (uint32_t) terminal, COMP_CTL2_REFSEL_MASK);
1083 uint32_t terminal = (comp->CTL2 & COMP_CTL2_REFSEL_MASK);
1085 return (DL_COMP_REF_TERMINAL_SELECT)(terminal);
1095 COMP_Regs *comp, DL_COMP_BLANKING_SOURCE source)
1098 &comp->CTL2, (uint32_t) source, COMP_CTL2_BLANKSRC_MASK);
1113 uint32_t source = (comp->CTL2 & COMP_CTL2_BLANKSRC_MASK);
1115 return (DL_COMP_BLANKING_SOURCE)(source);
1130 COMP_Regs *comp, DL_COMP_DAC_CONTROL control)
1133 &comp->CTL2, (uint32_t) control, COMP_CTL2_DACCTL_MASK);
1147 uint32_t control = (comp->CTL2 & COMP_CTL2_DACCTL_MASK);
1149 return (DL_COMP_DAC_CONTROL)(control);
1164 COMP_Regs *comp, DL_COMP_DAC_INPUT input)
1183 uint32_t input = (comp->CTL2 & COMP_CTL2_DACSW_MASK);
1185 return (DL_COMP_DAC_INPUT)(input);
1223 return (comp->CTL3 & COMP_CTL3_DACCODE0_MASK);
1248 COMP_CTL3_DACCODE1_MASK);
1262 return ((comp->CTL3 & COMP_CTL3_DACCODE1_MASK) >> COMP_CTL3_DACCODE1_OFS);
1274 uint32_t output = (comp->STAT & COMP_STAT_OUT_MASK);
1276 return (DL_COMP_OUTPUT)(output);
1286 comp->CTL2 |= COMP_CTL2_SAMPMODE_ENABLE;
1303 (comp->CTL2 & COMP_CTL2_SAMPMODE_MASK) == COMP_CTL2_SAMPMODE_ENABLE);
1313 comp->CTL2 &= ~(COMP_CTL2_SAMPMODE_MASK);
1328 volatile uint32_t *pReg = &comp->FSUB_0;
1330 *(pReg + (uint32_t) index) = (chanID & COMP_FSUB_0_CHANID_MAXIMUM);
1345 volatile uint32_t *pReg = &comp->FSUB_0;
1347 return ((uint8_t)(*(pReg + (uint32_t) index) & COMP_FSUB_0_CHANID_MASK));
1359 COMP_Regs *comp, uint32_t interruptMask)
1361 comp->CPU_INT.IMASK |= interruptMask;
1373 COMP_Regs *comp, uint32_t interruptMask)
1375 comp->CPU_INT.IMASK &= ~(interruptMask);
1391 COMP_Regs *comp, uint32_t interruptMask)
1393 return (comp->CPU_INT.IMASK & interruptMask);
1414 COMP_Regs *comp, uint32_t interruptMask)
1416 return (comp->CPU_INT.MIS & interruptMask);
1435 COMP_Regs *comp, uint32_t interruptMask)
1437 return (comp->CPU_INT.RIS & interruptMask);
1453 return (DL_COMP_IIDX)(comp->CPU_INT.IIDX);
1465 COMP_Regs *comp, uint32_t interruptMask)
1467 comp->CPU_INT.ICLR = interruptMask;
1479 COMP_Regs *comp, uint8_t chanID)
1481 comp->FPUB_1 = (chanID & COMP_FPUB_1_CHANID_MAXIMUM);
1494 return ((uint8_t)((comp->FPUB_1) & COMP_FPUB_1_CHANID_MAXIMUM));
1507 comp->GEN_EVENT.IMASK |= (eventMask);
1520 comp->GEN_EVENT.IMASK &= ~(eventMask);
1536 COMP_Regs *comp, uint32_t eventMask)
1538 return ((comp->GEN_EVENT.IMASK) & (eventMask));
1559 COMP_Regs *comp, uint32_t eventMask)
1561 return ((comp->GEN_EVENT.MIS) & eventMask);
1580 COMP_Regs *comp, uint32_t eventMask)
1582 return ((comp->GEN_EVENT.RIS) & eventMask);
1594 COMP_Regs *comp, uint32_t eventMask)
1596 comp->GEN_EVENT.ICLR |= (eventMask);
__STATIC_INLINE void DL_COMP_setEnabledInputChannels(COMP_Regs *comp, DL_COMP_ENABLE_CHANNEL channels)
Set the enabled channels for the comparator terminals.
Definition: dl_comp.h:889
Definition: dl_comp.h:304
__STATIC_INLINE bool DL_COMP_isInputTerminalsShorted(COMP_Regs *comp)
Checks if the comparator inputs are shorted.
Definition: dl_comp.h:635
__STATIC_INLINE void DL_COMP_enableExchangeInputs(COMP_Regs *comp)
Enable exchange of the comparator inputs, and invert output.
Definition: dl_comp.h:577
Definition: dl_comp.h:275
__STATIC_INLINE void DL_Common_updateReg(volatile uint32_t *reg, uint32_t val, uint32_t mask)
Writes value to specified register - retaining bits unaffected by mask.
Definition: dl_common.h:63
__STATIC_INLINE void DL_COMP_disablePower(COMP_Regs *comp)
Disables the Peripheral Write Enable (PWREN) register for the COMP.
Definition: dl_comp.h:393
Definition: dl_comp.h:178
Definition: dl_comp.h:231
Definition: dl_comp.h:216
DL_COMP_OUTPUT
Definition: dl_comp.h:316
__STATIC_INLINE DL_COMP_IIDX DL_COMP_getPendingInterrupt(COMP_Regs *comp)
Get highest priority pending COMP interrupt.
Definition: dl_comp.h:1451
Definition: dl_comp.h:296
DL_COMP_POLARITY
Definition: dl_comp.h:162
__STATIC_INLINE void DL_COMP_clearEventsStatus(COMP_Regs *comp, uint32_t eventMask)
Clear pending COMP events.
Definition: dl_comp.h:1593
DL_COMP_BLANKING_SOURCE
Definition: dl_comp.h:282
DL_COMP_HYSTERESIS hysteresis
Definition: dl_comp.h:346
Definition: dl_comp.h:154
DL_COMP_ENABLE_CHANNEL
Definition: dl_comp.h:222
Definition: dl_comp.h:229
Configuration struct for DL_COMP_init.
Definition: dl_comp.h:334
Definition: dl_comp.h:158
__STATIC_INLINE DL_COMP_IPSEL_CHANNEL DL_COMP_getPositiveChannelInput(COMP_Regs *comp)
Get the channel input for the positive terminal.
Definition: dl_comp.h:942
Definition: dl_comp.h:156
DL_COMP_IPSEL_CHANNEL
Definition: dl_comp.h:182
Definition: dl_comp.h:186
Definition: dl_comp.h:302
DL_COMP_REF_TERMINAL_SELECT terminalSelect
Definition: dl_comp.h:358
Definition: dl_comp.h:328
Definition: dl_comp.h:138
__STATIC_INLINE DL_COMP_REF_MODE DL_COMP_getReferenceMode(COMP_Regs *comp)
Get the mode for the reference voltage.
Definition: dl_comp.h:1016
Definition: dl_comp.h:218
__STATIC_INLINE void DL_COMP_setCompMode(COMP_Regs *comp, DL_COMP_MODE mode)
Set the comparator operating mode.
Definition: dl_comp.h:546
Definition: dl_comp.h:278
Definition: dl_comp.h:267
Definition: dl_comp.h:130
Definition: dl_comp.h:194
DL_COMP_ENABLE_CHANNEL channelEnable
Definition: dl_comp.h:338
Definition: dl_comp.h:290
__STATIC_INLINE void DL_COMP_disableExchangeInputs(COMP_Regs *comp)
Disable input exchange and invert output.
Definition: dl_comp.h:606
Definition: dl_comp.h:122
__STATIC_INLINE void DL_COMP_setSubscriberChanID(COMP_Regs *comp, DL_COMP_SUBSCRIBER_INDEX index, uint8_t chanID)
Sets the event subscriber channel id.
Definition: dl_comp.h:1325
__STATIC_INLINE DL_COMP_REF_TERMINAL_SELECT DL_COMP_getReferenceCompTerminal(COMP_Regs *comp)
Get the comparator terminal the reference voltage is applied to.
Definition: dl_comp.h:1080
Definition: dl_comp.h:166
__STATIC_INLINE bool DL_COMP_isWindowComparatorEnabled(COMP_Regs *comp)
Checks if the window comparator is enabled.
Definition: dl_comp.h:823
Definition: dl_comp.h:127
__STATIC_INLINE void DL_COMP_disableSampledMode(COMP_Regs *comp)
Disable sampled mode.
Definition: dl_comp.h:1311
Definition: dl_comp.h:242
__STATIC_INLINE void DL_COMP_enableEvent(COMP_Regs *comp, uint32_t eventMask)
Enable COMP event.
Definition: dl_comp.h:1505
Definition: dl_comp.h:288
Definition: dl_comp.h:258
Definition: dl_comp.h:146
__STATIC_INLINE void DL_COMP_setOutputPolarity(COMP_Regs *comp, DL_COMP_POLARITY polarity)
Set the output polarity.
Definition: dl_comp.h:721
__STATIC_INLINE bool DL_COMP_isSampledModeEnabled(COMP_Regs *comp)
Checks if sampled mode is enabled.
Definition: dl_comp.h:1300
Configuration struct for DL_COMP_refVoltageInit.
Definition: dl_comp.h:352
Definition: dl_comp.h:294
__STATIC_INLINE void DL_COMP_disableEvent(COMP_Regs *comp, uint32_t eventMask)
Disable COMP event.
Definition: dl_comp.h:1518
DL_COMP_REF_TERMINAL_SELECT
Definition: dl_comp.h:272
Definition: dl_comp.h:312
Definition: dl_comp.h:320
__STATIC_INLINE uint32_t DL_COMP_getRawEventsStatus(COMP_Regs *comp, uint32_t eventMask)
Check interrupt flag of any COMP event.
Definition: dl_comp.h:1579
Definition: dl_comp.h:204
__STATIC_INLINE uint8_t DL_COMP_getPublisherChanID(COMP_Regs *comp)
Gets the event publisher channel ID.
Definition: dl_comp.h:1492
DL_COMP_DAC_INPUT inputSelect
Definition: dl_comp.h:363
Definition: dl_comp.h:249
DL_COMP_MODE mode
Definition: dl_comp.h:336
__STATIC_INLINE bool DL_COMP_isPowerEnabled(COMP_Regs *comp)
Returns if the Peripheral Write Enable (PWREN) register for the COMP is enabled.
Definition: dl_comp.h:416
__STATIC_INLINE uint32_t DL_COMP_getDACCode1(COMP_Regs *comp)
Get the code value of DACCODE1.
Definition: dl_comp.h:1260
__STATIC_INLINE void DL_COMP_setDACControl(COMP_Regs *comp, DL_COMP_DAC_CONTROL control)
Select the source for DAC control.
Definition: dl_comp.h:1129
__STATIC_INLINE void DL_COMP_setBlankingSource(COMP_Regs *comp, DL_COMP_BLANKING_SOURCE source)
Set the blanking source for the comparator.
Definition: dl_comp.h:1094
__STATIC_INLINE DL_COMP_MODE DL_COMP_getCompMode(COMP_Regs *comp)
Get the mode the comparator is set to.
Definition: dl_comp.h:560
Definition: dl_comp.h:136
__STATIC_INLINE DL_COMP_HYSTERESIS DL_COMP_getHysteresis(COMP_Regs *comp)
Get the hysteresis voltage.
Definition: dl_comp.h:708
__STATIC_INLINE void DL_COMP_setReferenceCompTerminal(COMP_Regs *comp, DL_COMP_REF_TERMINAL_SELECT terminal)
Set the comparator terminal the reference voltage is applied to.
Definition: dl_comp.h:1064
__STATIC_INLINE void DL_COMP_setReferenceMode(COMP_Regs *comp, DL_COMP_REF_MODE mode)
Set the mode for the reference voltage.
Definition: dl_comp.h:1001
__STATIC_INLINE DL_COMP_REF_SOURCE DL_COMP_getReferenceSource(COMP_Regs *comp)
Get the reference source for the comparator.
Definition: dl_comp.h:1044
Definition: dl_comp.h:261
__STATIC_INLINE void DL_COMP_enableShortInputTerminals(COMP_Regs *comp)
Enable shorting of the comparator inputs.
Definition: dl_comp.h:619
Definition: dl_comp.h:144
DL_COMP_MODE
Definition: dl_comp.h:134
DL_COMP_REF_SOURCE source
Definition: dl_comp.h:356
__STATIC_INLINE void DL_COMP_enable(COMP_Regs *comp)
Enable the comparator peripheral.
Definition: dl_comp.h:500
DL_COMP_HYSTERESIS
Definition: dl_comp.h:150
__STATIC_INLINE uint32_t DL_COMP_getEnabledInterrupts(COMP_Regs *comp, uint32_t interruptMask)
Check which COMP interrupts are enabled.
Definition: dl_comp.h:1390
Definition: dl_comp.h:210
Definition: dl_comp.h:152
__STATIC_INLINE void DL_COMP_refVoltageInit(COMP_Regs *comp, DL_COMP_RefVoltageConfig *config)
Initialize the comparator reference voltage generator.
Definition: dl_comp.h:483
DL_COMP_REF_SOURCE
Definition: dl_comp.h:246
__STATIC_INLINE void DL_COMP_setDACCode1(COMP_Regs *comp, uint32_t value)
Set the 8-bit DAC input code through DACCODE1.
Definition: dl_comp.h:1245
DL_COMP_OUTPUT_INT_EDGE
Definition: dl_comp.h:142
Definition: dl_comp.h:124
Definition: dl_comp.h:192
__STATIC_INLINE bool DL_COMP_isEnabled(COMP_Regs *comp)
Checks if the comparator peripheral is enabled.
Definition: dl_comp.h:516
__STATIC_INLINE uint32_t DL_COMP_getDACCode0(COMP_Regs *comp)
Get the code value of DACCODE0.
Definition: dl_comp.h:1221
__STATIC_INLINE void DL_COMP_disableInterrupt(COMP_Regs *comp, uint32_t interruptMask)
Disable COMP interrupts.
Definition: dl_comp.h:1372
__STATIC_INLINE DL_COMP_OUTPUT_INT_EDGE DL_COMP_getOutputInterruptEdge(COMP_Regs *comp)
Get the interrupt edge for the comparator output.
Definition: dl_comp.h:679
__STATIC_INLINE void DL_COMP_disableShortInputTerminals(COMP_Regs *comp)
Disable shorting the comparator inputs.
Definition: dl_comp.h:645
__STATIC_INLINE DL_COMP_OUTPUT DL_COMP_getComparatorOutput(COMP_Regs *comp)
Gets the comparator output.
Definition: dl_comp.h:1272
__STATIC_INLINE DL_COMP_POLARITY DL_COMP_getOutputPolarity(COMP_Regs *comp)
Get the output polarity.
Definition: dl_comp.h:737
__STATIC_INLINE void DL_COMP_setDACCode0(COMP_Regs *comp, uint32_t value)
Set the 8-bit DAC input code through DACCODE0.
Definition: dl_comp.h:1207
__STATIC_INLINE void DL_COMP_init(COMP_Regs *comp, DL_COMP_Config *config)
Initialize the COMP peripheral.
Definition: dl_comp.h:459
__STATIC_INLINE DL_COMP_DAC_CONTROL DL_COMP_getDACControl(COMP_Regs *comp)
Get what controls the input to the DAC.
Definition: dl_comp.h:1145
Definition: dl_comp.h:310
Definition: dl_comp.h:198
Definition: dl_comp.h:206
__STATIC_INLINE void DL_COMP_enableInterrupt(COMP_Regs *comp, uint32_t interruptMask)
Enable COMP interrupts.
Definition: dl_comp.h:1358
__STATIC_INLINE bool DL_COMP_isReset(COMP_Regs *comp)
Returns if comparator was reset.
Definition: dl_comp.h:443
Definition: dl_comp.h:172
Definition: dl_comp.h:252
Definition: dl_comp.h:184
__STATIC_INLINE bool DL_COMP_isExchangeInputsEnabled(COMP_Regs *comp)
Checks if the inputs are exchanged and if output is inverted.
Definition: dl_comp.h:593
__STATIC_INLINE void DL_COMP_setNegativeChannelInput(COMP_Regs *comp, DL_COMP_IMSEL_CHANNEL input)
Set the channel input for the negative terminal.
Definition: dl_comp.h:963
Definition: dl_comp.h:212
__STATIC_INLINE DL_COMP_IMSEL_CHANNEL DL_COMP_getNegativeChannelInput(COMP_Regs *comp)
Get the channel input for the negative terminal.
Definition: dl_comp.h:978
Definition: dl_comp.h:318
DL_COMP_SUBSCRIBER_INDEX
Definition: dl_comp.h:324
DL_COMP_IMSEL_CHANNEL negChannel
Definition: dl_comp.h:342
__STATIC_INLINE DL_COMP_DAC_INPUT DL_COMP_getDACInput(COMP_Regs *comp)
Get whether DACCODE0 or DACCODE1 is the input to the DAC.
Definition: dl_comp.h:1181
__STATIC_INLINE void DL_COMP_setPublisherChanID(COMP_Regs *comp, uint8_t chanID)
Sets the COMP event publisher channel ID.
Definition: dl_comp.h:1478
__STATIC_INLINE void DL_COMP_reset(COMP_Regs *comp)
Resets comparator peripheral.
Definition: dl_comp.h:427
__STATIC_INLINE void DL_COMP_enableWindowComparator(COMP_Regs *comp)
Enable the window comparator.
Definition: dl_comp.h:808
__STATIC_INLINE void DL_COMP_setDACInput(COMP_Regs *comp, DL_COMP_DAC_INPUT input)
Set whether DACCODE0 or DACCODE1 is the input to the DAC.
Definition: dl_comp.h:1163
__STATIC_INLINE void DL_COMP_enablePower(COMP_Regs *comp)
Enables the Peripheral Write Enable (PWREN) register for the COMP.
Definition: dl_comp.h:377
__STATIC_INLINE uint32_t DL_COMP_getEnabledInterruptStatus(COMP_Regs *comp, uint32_t interruptMask)
Check interrupt flag of enabled COMP interrupts.
Definition: dl_comp.h:1413
__STATIC_INLINE void DL_COMP_disable(COMP_Regs *comp)
Disable the comparator peripheral.
Definition: dl_comp.h:526
Definition: dl_comp.h:214
__STATIC_INLINE uint8_t DL_COMP_getSubscriberChanID(COMP_Regs *comp, DL_COMP_SUBSCRIBER_INDEX index)
Gets the event subscriber channel id.
Definition: dl_comp.h:1342
Definition: dl_comp.h:196
Definition: dl_comp.h:292
Definition: dl_comp.h:190
Definition: dl_comp.h:176
DL_COMP_POLARITY polarity
Definition: dl_comp.h:344
Definition: dl_comp.h:286
DL_COMP_FILTER_DELAY
Definition: dl_comp.h:170
__STATIC_INLINE void DL_COMP_enableSampledMode(COMP_Regs *comp)
Enable sampled mode of the comparator.
Definition: dl_comp.h:1284
DL_COMP_DAC_CONTROL
Definition: dl_comp.h:300
Definition: dl_comp.h:224
Definition: dl_comp.h:174
__STATIC_INLINE void DL_COMP_disableWindowComparator(COMP_Regs *comp)
Disable the window comparator.
Definition: dl_comp.h:833
__STATIC_INLINE void DL_COMP_disableOutputFilter(COMP_Regs *comp)
Disable output filter using on-chip analog filter.
Definition: dl_comp.h:781
DL_COMP_REF_MODE mode
Definition: dl_comp.h:354
Definition: dl_comp.h:208
__STATIC_INLINE void DL_COMP_clearInterruptStatus(COMP_Regs *comp, uint32_t interruptMask)
Clear pending COMP interrupts.
Definition: dl_comp.h:1464
Definition: dl_comp.h:227
__STATIC_INLINE void DL_COMP_setHysteresis(COMP_Regs *comp, DL_COMP_HYSTERESIS voltage)
Set the hysteresis voltage.
Definition: dl_comp.h:693
__STATIC_INLINE DL_COMP_FILTER_DELAY DL_COMP_getOutputFilterDelay(COMP_Regs *comp)
Get the output filter delay.
Definition: dl_comp.h:795
__STATIC_INLINE void DL_COMP_setOutputInterruptEdge(COMP_Regs *comp, DL_COMP_OUTPUT_INT_EDGE edge)
Set the interrupt edge for the comparator output.
Definition: dl_comp.h:664
Definition: dl_comp.h:264
DL_COMP_IIDX
Definition: dl_comp.h:120
Definition: dl_comp.h:188
__STATIC_INLINE uint32_t DL_COMP_getEnabledEvents(COMP_Regs *comp, uint32_t eventMask)
Check which COMP events are enabled.
Definition: dl_comp.h:1535
__STATIC_INLINE DL_COMP_ENABLE_CHANNEL DL_COMP_getEnabledInputChannels(COMP_Regs *comp)
Get the enabled input channels.
Definition: dl_comp.h:905
Definition: dl_comp.h:326
Definition: dl_comp.h:284
Definition: dl_comp.h:164
__STATIC_INLINE uint32_t DL_COMP_getEnabledEventStatus(COMP_Regs *comp, uint32_t eventMask)
Check event flag of enabled COMP event.
Definition: dl_comp.h:1558
DL_COMP_DAC_INPUT
Definition: dl_comp.h:308
__STATIC_INLINE void DL_COMP_setReferenceSource(COMP_Regs *comp, DL_COMP_REF_SOURCE source)
Set the reference source for the comparator.
Definition: dl_comp.h:1029
DL_COMP_IPSEL_CHANNEL posChannel
Definition: dl_comp.h:340
__STATIC_INLINE void DL_COMP_enableOutputFilter(COMP_Regs *comp, DL_COMP_FILTER_DELAY delay)
Enable output filter.
Definition: dl_comp.h:755
DL_COMP_IMSEL_CHANNEL
Definition: dl_comp.h:202
__STATIC_INLINE DL_COMP_BLANKING_SOURCE DL_COMP_getBlankingSource(COMP_Regs *comp)
Get the blanking source for the comparator.
Definition: dl_comp.h:1110
__STATIC_INLINE void DL_COMP_setPositiveChannelInput(COMP_Regs *comp, DL_COMP_IPSEL_CHANNEL input)
Set the channel input for the positive terminal.
Definition: dl_comp.h:927
DL_COMP_DAC_CONTROL controlSelect
Definition: dl_comp.h:360
Definition: dl_comp.h:255
__STATIC_INLINE uint32_t DL_COMP_getRawInterruptStatus(COMP_Regs *comp, uint32_t interruptMask)
Check interrupt flag of any COMP interrupt.
Definition: dl_comp.h:1434
__STATIC_INLINE bool DL_COMP_isOutputFilterEnabled(COMP_Regs *comp)
Checks if output filter is enabled.
Definition: dl_comp.h:771
DL_COMP_REF_MODE
Definition: dl_comp.h:236
Definition: dl_comp.h:239