dey-examples: adc_cmp_sample: Add support for CC8M

https://jira.digi.com/browse/DEL-6931

Signed-off-by: Hector Bujanda <hector.bujanda@digi.com>
This commit is contained in:
Hector Bujanda 2020-01-16 17:36:37 +01:00
parent 759fc05e09
commit c18a39ab55
1 changed files with 10 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/*
* ConnectCore 6UL Analog Comparator sample application.
* ConnectCore Analog Comparator sample application.
*
* Copyright (c) 2017 Digi International Inc.
* Copyright (c) 2017-2020 Digi International Inc.
* All rights reserved.
*
* Based on iio_event_monitor.c from the tools/iio directory, of the linux
@ -32,7 +32,7 @@
"Usage:\n" \
"adc_cmp_sample -c channel [options]\n\n" \
"Options:\n" \
" -t : ADC_type ('MCA-CC6UL', 'MCA-CC8X')\n" \
" -t : ADC_type ('MCA-CC6UL', 'MCA-CC8X', 'MCA-CC8M')\n" \
" -c : channel number to read from\n" \
" -h : Threshold_high higher limit of the comparator window\n" \
" -l : Threshold_low lower limit of the comparator window\n" \
@ -44,6 +44,7 @@ enum adc_type {
ADC_TYPE_UNKNOWN,
ADC_TYPE_MCA_CC6UL,
ADC_TYPE_MCA_CC8X,
ADC_TYPE_MCA_CC8M,
};
struct adc_data {
@ -66,6 +67,12 @@ struct adc_data adc_list[] = {
.dev_name = "mca-cc8x-adc",
.nbits = 12,
},
{
.type = ADC_TYPE_MCA_CC8M,
.name = "MCA-CC8M",
.dev_name = "mca-cc8m-adc",
.nbits = 12,
},
};
typedef struct cmp {