27#ifndef HAL_COMP_LLD_H_
28#define HAL_COMP_LLD_H_
32#if HAL_USE_COMP || defined(__DOXYGEN__)
55#if !defined(KINETIS_COMP_USE_COMP1) || defined(__DOXYGEN__)
56#define KINETIS_COMP_USE_COMP1 FALSE
64#if !defined(KINETIS_COMP_USE_COMP2) || defined(__DOXYGEN__)
65#define KINETIS_COMP_USE_COMP2 FALSE
73#if !defined(KINETIS_COMP_USE_COMP3) || defined(__DOXYGEN__)
74#define KINETIS_COMP_USE_COMP3 FALSE
82#if !defined(KINETIS_COMP_USE_COMP4) || defined(__DOXYGEN__)
83#define KINETIS_COMP_USE_COMP4 FALSE
91#if !defined(KINETIS_COMP_USE_COMP5) || defined(__DOXYGEN__)
92#define KINETIS_COMP_USE_COMP5 FALSE
100#if !defined(KINETIS_COMP_USE_COMP6) || defined(__DOXYGEN__)
101#define KINETIS_COMP_USE_COMP6 FALSE
109#if !defined(KINETIS_COMP_USE_COMP7) || defined(__DOXYGEN__)
110#define KINETIS_COMP_USE_COMP7 FALSE
119#if KINETIS_COMP_USE_COMP0 && !KINETIS_HAS_COMP0
120#error "COMP1 not present in the selected device"
123#if KINETIS_COMP_USE_COMP1 && !KINETIS_HAS_COMP1
124#error "COMP2 not present in the selected device"
127#if KINETIS_COMP_USE_COMP2 && !KINETIS_HAS_COMP2
128#error "COMP3 not present in the selected device"
131#if !KINETIS_COMP_USE_COMP0 && !KINETIS_COMP_USE_COMP1 && !KINETIS_COMP_USE_COMP2
132#error "COMP driver activated but no COMP peripheral assigned"
197#if defined(COMP_DRIVER_EXT_FIELDS)
198 COMP_DRIVER_EXT_FIELDS
234#if KINETIS_COMP_USE_COMP0 && !defined(__DOXYGEN__)
238#if KINETIS_COMP_USE_COMP1 && !defined(__DOXYGEN__)
242#if KINETIS_COMP_USE_COMP2 && !defined(__DOXYGEN__)
void comp_lld_channel_disable(COMPDriver *compp, uint32_t channel)
Deactivate an EXT channel (used by comp)
comp_output_mode_t
COMP output mode.
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.
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)
comp_irq_mode_t
COMP interrupt mode.
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.
@ kACMP_OutputFallingEventFlag
@ kACMP_OutputRisingEventFlag
Configuration for channel.
Driver configuration structure.
compcallback_t cb
Callback.
comp_irq_mode_t irq_mode
Ouput mode.
uint32_t csr
COMP CSR register initialization data.
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.
compstate_t state
Driver state.
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.