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__ 72 #define DL_COMP_INTERRUPT_OUTPUT_READY (COMP_CPU_INT_IMASK_OUTRDYIFG_SET) 78 #define DL_COMP_INTERRUPT_OUTPUT_EDGE (COMP_CPU_INT_IMASK_COMPIFG_SET) 84 #define DL_COMP_INTERRUPT_OUTPUT_EDGE_INV (COMP_CPU_INT_IMASK_COMPINVIFG_SET) 94 #define DL_COMP_EVENT_OUTPUT_READY (COMP_GEN_EVENT_IMASK_OUTRDYIFG_SET) 100 #define DL_COMP_EVENT_OUTPUT_EDGE (COMP_GEN_EVENT_IMASK_COMPIFG_SET) 106 #define DL_COMP_EVENT_OUTPUT_EDGE_INV (COMP_GEN_EVENT_IMASK_COMPINVIFG_SET) 218 (COMP_CTL0_IPEN_DISABLE | COMP_CTL0_IMEN_DISABLE),
225 (COMP_CTL0_IPEN_ENABLE | COMP_CTL0_IMEN_ENABLE),
356 comp->GPRCM.PWREN = (COMP_PWREN_KEY_UNLOCK_W | COMP_PWREN_ENABLE_ENABLE);
366 comp->GPRCM.PWREN = (COMP_PWREN_KEY_UNLOCK_W | COMP_PWREN_ENABLE_DISABLE);
381 return ((comp->GPRCM.PWREN & COMP_PWREN_ENABLE_MASK) ==
382 COMP_PWREN_ENABLE_ENABLE);
393 (COMP_RSTCTL_KEY_UNLOCK_W | COMP_RSTCTL_RESETSTKYCLR_CLR |
394 COMP_RSTCTL_RESETASSERT_ASSERT);
408 return ((comp->GPRCM.STAT & COMP_GPRCM_STAT_RESETSTKY_MASK) ==
409 COMP_GPRCM_STAT_RESETSTKY_RESET);
427 COMP_CTL0_IMSEL_MASK | COMP_CTL0_IPSEL_MASK | COMP_CTL0_IPEN_MASK |
428 COMP_CTL0_IMEN_MASK);
433 COMP_CTL1_MODE_MASK | COMP_CTL1_HYST_MASK | COMP_CTL1_OUTPOL_MASK);
450 (uint32_t) config->
mode | (uint32_t) config->
source |
453 COMP_CTL2_REFMODE_MASK | COMP_CTL2_REFSRC_MASK |
454 COMP_CTL2_REFSEL_MASK | COMP_CTL2_DACCTL_MASK |
455 COMP_CTL2_DACSW_MASK);
465 comp->CTL1 |= COMP_CTL1_ENABLE_ON;
481 return ((comp->CTL1 & COMP_CTL1_ENABLE_MASK) == COMP_CTL1_ENABLE_ON);
491 comp->CTL1 &= ~(COMP_CTL1_ENABLE_MASK);
525 uint32_t mode = (comp->CTL1 & COMP_CTL1_MODE_MASK);
527 return (DL_COMP_MODE)(mode);
542 comp->CTL1 |= COMP_CTL1_EXCH_EXC;
558 return ((comp->CTL1 & COMP_CTL1_EXCH_MASK) == COMP_CTL1_EXCH_EXC);
571 comp->CTL1 &= ~(COMP_CTL1_EXCH_MASK);
584 comp->CTL1 |= COMP_CTL1_SHORT_SHT;
600 return ((comp->CTL1 & COMP_CTL1_SHORT_MASK) == COMP_CTL1_SHORT_SHT);
610 comp->CTL1 &= ~(COMP_CTL1_SHORT_MASK);
628 COMP_Regs *comp, DL_COMP_OUTPUT_INT_EDGE edge)
645 uint32_t interruptEdge = (comp->CTL1 & COMP_CTL1_IES_MASK);
647 return (DL_COMP_OUTPUT_INT_EDGE)(interruptEdge);
657 COMP_Regs *comp, DL_COMP_HYSTERESIS voltage)
673 uint32_t hysteresis = (comp->CTL1 & COMP_CTL1_HYST_MASK);
675 return (DL_COMP_HYSTERESIS)(hysteresis);
685 COMP_Regs *comp, DL_COMP_POLARITY polarity)
688 &comp->CTL1, (uint32_t) polarity, COMP_CTL1_OUTPOL_MASK);
702 uint32_t polarity = (comp->CTL1 & COMP_CTL1_OUTPOL_MASK);
704 return (DL_COMP_POLARITY)(polarity);
719 COMP_Regs *comp, DL_COMP_FILTER_DELAY delay)
721 comp->CTL1 |= (COMP_CTL1_FLTEN_ENABLE | (uint32_t) delay);
736 return ((comp->CTL1 & COMP_CTL1_FLTEN_MASK) == COMP_CTL1_FLTEN_ENABLE);
746 comp->CTL1 &= ~(COMP_CTL1_FLTEN_MASK);
761 uint32_t delay = (comp->CTL1 & COMP_CTL1_FLTDLY_MASK);
763 return (DL_COMP_FILTER_DELAY)(delay);
773 comp->CTL1 |= COMP_CTL1_WINCOMPEN_ON;
788 return ((comp->CTL1 & COMP_CTL1_WINCOMPEN_MASK) == COMP_CTL1_WINCOMPEN_ON);
798 comp->CTL1 &= ~(COMP_CTL1_WINCOMPEN_MASK);
814 (COMP_CTL0_IMEN_MASK | COMP_CTL0_IPEN_MASK));
830 (comp->CTL0 & (COMP_CTL0_IMEN_MASK | COMP_CTL0_IPEN_MASK));
849 COMP_Regs *comp, DL_COMP_IPSEL_CHANNEL input)
866 uint32_t channel = (comp->CTL0 & COMP_CTL0_IPSEL_MASK);
868 return (DL_COMP_IPSEL_CHANNEL)(channel);
885 COMP_Regs *comp, DL_COMP_IMSEL_CHANNEL input)
902 uint32_t channel = (comp->CTL0 & COMP_CTL0_IMSEL_MASK);
904 return (DL_COMP_IMSEL_CHANNEL)(channel);
923 COMP_Regs *comp, DL_COMP_REF_MODE mode)
939 uint32_t mode = (comp->CTL2 & COMP_CTL2_REFMODE_MASK);
941 return (DL_COMP_REF_MODE)(mode);
951 COMP_Regs *comp, DL_COMP_REF_SOURCE source)
967 uint32_t source = (comp->CTL2 & COMP_CTL2_REFSRC_MASK);
969 return (DL_COMP_REF_SOURCE)(source);
986 COMP_Regs *comp, DL_COMP_REF_TERMINAL_SELECT terminal)
989 &comp->CTL2, (uint32_t) terminal, COMP_CTL2_REFSEL_MASK);
1004 uint32_t terminal = (comp->CTL2 & COMP_CTL2_REFSEL_MASK);
1006 return (DL_COMP_REF_TERMINAL_SELECT)(terminal);
1016 COMP_Regs *comp, DL_COMP_BLANKING_SOURCE source)
1019 &comp->CTL2, (uint32_t) source, COMP_CTL2_BLANKSRC_MASK);
1034 uint32_t source = (comp->CTL2 & COMP_CTL2_BLANKSRC_MASK);
1036 return (DL_COMP_BLANKING_SOURCE)(source);
1051 COMP_Regs *comp, DL_COMP_DAC_CONTROL control)
1054 &comp->CTL2, (uint32_t) control, COMP_CTL2_DACCTL_MASK);
1068 uint32_t control = (comp->CTL2 & COMP_CTL2_DACCTL_MASK);
1070 return (DL_COMP_DAC_CONTROL)(control);
1085 COMP_Regs *comp, DL_COMP_DAC_INPUT input)
1104 uint32_t input = (comp->CTL2 & COMP_CTL2_DACSW_MASK);
1106 return (DL_COMP_DAC_INPUT)(input);
1144 return (comp->CTL3 & COMP_CTL3_DACCODE0_MASK);
1169 COMP_CTL3_DACCODE1_MASK);
1183 return ((comp->CTL3 & COMP_CTL3_DACCODE1_MASK) >> COMP_CTL3_DACCODE1_OFS);
1195 uint32_t output = (comp->STAT & COMP_STAT_OUT_MASK);
1197 return (DL_COMP_OUTPUT)(output);
1207 comp->CTL2 |= COMP_CTL2_SAMPMODE_ENABLE;
1224 (comp->CTL2 & COMP_CTL2_SAMPMODE_MASK) == COMP_CTL2_SAMPMODE_ENABLE);
1234 comp->CTL2 &= ~(COMP_CTL2_SAMPMODE_MASK);
1249 volatile uint32_t *pReg = &comp->FSUB_0;
1251 *(pReg + (uint32_t) index) = (chanID & COMP_FSUB_0_CHANID_MAXIMUM);
1266 volatile uint32_t *pReg = &comp->FSUB_0;
1268 return ((uint8_t)(*(pReg + (uint32_t) index) & COMP_FSUB_0_CHANID_MASK));
1280 COMP_Regs *comp, uint32_t interruptMask)
1282 comp->CPU_INT.IMASK |= interruptMask;
1294 COMP_Regs *comp, uint32_t interruptMask)
1296 comp->CPU_INT.IMASK &= ~(interruptMask);
1312 COMP_Regs *comp, uint32_t interruptMask)
1314 return (comp->CPU_INT.IMASK & interruptMask);
1335 COMP_Regs *comp, uint32_t interruptMask)
1337 return (comp->CPU_INT.MIS & interruptMask);
1356 COMP_Regs *comp, uint32_t interruptMask)
1358 return (comp->CPU_INT.RIS & interruptMask);
1374 return (DL_COMP_IIDX)(comp->CPU_INT.IIDX);
1386 COMP_Regs *comp, uint32_t interruptMask)
1388 comp->CPU_INT.ICLR = interruptMask;
1400 COMP_Regs *comp, uint8_t chanID)
1402 comp->FPUB_1 = (chanID & COMP_FPUB_1_CHANID_MAXIMUM);
1415 return ((uint8_t)((comp->FPUB_1) & COMP_FPUB_1_CHANID_MAXIMUM));
1428 comp->GEN_EVENT.IMASK |= (eventMask);
1441 comp->GEN_EVENT.IMASK &= ~(eventMask);
1457 COMP_Regs *comp, uint32_t eventMask)
1459 return ((comp->GEN_EVENT.IMASK) & (eventMask));
1480 COMP_Regs *comp, uint32_t eventMask)
1482 return ((comp->GEN_EVENT.MIS) & eventMask);
1501 COMP_Regs *comp, uint32_t eventMask)
1503 return ((comp->GEN_EVENT.RIS) & eventMask);
1515 COMP_Regs *comp, uint32_t eventMask)
1517 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:810
Definition: dl_comp.h:287
__STATIC_INLINE bool DL_COMP_isInputTerminalsShorted(COMP_Regs *comp)
Checks if the comparator inputs are shorted.
Definition: dl_comp.h:598
__STATIC_INLINE void DL_COMP_enableExchangeInputs(COMP_Regs *comp)
Enable exchange of the comparator inputs, and invert output.
Definition: dl_comp.h:540
Definition: dl_comp.h:258
__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 power on the comparator module.
Definition: dl_comp.h:364
Definition: dl_comp.h:171
Definition: dl_comp.h:224
Definition: dl_comp.h:209
DL_COMP_OUTPUT
Definition: dl_comp.h:299
__STATIC_INLINE DL_COMP_IIDX DL_COMP_getPendingInterrupt(COMP_Regs *comp)
Get highest priority pending COMP interrupt.
Definition: dl_comp.h:1372
Definition: dl_comp.h:279
DL_COMP_POLARITY
Definition: dl_comp.h:155
__STATIC_INLINE void DL_COMP_clearEventsStatus(COMP_Regs *comp, uint32_t eventMask)
Clear pending COMP events.
Definition: dl_comp.h:1514
DL_COMP_BLANKING_SOURCE
Definition: dl_comp.h:265
DL_COMP_HYSTERESIS hysteresis
Definition: dl_comp.h:329
Definition: dl_comp.h:147
DL_COMP_ENABLE_CHANNEL
Definition: dl_comp.h:215
Definition: dl_comp.h:222
Configuration struct for DL_COMP_init.
Definition: dl_comp.h:317
Definition: dl_comp.h:151
__STATIC_INLINE DL_COMP_IPSEL_CHANNEL DL_COMP_getPositiveChannelInput(COMP_Regs *comp)
Get the channel input for the positive terminal.
Definition: dl_comp.h:863
Definition: dl_comp.h:149
DL_COMP_IPSEL_CHANNEL
Definition: dl_comp.h:175
Definition: dl_comp.h:179
Definition: dl_comp.h:285
DL_COMP_REF_TERMINAL_SELECT terminalSelect
Definition: dl_comp.h:341
Definition: dl_comp.h:311
Definition: dl_comp.h:131
__STATIC_INLINE DL_COMP_REF_MODE DL_COMP_getReferenceMode(COMP_Regs *comp)
Get the mode for the reference voltage.
Definition: dl_comp.h:937
Definition: dl_comp.h:211
__STATIC_INLINE void DL_COMP_setCompMode(COMP_Regs *comp, DL_COMP_MODE mode)
Set the comparator operating mode.
Definition: dl_comp.h:509
Definition: dl_comp.h:261
Definition: dl_comp.h:123
Definition: dl_comp.h:187
DL_COMP_ENABLE_CHANNEL channelEnable
Definition: dl_comp.h:321
Definition: dl_comp.h:273
__STATIC_INLINE void DL_COMP_disableExchangeInputs(COMP_Regs *comp)
Disable input exchange and invert output.
Definition: dl_comp.h:569
Definition: dl_comp.h:115
__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:1246
__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:1001
Definition: dl_comp.h:159
__STATIC_INLINE bool DL_COMP_isWindowComparatorEnabled(COMP_Regs *comp)
Checks if the window comparator is enabled.
Definition: dl_comp.h:786
Definition: dl_comp.h:120
__STATIC_INLINE void DL_COMP_disableSampledMode(COMP_Regs *comp)
Disable sampled mode.
Definition: dl_comp.h:1232
Definition: dl_comp.h:235
__STATIC_INLINE void DL_COMP_enableEvent(COMP_Regs *comp, uint32_t eventMask)
Enable COMP event.
Definition: dl_comp.h:1426
Definition: dl_comp.h:271
Definition: dl_comp.h:250
Definition: dl_comp.h:139
__STATIC_INLINE void DL_COMP_setOutputPolarity(COMP_Regs *comp, DL_COMP_POLARITY polarity)
Set the output polarity.
Definition: dl_comp.h:684
__STATIC_INLINE bool DL_COMP_isSampledModeEnabled(COMP_Regs *comp)
Checks if sampled mode is enabled.
Definition: dl_comp.h:1221
Configuration struct for DL_COMP_refVoltageInit.
Definition: dl_comp.h:335
Definition: dl_comp.h:277
__STATIC_INLINE void DL_COMP_disableEvent(COMP_Regs *comp, uint32_t eventMask)
Disable COMP event.
Definition: dl_comp.h:1439
DL_COMP_REF_TERMINAL_SELECT
Definition: dl_comp.h:255
Definition: dl_comp.h:295
Definition: dl_comp.h:301
__STATIC_INLINE uint32_t DL_COMP_getRawEventsStatus(COMP_Regs *comp, uint32_t eventMask)
Check interrupt flag of any COMP event.
Definition: dl_comp.h:1500
Definition: dl_comp.h:197
__STATIC_INLINE uint8_t DL_COMP_getPublisherChanID(COMP_Regs *comp)
Gets the event publisher channel ID.
Definition: dl_comp.h:1413
DL_COMP_DAC_INPUT inputSelect
Definition: dl_comp.h:346
Definition: dl_comp.h:242
DL_COMP_MODE mode
Definition: dl_comp.h:319
__STATIC_INLINE bool DL_COMP_isPowerEnabled(COMP_Regs *comp)
Returns if power is on for the comparator module.
Definition: dl_comp.h:379
__STATIC_INLINE uint32_t DL_COMP_getDACCode1(COMP_Regs *comp)
Get the code value of DACCODE1.
Definition: dl_comp.h:1181
__STATIC_INLINE void DL_COMP_setDACControl(COMP_Regs *comp, DL_COMP_DAC_CONTROL control)
Select the source for COMP control.
Definition: dl_comp.h:1050
__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:1015
__STATIC_INLINE DL_COMP_MODE DL_COMP_getCompMode(COMP_Regs *comp)
Get the mode the comparator is set to.
Definition: dl_comp.h:523
Definition: dl_comp.h:129
__STATIC_INLINE DL_COMP_HYSTERESIS DL_COMP_getHysteresis(COMP_Regs *comp)
Get the hysteresis voltage.
Definition: dl_comp.h:671
__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:985
__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:922
__STATIC_INLINE DL_COMP_REF_SOURCE DL_COMP_getReferenceSource(COMP_Regs *comp)
Get the reference source for the comparator.
Definition: dl_comp.h:965
__STATIC_INLINE void DL_COMP_enableShortInputTerminals(COMP_Regs *comp)
Enable shorting of the comparator inputs.
Definition: dl_comp.h:582
Definition: dl_comp.h:137
DL_COMP_MODE
Definition: dl_comp.h:127
DL_COMP_REF_SOURCE source
Definition: dl_comp.h:339
__STATIC_INLINE void DL_COMP_enable(COMP_Regs *comp)
Enable the comparator peripheral.
Definition: dl_comp.h:463
DL_COMP_HYSTERESIS
Definition: dl_comp.h:143
__STATIC_INLINE uint32_t DL_COMP_getEnabledInterrupts(COMP_Regs *comp, uint32_t interruptMask)
Check which COMP interrupts are enabled.
Definition: dl_comp.h:1311
Definition: dl_comp.h:203
Definition: dl_comp.h:145
__STATIC_INLINE void DL_COMP_refVoltageInit(COMP_Regs *comp, DL_COMP_RefVoltageConfig *config)
Initialize the comparator reference voltage generator.
Definition: dl_comp.h:446
DL_COMP_REF_SOURCE
Definition: dl_comp.h:239
__STATIC_INLINE void DL_COMP_setDACCode1(COMP_Regs *comp, uint32_t value)
Set the 8-bit COMP input code through DACCODE1.
Definition: dl_comp.h:1166
DL_COMP_OUTPUT_INT_EDGE
Definition: dl_comp.h:135
Definition: dl_comp.h:117
Definition: dl_comp.h:185
__STATIC_INLINE bool DL_COMP_isEnabled(COMP_Regs *comp)
Checks if the comparator peripheral is enabled.
Definition: dl_comp.h:479
__STATIC_INLINE uint32_t DL_COMP_getDACCode0(COMP_Regs *comp)
Get the code value of DACCODE0.
Definition: dl_comp.h:1142
__STATIC_INLINE void DL_COMP_disableInterrupt(COMP_Regs *comp, uint32_t interruptMask)
Disable COMP interrupts.
Definition: dl_comp.h:1293
__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:642
__STATIC_INLINE void DL_COMP_disableShortInputTerminals(COMP_Regs *comp)
Disable shorting the comparator inputs.
Definition: dl_comp.h:608
__STATIC_INLINE DL_COMP_OUTPUT DL_COMP_getComparatorOutput(COMP_Regs *comp)
Gets the comparator output.
Definition: dl_comp.h:1193
__STATIC_INLINE DL_COMP_POLARITY DL_COMP_getOutputPolarity(COMP_Regs *comp)
Get the output polarity.
Definition: dl_comp.h:700
__STATIC_INLINE void DL_COMP_setDACCode0(COMP_Regs *comp, uint32_t value)
Set the 8-bit COMP input code through DACCODE0.
Definition: dl_comp.h:1128
__STATIC_INLINE void DL_COMP_init(COMP_Regs *comp, DL_COMP_Config *config)
Initialize the COMP peripheral.
Definition: dl_comp.h:422
__STATIC_INLINE DL_COMP_DAC_CONTROL DL_COMP_getDACControl(COMP_Regs *comp)
Get what controls the input to the COMP.
Definition: dl_comp.h:1066
Definition: dl_comp.h:293
Definition: dl_comp.h:191
Definition: dl_comp.h:199
__STATIC_INLINE void DL_COMP_enableInterrupt(COMP_Regs *comp, uint32_t interruptMask)
Enable COMP interrupts.
Definition: dl_comp.h:1279
__STATIC_INLINE bool DL_COMP_isReset(COMP_Regs *comp)
Returns if comparator was reset.
Definition: dl_comp.h:406
Definition: dl_comp.h:165
Definition: dl_comp.h:245
Definition: dl_comp.h:177
__STATIC_INLINE bool DL_COMP_isExchangeInputsEnabled(COMP_Regs *comp)
Checks if the inputs are exchanged and if output is inverted.
Definition: dl_comp.h:556
__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:884
Definition: dl_comp.h:205
__STATIC_INLINE DL_COMP_IMSEL_CHANNEL DL_COMP_getNegativeChannelInput(COMP_Regs *comp)
Get the channel input for the negative terminal.
Definition: dl_comp.h:899
Definition: dl_comp.h:303
DL_COMP_SUBSCRIBER_INDEX
Definition: dl_comp.h:307
DL_COMP_IMSEL_CHANNEL negChannel
Definition: dl_comp.h:325
__STATIC_INLINE DL_COMP_DAC_INPUT DL_COMP_getDACInput(COMP_Regs *comp)
Get whether DACCODE0 or DACCODE1 is the input to the COMP.
Definition: dl_comp.h:1102
__STATIC_INLINE void DL_COMP_setPublisherChanID(COMP_Regs *comp, uint8_t chanID)
Sets the COMP event publisher channel ID.
Definition: dl_comp.h:1399
__STATIC_INLINE void DL_COMP_reset(COMP_Regs *comp)
Resets comparator peripheral.
Definition: dl_comp.h:390
__STATIC_INLINE void DL_COMP_enableWindowComparator(COMP_Regs *comp)
Enable the window comparator.
Definition: dl_comp.h:771
__STATIC_INLINE void DL_COMP_setDACInput(COMP_Regs *comp, DL_COMP_DAC_INPUT input)
Set whether DACCODE0 or DACCODE1 is the input to the COMP.
Definition: dl_comp.h:1084
__STATIC_INLINE void DL_COMP_enablePower(COMP_Regs *comp)
Enables power on the comparator module.
Definition: dl_comp.h:354
__STATIC_INLINE uint32_t DL_COMP_getEnabledInterruptStatus(COMP_Regs *comp, uint32_t interruptMask)
Check interrupt flag of enabled COMP interrupts.
Definition: dl_comp.h:1334
__STATIC_INLINE void DL_COMP_disable(COMP_Regs *comp)
Disable the comparator peripheral.
Definition: dl_comp.h:489
Definition: dl_comp.h:207
__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:1263
Definition: dl_comp.h:189
Definition: dl_comp.h:275
Definition: dl_comp.h:183
Definition: dl_comp.h:169
DL_COMP_POLARITY polarity
Definition: dl_comp.h:327
Definition: dl_comp.h:269
DL_COMP_FILTER_DELAY
Definition: dl_comp.h:163
__STATIC_INLINE void DL_COMP_enableSampledMode(COMP_Regs *comp)
Enable sampled mode of the comparator.
Definition: dl_comp.h:1205
DL_COMP_DAC_CONTROL
Definition: dl_comp.h:283
Definition: dl_comp.h:217
Definition: dl_comp.h:167
__STATIC_INLINE void DL_COMP_disableWindowComparator(COMP_Regs *comp)
Disable the window comparator.
Definition: dl_comp.h:796
__STATIC_INLINE void DL_COMP_disableOutputFilter(COMP_Regs *comp)
Disable output filter using on-chip analog filter.
Definition: dl_comp.h:744
DL_COMP_REF_MODE mode
Definition: dl_comp.h:337
Definition: dl_comp.h:201
__STATIC_INLINE void DL_COMP_clearInterruptStatus(COMP_Regs *comp, uint32_t interruptMask)
Clear pending COMP interrupts.
Definition: dl_comp.h:1385
Definition: dl_comp.h:220
__STATIC_INLINE void DL_COMP_setHysteresis(COMP_Regs *comp, DL_COMP_HYSTERESIS voltage)
Set the hysteresis voltage.
Definition: dl_comp.h:656
__STATIC_INLINE DL_COMP_FILTER_DELAY DL_COMP_getOutputFilterDelay(COMP_Regs *comp)
Get the output filter delay.
Definition: dl_comp.h:758
__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:627
DL_COMP_IIDX
Definition: dl_comp.h:113
Definition: dl_comp.h:181
__STATIC_INLINE uint32_t DL_COMP_getEnabledEvents(COMP_Regs *comp, uint32_t eventMask)
Check which COMP events are enabled.
Definition: dl_comp.h:1456
__STATIC_INLINE DL_COMP_ENABLE_CHANNEL DL_COMP_getEnabledInputChannels(COMP_Regs *comp)
Get the enabled input channels.
Definition: dl_comp.h:826
Definition: dl_comp.h:309
Definition: dl_comp.h:267
Definition: dl_comp.h:157
__STATIC_INLINE uint32_t DL_COMP_getEnabledEventStatus(COMP_Regs *comp, uint32_t eventMask)
Check event flag of enabled COMP event.
Definition: dl_comp.h:1479
DL_COMP_DAC_INPUT
Definition: dl_comp.h:291
__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:950
DL_COMP_IPSEL_CHANNEL posChannel
Definition: dl_comp.h:323
__STATIC_INLINE void DL_COMP_enableOutputFilter(COMP_Regs *comp, DL_COMP_FILTER_DELAY delay)
Enable output filter.
Definition: dl_comp.h:718
DL_COMP_IMSEL_CHANNEL
Definition: dl_comp.h:195
__STATIC_INLINE DL_COMP_BLANKING_SOURCE DL_COMP_getBlankingSource(COMP_Regs *comp)
Get the blanking source for the comparator.
Definition: dl_comp.h:1031
__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:848
DL_COMP_DAC_CONTROL controlSelect
Definition: dl_comp.h:343
Definition: dl_comp.h:248
__STATIC_INLINE uint32_t DL_COMP_getRawInterruptStatus(COMP_Regs *comp, uint32_t interruptMask)
Check interrupt flag of any COMP interrupt.
Definition: dl_comp.h:1355
__STATIC_INLINE bool DL_COMP_isOutputFilterEnabled(COMP_Regs *comp)
Checks if output filter is enabled.
Definition: dl_comp.h:734
DL_COMP_REF_MODE
Definition: dl_comp.h:229
Definition: dl_comp.h:232