Hi. I have a ADC device which have 16 input channel. Before I start AD transfer, I must choose the range of the input channel, such as 0 to 3. I provide two argument 'start_channel', 'end_channel' to select the channels. and the value of the 'end_channel' should always larger than the value of the 'start_channel'. now I have a problem, if some users set the two argument which the value of the 'start_channel' is larger than the value of the 'end_channel' .Then how can I solve this problem?I have two choices like this:
1)set the value of 'start_channel' equal to 'end_channel' , let the whole system still can work.
2)return some information, halt the whole system.
I don't know which way is better.Please give some advices. Or, If you have more better solution, please tell me.