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

@ -19,15 +19,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* HAL/HAL_SPI.h
* Core Marlin definitions for SPI, implemented in the HALs
*/
#ifndef _HAL_SPI_H_
#define _HAL_SPI_H_
#include <stdint.h>
/**
@ -78,5 +76,3 @@ void spiRead(uint8_t* buf, uint16_t nbyte);
void spiSendBlock(uint8_t token, const uint8_t* buf);
/** Begin SPI transaction, set clock, bit order, data mode */
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode);
#endif // _HAL_SPI_H_

View File

@ -19,11 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _BACKTRACE_H_
#define _BACKTRACE_H_
#pragma once
// Perform a backtrace to the serial port
void backtrace(void);
#endif

View File

@ -11,8 +11,7 @@
* File Description: Internal interface between the ARM unwinding sub-modules.
**************************************************************************/
#ifndef UNWARM_H
#define UNWARM_H
#pragma once
#include "unwinder.h"
@ -139,5 +138,3 @@ bool UnwReportRetAddr(UnwState * const state, uint32_t addr);
bool UnwMemWriteRegister(UnwState * const state, const uint32_t addr, const RegData * const reg);
bool UnwMemReadRegister(UnwState * const state, const uint32_t addr, RegData * const reg);
void UnwMemHashGC(UnwState * const state);
#endif // UNWARM_H

View File

@ -12,8 +12,7 @@
* File Description: Interface to the memory tracking sub-system.
**************************************************************************/
#ifndef UNWARMBYTAB_H
#define UNWARMBYTAB_H
#pragma once
#include "unwarm.h"
@ -30,5 +29,3 @@ typedef struct {
} UnwTabEntry;
UnwResult UnwindByTableStart(UnwindFrame* frame, const UnwindCallbacks *cb, void *data);
#endif // UNWARMBYTAB_H

View File

@ -12,14 +12,10 @@
* File Description: Interface to the memory tracking sub-system.
**************************************************************************/
#ifndef UNWARMMEM_H
#define UNWARMMEM_H
#pragma once
#include "unwarm.h"
bool UnwMemHashRead(MemData * const memData, uint32_t addr, uint32_t * const data, bool * const tracked);
bool UnwMemHashWrite(MemData * const memData, uint32_t addr, uint32_t val, bool valValid);
void UnwMemHashGC(UnwState * const state);
#endif

View File

@ -13,8 +13,7 @@
* Interface to the ARM stack unwinding module.
**************************************************************************/
#ifndef UNWINDER_H
#define UNWINDER_H
#pragma once
#include <stdint.h>
@ -171,5 +170,3 @@ typedef struct {
* get function names in the traceback. Otherwise, you will not.
*/
UnwResult UnwindStart(UnwindFrame* frame, const UnwindCallbacks *cb, void *data);
#endif /* UNWINDER_H */

View File

@ -12,8 +12,7 @@
* File Description: Utility functions to access memory
**************************************************************************/
#ifndef UNWMEMACCESS_H
#define UNWMEMACCESS_H
#pragma once
#include "unwarm.h"
#include <stdint.h>
@ -21,6 +20,3 @@
bool UnwReadW(const uint32_t a, uint32_t *v);
bool UnwReadH(const uint32_t a, uint16_t *v);
bool UnwReadB(const uint32_t a, uint8_t *v);
#endif

View File

@ -19,9 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef MATH_32BIT_H
#define MATH_32BIT_H
#pragma once
#include "../../core/macros.h"
@ -31,5 +29,3 @@
static FORCE_INLINE uint32_t MultiU32X24toH32(uint32_t longIn1, uint32_t longIn2) {
return ((uint64_t)longIn1 * longIn2 + 0x00800000) >> 24;
}
#endif // MATH_32BIT_H

View File

@ -19,6 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* servo_private.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
@ -39,9 +40,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef SERVO_PRIVATE_H
#define SERVO_PRIVATE_H
#include <stdint.h>
// Architecture specific include
@ -98,5 +96,3 @@ extern ServoInfo_t servo_info[MAX_SERVOS];
extern void initISR(timer16_Sequence_t timer);
extern void finISR(timer16_Sequence_t timer);
#endif // SERVO_PRIVATE_H