Apply #pragma once, misc cleanup (#12322)
* Apply #pragma once in headers * Adjust some thermistors formatting * Misc cleanup and formatting
This commit is contained in:
@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef I2CPOSENC_H
|
||||
#define I2CPOSENC_H
|
||||
#pragma once
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
@ -331,5 +329,3 @@ class I2CPositionEncodersMgr {
|
||||
};
|
||||
|
||||
extern I2CPositionEncodersMgr I2CPEM;
|
||||
|
||||
#endif //I2CPOSENC_H
|
||||
|
@ -19,11 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __BARICUDA_H__
|
||||
#define __BARICUDA_H__
|
||||
#pragma once
|
||||
|
||||
extern uint8_t baricuda_valve_pressure,
|
||||
baricuda_e_to_p_pressure;
|
||||
|
||||
#endif // __BARICUDA_H__
|
||||
|
@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ABL_H__
|
||||
#define __ABL_H__
|
||||
#pragma once
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
@ -47,5 +45,3 @@
|
||||
#endif
|
||||
|
||||
#endif // AUTO_BED_LEVELING_BILINEAR
|
||||
|
||||
#endif // __ABL_H__
|
||||
|
@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __BEDLEVEL_H__
|
||||
#define __BEDLEVEL_H__
|
||||
#pragma once
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
@ -85,5 +83,3 @@ void reset_bed_level();
|
||||
#elif HAS_ABL
|
||||
#include "abl/abl.h"
|
||||
#endif
|
||||
|
||||
#endif // __BEDLEVEL_H__
|
||||
|
@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _MESH_BED_LEVELING_H_
|
||||
#define _MESH_BED_LEVELING_H_
|
||||
#pragma once
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
@ -120,5 +118,3 @@ public:
|
||||
};
|
||||
|
||||
extern mesh_bed_leveling mbl;
|
||||
|
||||
#endif // _MESH_BED_LEVELING_H_
|
||||
|
@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef UNIFIED_BED_LEVELING_H
|
||||
#define UNIFIED_BED_LEVELING_H
|
||||
#pragma once
|
||||
|
||||
//#define UBL_DEVEL_DEBUGGING
|
||||
|
||||
@ -372,5 +370,3 @@ class unified_bed_leveling {
|
||||
}; // class unified_bed_leveling
|
||||
|
||||
extern unified_bed_leveling ubl;
|
||||
|
||||
#endif // UNIFIED_BED_LEVELING_H
|
||||
|
@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __CASELIGHT_H__
|
||||
#define __CASELIGHT_H__
|
||||
#pragma once
|
||||
|
||||
extern uint8_t case_light_brightness;
|
||||
extern bool case_light_on;
|
||||
@ -29,5 +27,3 @@ extern uint8_t case_light_brightness_sav; // saves brighness info when case_li
|
||||
extern bool case_light_arg_flag; // flag to notify if S or P argument type
|
||||
|
||||
void update_case_light();
|
||||
|
||||
#endif // __CASELIGHT_H__
|
||||
|
@ -19,10 +19,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __CONTROLLERFAN_H__
|
||||
#define __CONTROLLERFAN_H__
|
||||
#pragma once
|
||||
|
||||
void controllerfan_update();
|
||||
|
||||
#endif // __CONTROLLERFAN_H__
|
||||
|
@ -1,5 +1,25 @@
|
||||
#ifndef DAC084S085_H
|
||||
#define DAC084S085_H
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
class dac084s085 {
|
||||
public:
|
||||
@ -9,5 +29,3 @@ class dac084s085 {
|
||||
private:
|
||||
static void cshigh();
|
||||
};
|
||||
|
||||
#endif // DAC084S085_H
|
||||
|
@ -19,14 +19,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Arduino library for MicroChip MCP4728 I2C D/A converter.
|
||||
*/
|
||||
|
||||
#ifndef DAC_MCP4728_H
|
||||
#define DAC_MCP4728_H
|
||||
|
||||
#include <Wire.h>
|
||||
|
||||
#define defaultVDD DAC_STEPPER_MAX //was 5000 but differs with internal Vref
|
||||
@ -57,5 +55,3 @@ uint8_t mcp4728_fastWrite();
|
||||
uint8_t mcp4728_simpleCommand(byte simpleCommand);
|
||||
uint8_t mcp4728_getDrvPct(uint8_t channel);
|
||||
void mcp4728_setDrvPct(uint8_t pct[XYZE]);
|
||||
|
||||
#endif // DAC_MCP4728_H
|
||||
|
@ -19,31 +19,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* stepper_dac.h - To set stepper current via DAC
|
||||
*
|
||||
* Part of Marlin
|
||||
*
|
||||
* Copyright (c) 2016 MarlinFirmware
|
||||
*
|
||||
* Marlin 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.
|
||||
*
|
||||
* Marlin 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 Marlin. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef STEPPER_DAC_H
|
||||
#define STEPPER_DAC_H
|
||||
|
||||
#include "dac_mcp4728.h"
|
||||
|
||||
int dac_init();
|
||||
@ -53,5 +34,3 @@ void dac_print_values();
|
||||
void dac_commit_eeprom();
|
||||
uint8_t dac_current_get_percent(AxisEnum axis);
|
||||
void dac_current_set_percents(const uint8_t pct[XYZE]);
|
||||
|
||||
#endif // STEPPER_DAC_H
|
||||
|
@ -19,11 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __DIGIPOT_H__
|
||||
#define __DIGIPOT_H__
|
||||
#pragma once
|
||||
|
||||
void digipot_i2c_set_current(const uint8_t channel, const float current);
|
||||
void digipot_i2c_init();
|
||||
|
||||
#endif // __DIGIPOT_H__
|
||||
|
@ -19,15 +19,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* feature/fanmux.h - Cooling Fan Multiplexer support functions
|
||||
*/
|
||||
|
||||
#ifndef _FANMUX_H_
|
||||
#define _FANMUX_H_
|
||||
|
||||
extern void fanmux_switch(const uint8_t e);
|
||||
extern void fanmux_init(void);
|
||||
|
||||
#endif // _FANMUX_H_
|
||||
|
@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __FILWIDTH_H__
|
||||
#define __FILWIDTH_H__
|
||||
#pragma once
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
@ -31,5 +29,3 @@ extern float filament_width_nominal, // Nominal filament
|
||||
extern uint8_t meas_delay_cm; // Distance delay setting
|
||||
extern int8_t measurement_delay[MAX_MEASUREMENT_DELAY + 1], // Ring buffer to delayed measurement. Store extruder factor after subtracting 100
|
||||
filwidth_delay_index[2]; // Indexes into ring buffer
|
||||
|
||||
#endif // __FILWIDTH_H__
|
||||
|
@ -19,17 +19,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* blinkm.h - Control a BlinkM over i2c
|
||||
*/
|
||||
|
||||
#ifndef _BLINKM_H_
|
||||
#define _BLINKM_H_
|
||||
|
||||
struct LEDColor;
|
||||
typedef LEDColor LEDColor;
|
||||
|
||||
void blinkm_set_led_color(const LEDColor &color);
|
||||
|
||||
#endif // _BLINKM_H_
|
||||
|
@ -19,14 +19,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Neopixel support
|
||||
*/
|
||||
|
||||
#ifndef __NEOPIXEL_H__
|
||||
#define __NEOPIXEL_H__
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#include <Adafruit_NeoPixel.h>
|
||||
@ -46,5 +44,3 @@ void set_neopixel_color(const uint32_t color);
|
||||
//bool neopixel_set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p);
|
||||
|
||||
extern Adafruit_NeoPixel pixels;
|
||||
|
||||
#endif // __NEOPIXEL_H__
|
||||
|
@ -19,18 +19,14 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Driver for the Philips PCA9632 LED driver.
|
||||
* Written by Robert Mendon Feb 2017.
|
||||
*/
|
||||
|
||||
#ifndef __PCA9632_H__
|
||||
#define __PCA9632_H__
|
||||
|
||||
struct LEDColor;
|
||||
typedef LEDColor LEDColor;
|
||||
|
||||
void pca9632_set_led_color(const LEDColor &color);
|
||||
|
||||
#endif // __PCA9632_H__
|
||||
|
@ -19,14 +19,10 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Marlin general RGB LED support
|
||||
*/
|
||||
|
||||
#ifndef __TEMPSTAT_H__
|
||||
#define __TEMPSTAT_H__
|
||||
|
||||
void handle_status_leds(void);
|
||||
|
||||
#endif // __TEMPSTAT_H__
|
||||
|
@ -19,10 +19,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __SNMM_H__
|
||||
#define __SNMM_H__
|
||||
#pragma once
|
||||
|
||||
void select_multiplexed_stepper(const uint8_t e);
|
||||
|
||||
#endif // __SNMM_H__
|
||||
|
@ -19,12 +19,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __SOLENOID_H__
|
||||
#define __SOLENOID_H__
|
||||
#pragma once
|
||||
|
||||
void enable_solenoid_on_active_extruder();
|
||||
void disable_all_solenoids();
|
||||
void enable_solenoid(const uint8_t num);
|
||||
|
||||
#endif // __SOLENOID_H__
|
||||
|
@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TMC_UTIL_H_
|
||||
#define _TMC_UTIL_H_
|
||||
#pragma once
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
#if HAS_TRINAMIC
|
||||
@ -179,5 +177,3 @@ void monitor_tmc_driver();
|
||||
#if TMC_HAS_SPI
|
||||
void tmc_init_cs_pins();
|
||||
#endif
|
||||
|
||||
#endif // _TMC_UTIL_H_
|
||||
|
@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TWIBUS_H
|
||||
#define TWIBUS_H
|
||||
#pragma once
|
||||
|
||||
#include "../core/macros.h"
|
||||
|
||||
@ -238,5 +236,3 @@ class TWIBus {
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // TWIBUS_H
|
||||
|
Reference in New Issue
Block a user