2017-07-25 17:53:14 +00:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
2020-02-03 14:00:57 +00:00
|
|
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
2017-07-25 17:53:14 +00:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-07-09 04:42:29 +00:00
|
|
|
#include "../inc/MarlinConfig.h"
|
|
|
|
|
2017-10-29 00:44:54 +00:00
|
|
|
#define MAX_NAME_LENGTH 39 // one place to specify the format of all the sources of names
|
|
|
|
// "-" left justify, "39" minimum width of name, pad with blanks
|
2017-07-25 17:53:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This routine minimizes RAM usage by creating a FLASH resident array to
|
|
|
|
* store the pin names, pin numbers and analog/digital flag.
|
|
|
|
*
|
|
|
|
* Creating the array in FLASH is a two pass process. The first pass puts the
|
|
|
|
* name strings into FLASH. The second pass actually creates the array.
|
|
|
|
*
|
|
|
|
* Both passes use the same pin list. The list contains two macro names. The
|
|
|
|
* actual macro definitions are changed depending on which pass is being done.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
// first pass - put the name strings into FLASH
|
|
|
|
|
|
|
|
#define _ADD_PIN_2(PIN_NAME, ENTRY_NAME) static const char ENTRY_NAME[] PROGMEM = { PIN_NAME };
|
|
|
|
#define _ADD_PIN(PIN_NAME, COUNTER) _ADD_PIN_2(PIN_NAME, entry_NAME_##COUNTER)
|
2018-02-18 08:25:32 +00:00
|
|
|
#define REPORT_NAME_DIGITAL(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER)
|
|
|
|
#define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER)
|
2017-07-25 17:53:14 +00:00
|
|
|
|
2017-07-31 06:31:14 +00:00
|
|
|
#include "pinsDebug_list.h"
|
2019-07-09 04:42:29 +00:00
|
|
|
#line 46
|
2017-07-31 06:31:14 +00:00
|
|
|
|
|
|
|
// manually add pins that have names that are macros which don't play well with these macros
|
2020-02-26 10:12:53 +00:00
|
|
|
#if (AVR_ATmega2560_FAMILY || AVR_ATmega1284_FAMILY || defined(ARDUINO_ARCH_SAM) || defined(TARGET_LPC1768))
|
2020-01-03 23:40:56 +00:00
|
|
|
#if SERIAL_PORT == 0
|
|
|
|
static const char RXD_NAME_0[] PROGMEM = { "RXD0" };
|
|
|
|
static const char TXD_NAME_0[] PROGMEM = { "TXD0" };
|
|
|
|
#elif SERIAL_PORT == 1
|
|
|
|
static const char RXD_NAME_1[] PROGMEM = { "RXD1" };
|
|
|
|
static const char TXD_NAME_1[] PROGMEM = { "TXD1" };
|
|
|
|
#elif SERIAL_PORT == 2
|
|
|
|
static const char RXD_NAME_2[] PROGMEM = { "RXD2" };
|
|
|
|
static const char TXD_NAME_2[] PROGMEM = { "TXD2" };
|
2020-01-13 22:56:51 +00:00
|
|
|
#elif SERIAL_PORT == 3
|
2020-01-03 23:40:56 +00:00
|
|
|
static const char RXD_NAME_3[] PROGMEM = { "RXD3" };
|
|
|
|
static const char TXD_NAME_3[] PROGMEM = { "TXD3" };
|
|
|
|
#endif
|
|
|
|
#ifdef SERIAL_PORT_2
|
|
|
|
#if SERIAL_PORT_2 == 0
|
|
|
|
static const char RXD_NAME_0[] PROGMEM = { "RXD0" };
|
|
|
|
static const char TXD_NAME_0[] PROGMEM = { "TXD0" };
|
|
|
|
#elif SERIAL_PORT_2 == 1
|
|
|
|
static const char RXD_NAME_1[] PROGMEM = { "RXD1" };
|
|
|
|
static const char TXD_NAME_1[] PROGMEM = { "TXD1" };
|
|
|
|
#elif SERIAL_PORT_2 == 2
|
|
|
|
static const char RXD_NAME_2[] PROGMEM = { "RXD2" };
|
|
|
|
static const char TXD_NAME_2[] PROGMEM = { "TXD2" };
|
|
|
|
#elif SERIAL_PORT_2 == 3
|
|
|
|
static const char RXD_NAME_3[] PROGMEM = { "RXD3" };
|
|
|
|
static const char TXD_NAME_3[] PROGMEM = { "TXD3" };
|
|
|
|
#endif
|
|
|
|
#endif
|
2017-07-31 06:31:14 +00:00
|
|
|
#endif
|
2017-07-25 17:53:14 +00:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// second pass - create the array
|
|
|
|
|
|
|
|
#undef _ADD_PIN_2
|
|
|
|
#undef _ADD_PIN
|
|
|
|
#undef REPORT_NAME_DIGITAL
|
|
|
|
#undef REPORT_NAME_ANALOG
|
|
|
|
|
|
|
|
#define _ADD_PIN_2(ENTRY_NAME, NAME, IS_DIGITAL) { ENTRY_NAME, NAME, IS_DIGITAL },
|
|
|
|
#define _ADD_PIN(NAME, COUNTER, IS_DIGITAL) _ADD_PIN_2(entry_NAME_##COUNTER, NAME, IS_DIGITAL)
|
2018-02-18 08:25:32 +00:00
|
|
|
#define REPORT_NAME_DIGITAL(COUNTER, NAME) _ADD_PIN(NAME, COUNTER, true)
|
|
|
|
#define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(analogInputToDigitalPin(NAME), COUNTER, false)
|
2017-07-25 17:53:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2018-10-01 04:44:33 +00:00
|
|
|
PGM_P const name;
|
2017-10-26 18:37:26 +00:00
|
|
|
pin_t pin;
|
2017-07-25 17:53:14 +00:00
|
|
|
bool is_digital;
|
|
|
|
} PinInfo;
|
|
|
|
|
|
|
|
const PinInfo pin_array[] PROGMEM = {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* [pin name] [pin number] [is digital or analog] 1 = digital, 0 = analog
|
|
|
|
* Each entry takes up 6 bytes in FLASH:
|
|
|
|
* 2 byte pointer to location of the name string
|
|
|
|
* 2 bytes containing the pin number
|
|
|
|
* analog pin numbers were convereted to digital when the array was created
|
|
|
|
* 2 bytes containing the digital/analog bool flag
|
|
|
|
*/
|
|
|
|
|
|
|
|
// manually add pins ...
|
|
|
|
#if SERIAL_PORT == 0
|
2018-01-01 22:11:56 +00:00
|
|
|
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
|
2020-01-03 23:40:56 +00:00
|
|
|
{ RXD_NAME_0, 0, true },
|
|
|
|
{ TXD_NAME_0, 1, true },
|
|
|
|
#elif AVR_ATmega1284_FAMILY
|
|
|
|
{ RXD_NAME_0, 8, true },
|
|
|
|
{ TXD_NAME_0, 9, true },
|
2020-02-26 10:12:53 +00:00
|
|
|
#elif defined(TARGET_LPC1768)
|
|
|
|
{ RXD_NAME_0, 3, true },
|
|
|
|
{ TXD_NAME_0, 2, true },
|
2020-01-03 23:40:56 +00:00
|
|
|
#endif
|
|
|
|
#elif SERIAL_PORT == 1
|
|
|
|
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
|
|
|
|
{ RXD_NAME_1, 19, true },
|
|
|
|
{ TXD_NAME_1, 18, true },
|
2017-07-31 06:31:14 +00:00
|
|
|
#elif AVR_ATmega1284_FAMILY
|
2020-01-03 23:40:56 +00:00
|
|
|
{ RXD_NAME_1, 10, true },
|
|
|
|
{ TXD_NAME_1, 11, true },
|
2020-02-26 10:12:53 +00:00
|
|
|
#elif defined(TARGET_LPC1768)
|
|
|
|
{ RXD_NAME_1, 16, true },
|
|
|
|
{ TXD_NAME_1, 15, true },
|
2020-01-03 23:40:56 +00:00
|
|
|
#endif
|
|
|
|
#elif SERIAL_PORT == 2
|
|
|
|
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
|
|
|
|
{ RXD_NAME_2, 17, true },
|
|
|
|
{ TXD_NAME_2, 16, true },
|
2020-02-26 10:12:53 +00:00
|
|
|
#elif defined(TARGET_LPC1768)
|
|
|
|
{ RXD_NAME_2, 11, true },
|
|
|
|
{ TXD_NAME_2, 10, true },
|
2020-01-03 23:40:56 +00:00
|
|
|
#endif
|
|
|
|
#elif SERIAL_PORT == 3
|
|
|
|
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
|
|
|
|
{ RXD_NAME_3, 15, true },
|
|
|
|
{ TXD_NAME_3, 14, true },
|
2020-02-26 10:12:53 +00:00
|
|
|
#elif defined(TARGET_LPC1768)
|
|
|
|
{ RXD_NAME_3, 1, true },
|
|
|
|
{ TXD_NAME_3, 0, true },
|
2020-01-03 23:40:56 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2020-01-26 09:05:34 +00:00
|
|
|
#ifdef SERIAL_PORT_2
|
|
|
|
#if SERIAL_PORT_2 == 0
|
|
|
|
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
|
|
|
|
{ RXD_NAME_0, 0, true },
|
|
|
|
{ TXD_NAME_0, 1, true },
|
|
|
|
#elif AVR_ATmega1284_FAMILY
|
|
|
|
{ RXD_NAME_0, 8, true },
|
|
|
|
{ TXD_NAME_0, 9, true },
|
2020-02-26 10:12:53 +00:00
|
|
|
#elif defined(TARGET_LPC1768)
|
|
|
|
{ RXD_NAME_0, 3, true },
|
|
|
|
{ TXD_NAME_0, 2, true },
|
2020-01-26 09:05:34 +00:00
|
|
|
#endif
|
|
|
|
#elif SERIAL_PORT_2 == 1
|
|
|
|
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
|
|
|
|
{ RXD_NAME_1, 19, true },
|
|
|
|
{ TXD_NAME_1, 18, true },
|
|
|
|
#elif AVR_ATmega1284_FAMILY
|
|
|
|
{ RXD_NAME_1, 10, true },
|
|
|
|
{ TXD_NAME_1, 11, true },
|
2020-02-26 10:12:53 +00:00
|
|
|
#elif defined(TARGET_LPC1768)
|
|
|
|
{ RXD_NAME_1, 16, true },
|
|
|
|
{ TXD_NAME_1, 15, true },
|
2020-01-26 09:05:34 +00:00
|
|
|
#endif
|
|
|
|
#elif SERIAL_PORT_2 == 2
|
|
|
|
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
|
|
|
|
{ RXD_NAME_2, 17, true },
|
|
|
|
{ TXD_NAME_2, 16, true },
|
2020-02-26 10:12:53 +00:00
|
|
|
#elif defined(TARGET_LPC1768)
|
|
|
|
{ RXD_NAME_2, 11, true },
|
|
|
|
{ TXD_NAME_2, 10, true },
|
2020-01-26 09:05:34 +00:00
|
|
|
#endif
|
|
|
|
#elif SERIAL_PORT_2 == 3
|
|
|
|
#if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
|
|
|
|
{ RXD_NAME_3, 15, true },
|
|
|
|
{ TXD_NAME_3, 14, true },
|
2020-02-26 10:12:53 +00:00
|
|
|
#elif defined(TARGET_LPC1768)
|
|
|
|
{ RXD_NAME_3, 1, true },
|
|
|
|
{ TXD_NAME_3, 0, true },
|
2020-01-26 09:05:34 +00:00
|
|
|
#endif
|
2017-07-31 06:31:14 +00:00
|
|
|
#endif
|
2017-07-25 17:53:14 +00:00
|
|
|
#endif
|
|
|
|
|
2017-07-31 06:31:14 +00:00
|
|
|
#include "pinsDebug_list.h"
|
2020-02-04 07:24:11 +00:00
|
|
|
#line 172
|
2017-07-25 17:53:14 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2018-04-13 01:25:08 +00:00
|
|
|
#include HAL_PATH(../HAL, pinsDebug.h) // get the correct support file for this CPU
|
2017-07-25 17:53:14 +00:00
|
|
|
|
2019-04-06 23:06:07 +00:00
|
|
|
#ifndef M43_NEVER_TOUCH
|
|
|
|
#define M43_NEVER_TOUCH(Q) false
|
|
|
|
#endif
|
2017-07-25 17:53:14 +00:00
|
|
|
|
|
|
|
static void print_input_or_output(const bool isout) {
|
|
|
|
serialprintPGM(isout ? PSTR("Output = ") : PSTR("Input = "));
|
|
|
|
}
|
|
|
|
|
|
|
|
// pretty report with PWM info
|
2017-10-26 18:37:26 +00:00
|
|
|
inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = false, const char *start_string = "") {
|
2017-10-29 00:44:54 +00:00
|
|
|
char buffer[MAX_NAME_LENGTH + 1]; // for the sprintf statements
|
2017-07-25 17:53:14 +00:00
|
|
|
bool found = false, multi_name_pin = false;
|
2017-07-31 06:31:14 +00:00
|
|
|
|
2017-07-25 17:53:14 +00:00
|
|
|
for (uint8_t x = 0; x < COUNT(pin_array); x++) { // scan entire array and report all instances of this pin
|
|
|
|
if (GET_ARRAY_PIN(x) == pin) {
|
|
|
|
if (found) multi_name_pin = true;
|
|
|
|
found = true;
|
2019-07-22 02:44:03 +00:00
|
|
|
if (!multi_name_pin) { // report digital and analog pin number only on the first time through
|
2017-10-26 18:37:26 +00:00
|
|
|
sprintf_P(buffer, PSTR("%sPIN: "), start_string); // digital pin number
|
2017-07-25 17:53:14 +00:00
|
|
|
SERIAL_ECHO(buffer);
|
2017-10-26 18:37:26 +00:00
|
|
|
PRINT_PIN(pin);
|
2017-07-25 17:53:14 +00:00
|
|
|
PRINT_PORT(pin);
|
2019-07-06 03:08:06 +00:00
|
|
|
if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) {
|
2017-07-25 17:53:14 +00:00
|
|
|
sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); // analog pin number
|
|
|
|
SERIAL_ECHO(buffer);
|
|
|
|
}
|
|
|
|
else SERIAL_ECHO_SP(8); // add padding if not an analog pin
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
SERIAL_CHAR('.');
|
2018-01-01 22:11:56 +00:00
|
|
|
SERIAL_ECHO_SP(MULTI_NAME_PAD + strlen(start_string)); // add padding if not the first instance found
|
2017-07-25 17:53:14 +00:00
|
|
|
}
|
|
|
|
PRINT_ARRAY_NAME(x);
|
|
|
|
if (extended) {
|
|
|
|
if (pin_is_protected(pin) && !ignore)
|
|
|
|
SERIAL_ECHOPGM("protected ");
|
|
|
|
else {
|
2017-07-31 06:31:14 +00:00
|
|
|
#if AVR_AT90USB1286_FAMILY //Teensy IDEs don't know about these pins so must use FASTIO
|
|
|
|
if (pin == 46 || pin == 47) {
|
|
|
|
if (pin == 46) {
|
2019-03-29 17:21:14 +00:00
|
|
|
print_input_or_output(IS_OUTPUT(46));
|
2018-12-09 08:32:25 +00:00
|
|
|
SERIAL_CHAR('0' + READ(46));
|
2017-07-31 06:31:14 +00:00
|
|
|
}
|
|
|
|
else if (pin == 47) {
|
2019-03-29 17:21:14 +00:00
|
|
|
print_input_or_output(IS_OUTPUT(47));
|
2018-12-09 08:32:25 +00:00
|
|
|
SERIAL_CHAR('0' + READ(47));
|
2017-07-31 06:31:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
#endif
|
|
|
|
{
|
2018-03-01 10:51:36 +00:00
|
|
|
if (!GET_ARRAY_IS_DIGITAL(x)) {
|
2018-11-04 21:25:26 +00:00
|
|
|
sprintf_P(buffer, PSTR("Analog in = %5ld"), (long)analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
|
2017-07-31 06:31:14 +00:00
|
|
|
SERIAL_ECHO(buffer);
|
2017-07-25 17:53:14 +00:00
|
|
|
}
|
2017-07-31 06:31:14 +00:00
|
|
|
else {
|
|
|
|
if (!GET_PINMODE(pin)) {
|
|
|
|
//pinMode(pin, INPUT_PULLUP); // make sure input isn't floating - stopped doing this
|
|
|
|
// because this could interfere with inductive/capacitive
|
2019-08-04 01:57:56 +00:00
|
|
|
// sensors (high impedance voltage divider) and with Pt100 amplifier
|
2017-07-31 06:31:14 +00:00
|
|
|
print_input_or_output(false);
|
2018-11-29 22:58:58 +00:00
|
|
|
SERIAL_ECHO(digitalRead_mod(pin));
|
2017-07-31 06:31:14 +00:00
|
|
|
}
|
2017-07-25 17:53:14 +00:00
|
|
|
else if (pwm_status(pin)) {
|
|
|
|
// do nothing
|
|
|
|
}
|
2017-07-31 06:31:14 +00:00
|
|
|
else {
|
|
|
|
print_input_or_output(true);
|
2018-11-29 22:58:58 +00:00
|
|
|
SERIAL_ECHO(digitalRead_mod(pin));
|
2017-07-31 06:31:14 +00:00
|
|
|
}
|
2017-07-25 17:53:14 +00:00
|
|
|
}
|
|
|
|
if (!multi_name_pin && extended) pwm_details(pin); // report PWM capabilities only on the first pass & only if doing an extended report
|
2017-07-31 06:31:14 +00:00
|
|
|
}
|
2017-07-25 17:53:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
SERIAL_EOL();
|
|
|
|
} // end of IF
|
|
|
|
} // end of for loop
|
|
|
|
|
|
|
|
if (!found) {
|
2017-10-26 18:37:26 +00:00
|
|
|
sprintf_P(buffer, PSTR("%sPIN: "), start_string);
|
2017-07-25 17:53:14 +00:00
|
|
|
SERIAL_ECHO(buffer);
|
2017-10-26 18:37:26 +00:00
|
|
|
PRINT_PIN(pin);
|
2017-07-25 17:53:14 +00:00
|
|
|
PRINT_PORT(pin);
|
2019-07-06 03:08:06 +00:00
|
|
|
if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) {
|
2017-07-25 17:53:14 +00:00
|
|
|
sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); // analog pin number
|
|
|
|
SERIAL_ECHO(buffer);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
SERIAL_ECHO_SP(8); // add padding if not an analog pin
|
|
|
|
SERIAL_ECHOPGM("<unused/unknown>");
|
|
|
|
if (extended) {
|
2017-07-31 06:31:14 +00:00
|
|
|
#if AVR_AT90USB1286_FAMILY //Teensy IDEs don't know about these pins so must use FASTIO
|
|
|
|
if (pin == 46 || pin == 47) {
|
2018-11-29 22:58:58 +00:00
|
|
|
SERIAL_ECHO_SP(12);
|
2017-07-31 06:31:14 +00:00
|
|
|
if (pin == 46) {
|
2019-03-29 17:21:14 +00:00
|
|
|
print_input_or_output(IS_OUTPUT(46));
|
2018-12-09 08:32:25 +00:00
|
|
|
SERIAL_CHAR('0' + READ(46));
|
2017-07-31 06:31:14 +00:00
|
|
|
}
|
|
|
|
else {
|
2019-03-29 17:21:14 +00:00
|
|
|
print_input_or_output(IS_OUTPUT(47));
|
2018-12-09 08:32:25 +00:00
|
|
|
SERIAL_CHAR('0' + READ(47));
|
2017-07-31 06:31:14 +00:00
|
|
|
}
|
2017-07-25 17:53:14 +00:00
|
|
|
}
|
|
|
|
else
|
2017-07-31 06:31:14 +00:00
|
|
|
#endif
|
|
|
|
{
|
2019-07-06 03:08:06 +00:00
|
|
|
if (pwm_status(pin)) {
|
|
|
|
// do nothing
|
|
|
|
}
|
|
|
|
else if (GET_PINMODE(pin)) {
|
2018-11-29 22:58:58 +00:00
|
|
|
SERIAL_ECHO_SP(MAX_NAME_LENGTH - 16);
|
2017-07-31 06:31:14 +00:00
|
|
|
print_input_or_output(true);
|
2018-11-29 22:58:58 +00:00
|
|
|
SERIAL_ECHO(digitalRead_mod(pin));
|
2017-07-31 06:31:14 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (IS_ANALOG(pin)) {
|
2018-11-04 21:25:26 +00:00
|
|
|
sprintf_P(buffer, PSTR(" Analog in = %5ld"), (long)analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
|
2017-07-31 06:31:14 +00:00
|
|
|
SERIAL_ECHO(buffer);
|
|
|
|
SERIAL_ECHOPGM(" ");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
SERIAL_ECHO_SP(MAX_NAME_LENGTH - 16); // add padding if not an analog pin
|
2017-07-25 17:53:14 +00:00
|
|
|
|
2017-07-31 06:31:14 +00:00
|
|
|
print_input_or_output(false);
|
2018-11-29 22:58:58 +00:00
|
|
|
SERIAL_ECHO(digitalRead_mod(pin));
|
2017-07-31 06:31:14 +00:00
|
|
|
}
|
|
|
|
//if (!pwm_status(pin)) SERIAL_CHAR(' '); // add padding if it's not a PWM pin
|
2019-07-06 03:08:06 +00:00
|
|
|
if (extended) {
|
|
|
|
SERIAL_ECHO_SP(MAX_NAME_LENGTH - 16);
|
|
|
|
pwm_details(pin); // report PWM capabilities only if doing an extended report
|
|
|
|
}
|
2017-07-31 06:31:14 +00:00
|
|
|
}
|
2017-07-25 17:53:14 +00:00
|
|
|
}
|
|
|
|
SERIAL_EOL();
|
|
|
|
}
|
|
|
|
}
|