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

@ -45,10 +45,7 @@
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __EEEPROM_EMUL_H
#define __EEEPROM_EMUL_H
#pragma once
// --------------------------------------------------------------------------
// Includes
@ -112,6 +109,4 @@ uint16_t EE_Initialize(void);
uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data);
uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data);
#endif /* __EEEPROM_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@ -20,9 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _HAL_STM32F4_H
#define _HAL_STM32F4_H
#pragma once
#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_STM32F4_H

View File

@ -20,22 +20,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef HAL_SERVO_STM32F4_H
#define HAL_SERVO_STM32F4_H
#pragma once
#include <Servo.h>
// Inherit and expand on the official library
class libServo : public Servo {
public:
public:
int8_t attach(const int pin);
int8_t attach(const int pin, const int min, const int max);
void move(const int value);
private:
private:
uint16_t min_ticks;
uint16_t max_ticks;
uint8_t servoIndex; // index into the channel data for this servo
};
#endif // HAL_SERVO_STM32F4_H

View File

@ -19,9 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _HAL_TIMERS_STM32F4_H
#define _HAL_TIMERS_STM32F4_H
#pragma once
// --------------------------------------------------------------------------
// Includes
@ -130,5 +128,3 @@ FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
#endif
#define HAL_timer_isr_epilogue(TIMER_NUM)
#endif // _HAL_TIMERS_STM32F4_H

View File

@ -20,9 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _ENDSTOP_INTERRUPTS_H_
#define _ENDSTOP_INTERRUPTS_H_
#pragma once
#include "../../module/endstops.h"
@ -64,5 +62,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 STM32F4
* These use GPIO functions instead of Direct Port Manipulation, as on AVR.
*/
#ifndef _FASTIO_STM32F4_H
#define _FASTIO_STM32F4_H
#undef _BV
#define _BV(b) (1 << (b))
@ -151,5 +149,3 @@
#define PE13 _STM32_PIN(E, 13)
#define PE14 _STM32_PIN(E, 14)
#define PE15 _STM32_PIN(E, 15)
#endif // _FASTIO_STM32F4_H

View File

@ -19,15 +19,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef WATCHDOG_STM32F4_H
#define WATCHDOG_STM32F4_H
#include "../../inc/MarlinConfig.h"
#pragma once
extern IWDG_HandleTypeDef hiwdg;
void watchdog_init();
void watchdog_reset();
#endif // WATCHDOG_STM32F1_H