Allow to use up to 6xADC channels (now hardcoded), disabling the user button
(PA3) if ADC6 is enabled
This commit is contained in:
parent
fb31d8d641
commit
a81b4007b0
7 changed files with 210 additions and 54 deletions
|
@ -175,7 +175,7 @@ configure(int type, int value)
|
|||
return ADC_WRAPPER_ERROR;
|
||||
}
|
||||
|
||||
if((value < 0x01) || (value > 0x07) || (value == BUTTON_USER_PIN)) {
|
||||
if((value < 0x01) || (value > 0x07) || ((value == BUTTON_USER_PIN) && (ADC_SENSORS_ADC6_PIN < 0))) {
|
||||
PRINTF("ADC sensors: invalid pin value, (PA0-PA1, PA3) are reserved\n");
|
||||
return ADC_WRAPPER_ERROR;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue