Prusa MINI Firmware overview
|
Go to the source code of this file.
Classes | |
struct | PinInfo |
Macros | |
#define | MAX_NAME_LENGTH 39 |
#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) |
#define | REPORT_NAME_DIGITAL(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER) |
#define | REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER) |
#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) |
#define | REPORT_NAME_DIGITAL(COUNTER, NAME) _ADD_PIN(NAME, COUNTER, true) |
#define | REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(analogInputToDigitalPin(NAME), COUNTER, false) |
#define | M43_NEVER_TOUCH(Q) false |
Functions | |
static void | print_input_or_output (const bool isout) |
void | report_pin_state_extended (pin_t pin, bool ignore, bool extended=false, const char *start_string="") |
Variables | |
const PinInfo pin_array[] | PROGMEM |
#define MAX_NAME_LENGTH 39 |
Marlin 3D Printer Firmware Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
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/.
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.
#define _ADD_PIN | ( | PIN_NAME, | |
COUNTER | |||
) | _ADD_PIN_2(PIN_NAME, entry_NAME_##COUNTER) |
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.
#define _ADD_PIN | ( | NAME, | |
COUNTER, | |||
IS_DIGITAL | |||
) | _ADD_PIN_2(entry_NAME_##COUNTER, NAME, IS_DIGITAL) |
#define REPORT_NAME_ANALOG | ( | COUNTER, | |
NAME | |||
) | _ADD_PIN(analogInputToDigitalPin(NAME), COUNTER, false) |
#define M43_NEVER_TOUCH | ( | Q | ) | false |
void report_pin_state_extended | ( | pin_t | pin, |
bool | ignore, | ||
bool | extended = false , |
||
const char * | start_string = "" |
||
) |