Disable automatic pulldown on Teensy 4.1 analog pins

This commit is contained in:
Josh Stewart 2024-04-01 15:57:35 +11:00
parent 170c3a8a31
commit 9474f659b0
1 changed files with 10 additions and 0 deletions

View File

@ -3041,6 +3041,16 @@ void setPinMapping(byte boardID)
pinMode(pinBat, INPUT);
pinMode(pinBaro, INPUT);
#endif
#elif defined(CORE_TEENSY41)
//Teensy 4.1 has a weak pull down resistor that needs to be disabled for all analog pins.
pinMode(pinMAP, INPUT_DISABLE);
pinMode(pinO2, INPUT_DISABLE);
pinMode(pinO2_2, INPUT_DISABLE);
pinMode(pinTPS, INPUT_DISABLE);
pinMode(pinIAT, INPUT_DISABLE);
pinMode(pinCLT, INPUT_DISABLE);
pinMode(pinBat, INPUT_DISABLE);
pinMode(pinBaro, INPUT_DISABLE);
#endif
//Each of the below are only set when their relevant function is enabled. This can help prevent pin conflicts that users aren't aware of with unused functions