File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,10 @@ enum {
5050// Arduino analog pins
5151// Analog pins must be contiguous to be able to loop on each value
5252#define MAX_ANALOG_INPUTS 20
53- _Static_assert (NUM_ANALOG_INPUTS <= MAX_ANALOG_INPUTS , "Core NUM_ANALOG_INPUTS limited to MAX_ANALOG_INPUTS" );
53+ _Static_assert (NUM_ANALOG_INPUTS <= MAX_ANALOG_INPUTS ,
54+ "Core NUM_ANALOG_INPUTS limited to MAX_ANALOG_INPUTS" );
55+ _Static_assert (NUM_ANALOG_FIRST >= NUM_ANALOG_INPUTS ,
56+ "First analog pin value (A0) must be greater than or equal to NUM_ANALOG_INPUTS" );
5457
5558// Defined for backward compatibility with Firmata which unfortunately use it
5659#define AEND (NUM_ANALOG_FIRST+NUM_ANALOG_INPUTS)
Original file line number Diff line number Diff line change 7575// !!!
7676#define NUM_ANALOG_INPUTS 0
7777// Define digital pin number of the first analog input (i.e. which digital pin is A0)
78+ // First analog pin value (A0) must be greater than or equal to NUM_ANALOG_INPUTS
7879#define NUM_ANALOG_FIRST 0
7980
8081// Below ADC, DAC and PWM definitions already done in the core
You can’t perform that action at this time.
0 commit comments