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,15 +19,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* HAL_LPC1768/HAL.h
|
||||
* Hardware Abstraction Layer for NXP LPC1768
|
||||
*/
|
||||
|
||||
#ifndef _HAL_LPC1768_H_
|
||||
#define _HAL_LPC1768_H_
|
||||
|
||||
#define CPU_32_BIT
|
||||
#define HAL_INIT
|
||||
|
||||
@ -156,5 +154,3 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
|
||||
|
||||
#define HAL_IDLETASK 1
|
||||
void HAL_idletask(void);
|
||||
|
||||
#endif // _HAL_LPC1768_H_
|
||||
|
@ -18,15 +18,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
*
|
||||
* HAL For LPC1768
|
||||
*/
|
||||
|
||||
#ifndef _HAL_TIMERS_H
|
||||
#define _HAL_TIMERS_H
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
// --------------------------------------------------------------------------
|
||||
@ -166,5 +164,3 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
}
|
||||
|
||||
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||
|
||||
#endif // _HAL_TIMERS_H
|
||||
|
@ -19,9 +19,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifndef MARLINSERIAL_H
|
||||
#define MARLINSERIAL_H
|
||||
#include <HardwareSerial.h>
|
||||
#include <WString.h>
|
||||
|
||||
@ -33,7 +32,6 @@
|
||||
#ifndef SERIAL_PORT
|
||||
#define SERIAL_PORT 0
|
||||
#endif
|
||||
|
||||
#ifndef RX_BUFFER_SIZE
|
||||
#define RX_BUFFER_SIZE 128
|
||||
#endif
|
||||
@ -67,5 +65,3 @@ extern MarlinSerial MSerial;
|
||||
extern MarlinSerial MSerial1;
|
||||
extern MarlinSerial MSerial2;
|
||||
extern MarlinSerial MSerial3;
|
||||
|
||||
#endif // MARLINSERIAL_H
|
||||
|
@ -38,6 +38,7 @@
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Based on "servo.h - Interrupt driven Servo library for Arduino using 16 bit timers -
|
||||
@ -47,12 +48,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SERVO_PRIVATE_H
|
||||
#define SERVO_PRIVATE_H
|
||||
|
||||
#include <Servo.h>
|
||||
|
||||
class MarlinServo: public Servo {
|
||||
class MarlinServo: public Servo {
|
||||
public:
|
||||
void move(const int value) {
|
||||
constexpr uint16_t servo_delay[] = SERVO_DELAY;
|
||||
@ -70,5 +68,3 @@ class MarlinServo: public Servo {
|
||||
};
|
||||
|
||||
#define HAL_SERVO_LIB MarlinServo
|
||||
|
||||
#endif // SERVO_PRIVATE_H
|
||||
|
@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Endstop Interrupts
|
||||
@ -34,9 +35,6 @@
|
||||
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
|
||||
*/
|
||||
|
||||
#ifndef _ENDSTOP_INTERRUPTS_H_
|
||||
#define _ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
// One ISR for all EXT-Interrupts
|
||||
@ -104,5 +102,3 @@ void setup_endstop_interrupts(void) {
|
||||
attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //_ENDSTOP_INTERRUPTS_H_
|
||||
|
@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Fast I/O Routines for LPC1768/9
|
||||
@ -32,9 +33,6 @@
|
||||
* For TARGET LPC1768
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_LPC1768_H
|
||||
#define _FASTIO_LPC1768_H
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#define USEABLE_HARDWARE_PWM(pin) TRUE // all pins are PWM capable
|
||||
@ -123,5 +121,3 @@
|
||||
|
||||
// Shorthand
|
||||
#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)
|
||||
|
||||
#endif // _FASTIO_LPC1768_H
|
||||
|
@ -19,13 +19,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// adapted from I2C/master/master.c example
|
||||
// https://www-users.cs.york.ac.uk/~pcc/MCP/HAPR-Course-web/CMSIS/examples/html/master_8c_source.html
|
||||
|
||||
#ifndef _DIGIPOT_MCP4451_I2C_ROUTINES_H_
|
||||
#define _DIGIPOT_MCP4451_I2C_ROUTINES_H_
|
||||
|
||||
#define USEDI2CDEV_M 1 // use I2C1 controller
|
||||
|
||||
#if USEDI2CDEV_M == 0
|
||||
@ -53,5 +51,3 @@ uint8_t digipot_mcp4451_send_byte(uint8_t data);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _DIGIPOT_MCP4451_I2C_ROUTINES_H_
|
||||
|
@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SPI_PINS_LPC1768_H
|
||||
#define SPI_PINS_LPC1768_H
|
||||
#pragma once
|
||||
|
||||
#include "src/core/macros.h"
|
||||
|
||||
@ -54,5 +52,3 @@
|
||||
#undef SDSS
|
||||
#define SDSS SS_PIN
|
||||
#endif
|
||||
|
||||
#endif // SPI_PINS_LPC1768_H
|
||||
|
@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WATCHDOG_LPC1768_H
|
||||
#define WATCHDOG_LPC1768_H
|
||||
#pragma once
|
||||
|
||||
#define RST_POWER_ON 1
|
||||
#define RST_EXTERNAL 2
|
||||
@ -34,5 +32,3 @@ void watchdog_init(void);
|
||||
void watchdog_reset(void);
|
||||
void HAL_clear_reset_source(void);
|
||||
uint8_t HAL_get_reset_source(void);
|
||||
|
||||
#endif /* WATCHDOG_H */
|
||||
|
Reference in New Issue
Block a user