30#if HAL_USE_COMP || defined(__DOXYGEN__)
46#if KINETIS_COMP_USE_COMP0 || defined(__DOXYGEN__)
54#if KINETIS_COMP_USE_COMP1 || defined(__DOXYGEN__)
62#if KINETIS_COMP_USE_COMP2 || defined(__DOXYGEN__)
90#if KINETIS_COMP_USE_COMP0
94 nvicEnableVector(CMP0_IRQn, KINETIS_COMP_IRQ_PRIORITY);
97#if KINETIS_COMP_USE_COMP1
101 nvicEnableVector(CMP1_IRQn, KINETIS_COMP_IRQ_PRIORITY);
104#if KINETIS_COMP_USE_COMP2
108 nvicEnableVector(CMP2_IRQn, KINETIS_COMP_IRQ_PRIORITY);
118#if defined __CORTEX_M && (__CORTEX_M == 4U)
128#if KINETIS_COMP_USE_COMP0 || defined(__DOXYGEN__)
136#if KINETIS_COMP_USE_COMP1 || defined(__DOXYGEN__)
144#if KINETIS_COMP_USE_COMP2 || defined(__DOXYGEN__)
161 osalDbgAssert(
channel <= 7,
"invalid channel number");
void comp_lld_channel_disable(COMPDriver *compp, uint32_t channel)
Deactivate an EXT channel (used by comp)
OSAL_IRQ_HANDLER(KINETIS_COMP0_IRQ_VECTOR)
COMP1, COMP2, COMP3 interrupt handler.
COMPDriver COMPD1
COMPD1 driver identifier.
void comp_lld_set_dac_value(COMPDriver *compp, uint32_t value)
Set the DAC value used by comp.
void comp_lld_enable(COMPDriver *compp)
Enables the output.
void comp_lld_init(void)
Low level COMP driver initialization.
static void comp_lld_irq_handler(COMPDriver *compp)
void comp_lld_stop(COMPDriver *compp)
Deactivates the comp peripheral.
void comp_lld_channel_enable(COMPDriver *compp, uint32_t channel)
Configures and activates an EXT channel (used by comp)
uint32_t comp_lld_get_status(COMPDriver *compp)
COMPDriver COMPD2
COMPD2 driver identifier.
void comp_lld_start(COMPDriver *compp)
Configures and activates the COMP peripheral.
void comp_lld_disable(COMPDriver *compp)
Disables the output.
COMPDriver COMPD3
COMPD3 driver identifier.
void ACMP_SetFilterConfig(CMP_Type *base, const acmp_filter_config_t *config)
Configures the filter.
acmp_hysteresis_mode_t hysteresisMode
void ACMP_Enable(CMP_Type *base, bool enable)
Enables or disables the ACMP.
uint32_t ACMP_GetStatusFlags(CMP_Type *base)
Gets status flags.
void ACMP_SetChannelConfig(CMP_Type *base, const acmp_channel_config_t *config)
Sets the channel configuration.
acmp_port_input_t positivePortInput
void ACMP_Init(CMP_Type *base, const acmp_config_t *config)
Initializes the ACMP.
void ACMP_DisableInterrupts(CMP_Type *base, uint32_t mask)
Disables interrupts.
void ACMP_Deinit(CMP_Type *base)
Deinitializes the ACMP.
acmp_port_input_t negativePortInput
void ACMP_SetDACConfig(CMP_Type *base, const acmp_dac_config_t *config)
Configures the internal DAC.
void ACMP_EnableInterrupts(CMP_Type *base, uint32_t mask)
Enables interrupts.
acmp_reference_voltage_source_t referenceVoltageSource
void ACMP_ClearStatusFlags(CMP_Type *base, uint32_t mask)
Clears status flags.
void ACMP_GetDefaultConfig(acmp_config_t *config)
Gets the default configuration for ACMP.
@ kACMP_OutputFallingInterruptEnable
@ kACMP_OutputRisingInterruptEnable
Configuration for filter.
compcallback_t cb
Callback.
comp_irq_mode_t irq_mode
Ouput mode.
comp_output_mode_t output_mode
Ouput mode.
Structure representing an COMP driver.
COMP_DRIVER_EXT_FIELDS COMP_TypeDef * reg
Pointer to the COMPx registers block.
acmp_channel_config_t acmpChannelCfg
ACMP driver channel config.
acmp_config_t acmpCfg
ACMP driver config.
acmp_dac_config_t acmpDacCfg
ACMP driver DAC config.
const COMPConfig * config
Current configuration data.