1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 04:41:24 +01:00

STM32 ADCee fix

This commit is contained in:
pmantoine 2023-04-08 14:15:38 +08:00
parent 0d82370380
commit 7589917638

View File

@ -237,7 +237,7 @@ int16_t ADCee::ADCmax() {
}
int ADCee::init(uint8_t pin) {
uint id = pin - A0;
uint8_t id = pin - A0;
int value = 0;
PinName stmpin = digitalPin[analogInputPin[id]];
uint32_t stmgpio = stmpin / 16; // 16-bits per GPIO port group on STM32