Prusa MINI Firmware overview
|
Go to the documentation of this file.
20 #include "../inc/MarlinConfig.h"
22 #define MAX_NAME_LENGTH 39 // one place to specify the format of all the sources of names
39 #define _ADD_PIN_2(PIN_NAME, ENTRY_NAME) static const char ENTRY_NAME[] PROGMEM = { PIN_NAME };
40 #define _ADD_PIN(PIN_NAME, COUNTER) _ADD_PIN_2(PIN_NAME, entry_NAME_##COUNTER)
41 #define REPORT_NAME_DIGITAL(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER)
42 #define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER)
48 #if SERIAL_PORT == 0 && (AVR_ATmega2560_FAMILY || AVR_ATmega1284_FAMILY || defined(ARDUINO_ARCH_SAM))
49 static const char RXD_NAME[]
PROGMEM = {
"RXD" };
50 static const char TXD_NAME[]
PROGMEM = {
"TXD" };
59 #undef REPORT_NAME_DIGITAL
60 #undef REPORT_NAME_ANALOG
62 #define _ADD_PIN_2(ENTRY_NAME, NAME, IS_DIGITAL) { ENTRY_NAME, NAME, IS_DIGITAL },
63 #define _ADD_PIN(NAME, COUNTER, IS_DIGITAL) _ADD_PIN_2(entry_NAME_##COUNTER, NAME, IS_DIGITAL)
64 #define REPORT_NAME_DIGITAL(COUNTER, NAME) _ADD_PIN(NAME, COUNTER, true)
65 #define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(analogInputToDigitalPin(NAME), COUNTER, false)
87 #if (AVR_ATmega2560_FAMILY || defined(ARDUINO_ARCH_SAM))
88 { RXD_NAME, 0,
true },
89 { TXD_NAME, 1,
true },
90 #elif AVR_ATmega1284_FAMILY
91 { RXD_NAME, 8,
true },
92 { TXD_NAME, 9,
true },
101 #include HAL_PATH(../HAL, pinsDebug.h) // get the correct support file for this CPU
103 #ifndef M43_NEVER_TOUCH
104 #define M43_NEVER_TOUCH(Q) false
114 bool found =
false, multi_name_pin =
false;
118 if (found) multi_name_pin =
true;
120 if (!multi_name_pin) {
140 #if AVR_AT90USB1286_FAMILY //Teensy IDEs don't know about these pins so must use FASTIO
141 if (pin == 46 || pin == 47) {
146 else if (pin == 47) {
195 #if AVR_AT90USB1286_FAMILY //Teensy IDEs don't know about these pins so must use FASTIO
196 if (pin == 46 || pin == 47) {
#define SERIAL_CHAR(x)
Definition: serial.h:69
const volatile uint8_t *const PWM_other[][3] PROGMEM
Definition: pinsDebug.h:154
#define SERIAL_ECHO(x)
Definition: serial.h:70
bool pin_is_protected(const pin_t pin)
Definition: Marlin.cpp:258
#define IS_ANALOG(P)
Definition: pinsDebug.h:59
int digitalRead_mod(const int8_t pin)
Definition: pinsDebug.h:354
static void print_input_or_output(const bool isout)
Definition: pinsDebug.h:107
#define PGM_P
Definition: pgmspace.h:30
void pwm_details(int32_t pin)
Definition: pinsDebug.h:47
#define IS_OUTPUT(IO)
Definition: fastio.h:106
int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t p)
uint32_t analogRead(uint32_t ulPin)
Definition: wiring_analog.c:8
#define sprintf_P(s,...)
Definition: pgmspace.h:72
#define SERIAL_ECHO_SP(C)
Definition: serial.h:186
#define MULTI_NAME_PAD
Definition: pinsDebug.h:62
int8_t pin_t
Definition: HAL.h:65
Definition: pinsDebug.h:68
#define PSTR(str)
Definition: pgmspace.h:31
#define COUNT(a)
Definition: macros.h:200
void PRINT_ARRAY_NAME(uint8_t x)
Definition: pinsDebug.h:64
bool GET_PINMODE(int8_t pin)
Definition: pinsDebug.h:49
void report_pin_state_extended(pin_t pin, bool ignore, bool extended=false, const char *start_string="")
Definition: pinsDebug.h:112
#define SERIAL_ECHOPGM(S)
Definition: serial.h:173
#define PRINT_PORT(p)
Definition: pinsDebug.h:392
#define PRINT_PIN(p)
Definition: pinsDebug.h:396
const uint8_t[]
Definition: 404_html.c:3
#define MAX_NAME_LENGTH
Definition: pinsDebug.h:22
bool is_digital
Definition: pinsDebug.h:71
#define SERIAL_EOL()
Definition: serial.h:181
pin_t pin
Definition: pinsDebug.h:70
void serialprintPGM(PGM_P str)
Definition: serial.cpp:35
#define READ(IO)
Definition: fastio.h:95
#define GET_ARRAY_PIN(p)
Definition: pinsDebug.h:61
#define pwm_status(pin)
Definition: pinsDebug.h:30
const PGM_P name
Definition: pinsDebug.h:69
bool GET_ARRAY_IS_DIGITAL(pin_t pin)
Definition: pinsDebug.h:57