Apply #pragma once, misc cleanup (#12322)

* Apply #pragma once in headers
* Adjust some thermistors formatting
* Misc cleanup and formatting
This commit is contained in:
Scott Lahteine
2018-11-04 02:25:55 -06:00
committed by GitHub
parent 8696f882a9
commit f5eab912ed
179 changed files with 710 additions and 1343 deletions

View File

@ -20,14 +20,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
*/
#ifndef _HAL_STM32F1_H
#define _HAL_STM32F1_H
#define CPU_32_BIT
#undef DEBUG_NONE
@ -251,5 +249,3 @@ void HAL_enable_AdcFreerun(void);
#define JTAG_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY)
#define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE)
#endif // _HAL_STM32F1_H

View File

@ -20,9 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef HAL_SERVO_STM32F1_H
#define HAL_SERVO_STM32F1_H
#pragma once
// Pin number of unattached pins
#define NOT_ATTACHED (-1)
@ -53,5 +51,3 @@ class libServo {
int32_t minAngle;
int32_t maxAngle;
};
#endif // HAL_SERVO_STM32F1_H

View File

@ -19,14 +19,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
*/
#ifndef _HAL_TIMERS_STM32F1_H
#define _HAL_TIMERS_STM32F1_H
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
@ -167,5 +165,3 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
}
#define HAL_timer_isr_epilogue(TIMER_NUM)
#endif // _HAL_TIMERS_STM32F1_H

View File

@ -20,6 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Endstop interrupts for Libmaple STM32F1 based targets.
@ -46,9 +47,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
@ -89,5 +87,3 @@ void setup_endstop_interrupts(void) {
attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
#endif
}
#endif //_ENDSTOP_INTERRUPTS_H_

View File

@ -20,15 +20,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Fast I/O interfaces for STM32F1
* These use GPIO functions instead of Direct Port Manipulation, as on AVR.
*/
#ifndef _FASTIO_STM32F1_H
#define _FASTIO_STM32F1_H
#include <libmaple/gpio.h>
#define READ(IO) (PIN_MAP[IO].gpio_device->regs->IDR & (1U << PIN_MAP[IO].gpio_bit) ? HIGH : LOW)
@ -52,5 +50,3 @@
#define PWM_PIN(p) true
#define USEABLE_HARDWARE_PWM(p) PWM_PIN(p)
#endif // _FASTIO_STM32F1_H

View File

@ -16,14 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
*/
#ifndef SPI_PINS_H_
#define SPI_PINS_H_
/**
* Define SPI Pins: SCK, MISO, MOSI, SS
*
@ -33,5 +31,3 @@
#define MISO_PIN PA6
#define MOSI_PIN PA7
#define SS_PIN PA4
#endif // SPI_PINS_H_

View File

@ -19,14 +19,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
*/
#ifndef WATCHDOG_STM32F1_H
#define WATCHDOG_STM32F1_H
#include <libmaple/iwdg.h>
#include "../../inc/MarlinConfig.h"
@ -51,5 +49,3 @@ inline void watchdog_reset() {
#endif
iwdg_feed();
}
#endif // WATCHDOG_STM32F1_H