Cleanup narrowing warning in pin_is_protected

This commit is contained in:
Thomas Moore
2017-11-24 22:15:56 -06:00
parent 34eaaab5fb
commit 5f9592a523
3 changed files with 10 additions and 13 deletions

View File

@@ -27,8 +27,8 @@
#include "../../gcode/parser.h"
// Get the digital pin for an analog index
pin_t analogInputToDigitalPin(const uint8_t p) {
return (p < COUNT(adc_pin_table) ? adc_pin_table[p] : P_NC);
pin_t analogInputToDigitalPin(const int8_t p) {
return (WITHIN(p, 0, NUM_ANALOG_INPUTS) ? adc_pin_table[p] : P_NC);
}
// Return the index of a pin number