The DlnAdcChannelSetCfg() function changes the configuration of a single GPIO pin and set the conditions of DLN_ADC_CONDITION_MET_EV event generation. This function is defined in the dln_adc.h file.
DlnAdcChannelSetCfg()
dln_adc.h
DLN_RESULT DlnAdcChannelSetCfg( HDLN handle, uint8_t port, uint8_t channel, uint8_t eventType, uint16_t eventPeriod, uint16_t thresholdLow, uint16_t thresholdHigh );
A handle to the DLN-series adapter.
A number of the ADC port to be configured.
A number of the ADC channel to be configured.
Must contain the event generation condition for the ADC channel. The following values are available:
0 or DLN_ADC_EVENT_NONE
No events are generated for the current channel.
1 or DLN_ADC_EVENT_BELOW
Events are generated when voltage level on the ADC channel crosses the lower threshold.
2 or DLN_ADC_EVENT_LEVEL_ABOVE
Events are generated when voltage level on the ADC channel crosses the higher threshold.
3 or DLN_ADC_EVENT_OUTSIDE
Events are generated when voltage level on the ADC channel falls outside of the specified range between thresholds.
4 or DLN_ADC_EVENT_INSIDE
Events are generated when voltage level on the ADC channel falls within the specified range between thresholds.
5 or DLN_ADC_EVENT_ALWAYS
Events are sent periodically with predefined repeat interval. The non-zero interval must be specified for this event type.
Must contain the repeat interval for DLN_ADC_CONDITION_MET_EV event generation on the pin. The repeat interval is set in ms (1 to 65,535ms). If the repeat interval is set to 0, the DLN-series adapter will send a single event when the level on the line changes to meet the specified conditions.
The lower threshold value, specified in bits.
The higher threshold value specified in bits.
Function was successfully executed.