ADC analog watchdog API definitions.
More...
ADC analog watchdog API definitions.
The analog watchdog allows the monitoring of an analog signal between two threshold levels. The thresholds must be preset. Analog watchdog is disabled by default.
- Warning
- Comparison is done before data alignment takes place, so the thresholds are left-aligned.
Example 1: Enable watchdog checking on all channels
}
void adc_clear_watchdog_flag(uint32_t adc)
ADC Clear Analog Watchdog Flag.
bool adc_get_watchdog_flag(uint32_t adc)
ADC Read the Analog Watchdog Flag.
void adc_set_watchdog_high_threshold(uint32_t adc, uint16_t threshold)
ADC Set Analog Watchdog Upper Threshold.
void adc_enable_analog_watchdog_on_all_channels(uint32_t adc)
ADC Enable Analog Watchdog for All Channels.
void adc_set_watchdog_low_threshold(uint32_t adc, uint16_t threshold)
ADC Set Analog Watchdog Lower Threshold.
Example 2: Enable watchdog checking on channel 5
}
void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_t chan)
ADC Enable Analog Watchdog for a Selected Channel.
◆ adc_disable_analog_watchdog()
void adc_disable_analog_watchdog |
( |
uint32_t |
adc | ) |
|
ADC Disable Analog Watchdog.
- Parameters
-
Definition at line 507 of file adc.c.
References ADC_CFGR1.
◆ adc_enable_analog_watchdog_on_all_channels()
void adc_enable_analog_watchdog_on_all_channels |
( |
uint32_t |
adc | ) |
|
◆ adc_enable_analog_watchdog_on_selected_channel()
void adc_enable_analog_watchdog_on_selected_channel |
( |
uint32_t |
adc, |
|
|
uint8_t |
chan |
|
) |
| |
◆ adc_set_watchdog_high_threshold()
void adc_set_watchdog_high_threshold |
( |
uint32_t |
adc, |
|
|
uint16_t |
threshold |
|
) |
| |
◆ adc_set_watchdog_low_threshold()
void adc_set_watchdog_low_threshold |
( |
uint32_t |
adc, |
|
|
uint16_t |
threshold |
|
) |
| |