File syn_comp.c¶
FileList > drivers > syn_comp.c
Go to the source code of this file
High-Speed Rail-to-Rail Analog Comparator Driver implementation.
#include "../util/syn_assert.h"#include "syn_comp.h"
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_comp_enable (SYN_COMP * comp, bool enable) Enable or disable the analog comparator. |
| SYN_Status | syn_comp_init (SYN_COMP * comp, uint8_t comp_id, SYN_COMP_InvertingInput inv_in) Initialize an Analog Comparator instance. |
| bool | syn_comp_read (const SYN_COMP * comp) Read real-time logical output state of the comparator. |
Public Functions Documentation¶
function syn_comp_enable¶
Enable or disable the analog comparator.
Parameters:
compInitialized comparator handle.enabletrue to enable, false to disable.
Returns:
SYN_OK on success.
function syn_comp_init¶
Initialize an Analog Comparator instance.
Parameters:
compHandle to initialize. Must not be NULL.comp_idComparator hardware index (0 = COMP1, 1 = COMP2).inv_inReference threshold input source.
Returns:
SYN_OK on success, SYN_INVALID_PARAM on invalid argument.
function syn_comp_read¶
Read real-time logical output state of the comparator.
Parameters:
compInitialized comparator handle.
Returns:
true if non-inverting input voltage > inverting reference voltage.
The documentation for this class was generated from the following file src/syntropic/drivers/syn_comp.c