Skip to content

Commit

Permalink
added STM32TPL_ prefix to include guards.
Browse files Browse the repository at this point in the history
  • Loading branch information
antongus committed Oct 4, 2014
1 parent 767ef2c commit 3fe88e2
Show file tree
Hide file tree
Showing 20 changed files with 60 additions and 64 deletions.
6 changes: 3 additions & 3 deletions commands.h
Expand Up @@ -28,8 +28,8 @@
*
*/

#ifndef COMMANDS_H_INCLUDED
#define COMMANDS_H_INCLUDED
#ifndef STM32TPL_COMMANDS_H_INCLUDED
#define STM32TPL_COMMANDS_H_INCLUDED

#include "util.h"
#include "textstream.h"
Expand Down Expand Up @@ -134,4 +134,4 @@ int command_##id##_handler(char * args, TextStream& stream); \
InterpreterCommand command_##id##_object(xstr(cmd_name), command_##id##_handler); \
int command_##id##_handler(char * args __attribute__((unused)), TextStream& stream __attribute__((unused))) \

#endif // COMMANDS_H_INCLUDED
#endif // STM32TPL_COMMANDS_H_INCLUDED
6 changes: 3 additions & 3 deletions cortex-m3-regs.h
Expand Up @@ -28,8 +28,8 @@
*
*/

#ifndef CORTEX_M3_REGS_H_INCLUDED
#define CORTEX_M3_REGS_H_INCLUDED
#ifndef STM32TPL_CORTEX_M3_REGS_H_INCLUDED
#define STM32TPL_CORTEX_M3_REGS_H_INCLUDED

/**
* main stack pointer (MSP)
Expand Down Expand Up @@ -170,4 +170,4 @@ struct RegisterCONTROL
};


#endif // CORTEX_M3_REGS_H_INCLUDED
#endif // STM32TPL_CORTEX_M3_REGS_H_INCLUDED
8 changes: 3 additions & 5 deletions ftoa.h
Expand Up @@ -27,10 +27,8 @@
*
*/

#pragma once

#ifndef FTOA_H_INCLUDED
#define FTOA_H_INCLUDED
#ifndef STM32TPL_FTOA_H_INCLUDED
#define STM32TPL_FTOA_H_INCLUDED

#ifdef __cplusplus
extern "C" {
Expand All @@ -42,5 +40,5 @@ char * ftoa(double f, char * buf, int precision);
}
#endif

#endif // FTOA_H_INCLUDED
#endif // STM32TPL_FTOA_H_INCLUDED

7 changes: 4 additions & 3 deletions ioregister.h
Expand Up @@ -28,8 +28,9 @@
*
*/

#ifndef IOREGISTER_H_INCLUDED
#define IOREGISTER_H_INCLUDED
#ifndef STM32TPL_IOREGISTER_H_INCLUDED
#define STM32TPL_IOREGISTER_H_INCLUDED

#include <cstdint>

/**
Expand Down Expand Up @@ -89,4 +90,4 @@ template <uint32_t addr, uint32_t bit> struct PeriphBit
};


#endif // IOREGISTER_H_INCLUDED
#endif // STM32TPL_IOREGISTER_H_INCLUDED
8 changes: 3 additions & 5 deletions kbd.h
Expand Up @@ -27,10 +27,8 @@
*
*/

#pragma once

#ifndef KBD_H_INCLUDED
#define KBD_H_INCLUDED
#ifndef STM32TPL_KBD_H_INCLUDED
#define STM32TPL_KBD_H_INCLUDED

#include <scmRTOS.h>

Expand Down Expand Up @@ -121,4 +119,4 @@ class Keyboard
}
};

#endif // KBD_H_INCLUDED
#endif // STM32TPL_KBD_H_INCLUDED
6 changes: 3 additions & 3 deletions pin.h
Expand Up @@ -30,13 +30,13 @@
*
*/

#ifndef PIN_H_INCLUDED
#define PIN_H_INCLUDED
#ifndef STM32TPL_PIN_H_INCLUDED
#define STM32TPL_PIN_H_INCLUDED

#if (defined STM32F2XX) || (defined STM32F4XX) || (defined STM32F40_41xxx) || (defined STM32F427_437xx) || (defined STM32F429_439xx) || (defined STM32F401xx)
# include "pin_stm32F4xx.h"
#else
# include "pin_stm32F1xx.h"
#endif

#endif // PIN_H_INCLUDED
#endif // STM32TPL_PIN_H_INCLUDED
6 changes: 3 additions & 3 deletions pin_stm32F1xx.h
Expand Up @@ -63,8 +63,8 @@
*
*/

#ifndef PIN_STM32F1XX_H_
#define PIN_STM32F1XX_H_
#ifndef STM32TPL_PIN_STM32F1XX_H_INCLUDED
#define STM32TPL_PIN_STM32F1XX_H_INCLUDED

#include <cstdint>
#include <cstddef>
Expand Down Expand Up @@ -238,4 +238,4 @@ struct Pin

};

#endif // PIN_STM32F1XX_H_
#endif // STM32TPL_PIN_STM32F1XX_H_INCLUDED
6 changes: 3 additions & 3 deletions pin_stm32F4xx.h
Expand Up @@ -66,8 +66,8 @@
* Note : using objects instead of types can (in some cases) increase memory consumption.
*/

#ifndef PIN_STM32F4XX_H_
#define PIN_STM32F4XX_H_
#ifndef STM32TPL_PIN_STM32F4XX_H_INCLUDED
#define STM32TPL_PIN_STM32F4XX_H_INCLUDED

#include <cstdint>
#include <cstddef>
Expand Down Expand Up @@ -544,4 +544,4 @@ struct Pin
};


#endif /* PIN_STM32F4XX_H_ */
#endif // STM32TPL_PIN_STM32F4XX_H_INCLUDED
6 changes: 3 additions & 3 deletions rtc.h
Expand Up @@ -27,8 +27,8 @@
*
*/

#ifndef RTC_H_INCLUDED
#define RTC_H_INCLUDED
#ifndef STM32TPL_RTC_H_INCLUDED
#define STM32TPL_RTC_H_INCLUDED

#include <time.h>

Expand All @@ -42,4 +42,4 @@ typedef RtcModule<true> RtcModuleLSE;
typedef RtcModule<false> RtcModuleLSI;


#endif // RTC_H_INCLUDED
#endif // STM32TPL_RTC_H_INCLUDED
6 changes: 3 additions & 3 deletions rtc_stm32f1xx.h
Expand Up @@ -27,8 +27,8 @@
*
*/

#ifndef RTC_STM32F1XX_H_INCLUDED
#define RTC_STM32F1XX_H_INCLUDED
#ifndef STM32TPL_RTC_STM32F1XX_H_INCLUDED
#define STM32TPL_RTC_STM32F1XX_H_INCLUDED

#include "stm32.h"

Expand Down Expand Up @@ -182,4 +182,4 @@ void RtcModule<use_lse>::SetCorrection(uint8_t value)
PWR->CR &= ~PWR_CR_DBP;
}

#endif // RTC_STM32F1XX_H_INCLUDED
#endif // STM32TPL_RTC_STM32F1XX_H_INCLUDED
6 changes: 3 additions & 3 deletions rtc_stm32f4xx.h
Expand Up @@ -28,8 +28,8 @@
*
*/

#ifndef RTC_STM32F4XX_H_INCLUDED
#define RTC_STM32F4XX_H_INCLUDED
#ifndef STM32TPL_RTC_STM32F4XX_H_INCLUDED
#define STM32TPL_RTC_STM32F4XX_H_INCLUDED

#include "stm32.h"

Expand Down Expand Up @@ -275,4 +275,4 @@ bool RtcModule<use_lse>::writeTime(time_t t)
return ret;
}

#endif // RTC_STM32F4XX_H_INCLUDED
#endif // STM32TPL_RTC_STM32F4XX_H_INCLUDED
7 changes: 3 additions & 4 deletions soft_i2c.h
Expand Up @@ -27,10 +27,9 @@
*
*/

#pragma once
#ifndef STM32TPL_SOFT_I2C_H_INCLUDED
#define STM32TPL_SOFT_I2C_H_INCLUDED

#ifndef SOFT_I2C_H_INCLUDED
#define SOFT_I2C_H_INCLUDED
#include <cstdint>
#include "pin.h"

Expand Down Expand Up @@ -212,4 +211,4 @@ void SoftI2c<props>::read(uint8_t addr, void *data, size_t length)
stop();
}

#endif // SOFT_I2C_H_INCLUDED
#endif // STM32TPL_SOFT_I2C_H_INCLUDED
6 changes: 3 additions & 3 deletions stm32.h
Expand Up @@ -28,8 +28,8 @@
*
*/

#ifndef STM32_H_INCLUDED
#define STM32_H_INCLUDED
#ifndef STM32TPL_STM32_H_INCLUDED
#define STM32TPL_STM32_H_INCLUDED

#include <cstdint>
#include "ioregister.h"
Expand Down Expand Up @@ -274,4 +274,4 @@ template<ChipType chipType> struct ChipInfo;
#endif


#endif // STM32_H_INCLUDED
#endif // STM32TPL_STM32_H_INCLUDED
6 changes: 3 additions & 3 deletions stm32_dwt.h
Expand Up @@ -28,8 +28,8 @@
*
*/

#ifndef STM32_DWT_H_INCLUDED
#define STM32_DWT_H_INCLUDED
#ifndef STM32TPL_STM32_DWT_H_INCLUDED
#define STM32TPL_STM32_DWT_H_INCLUDED

#include "stm32.h"

Expand Down Expand Up @@ -96,4 +96,4 @@ struct DWT_t

extern DWT_t DWT;

#endif // STM32_DWT_H_INCLUDED
#endif // STM32TPL_STM32_DWT_H_INCLUDED
6 changes: 3 additions & 3 deletions stm32_flash.h
Expand Up @@ -28,8 +28,8 @@
*
*/

#ifndef STM32_FLASH_H_INCLUDED
#define STM32_FLASH_H_INCLUDED
#ifndef STM32TPL_STM32_FLASH_H_INCLUDED
#define STM32TPL_STM32_FLASH_H_INCLUDED

#include "stm32.h"

Expand Down Expand Up @@ -261,4 +261,4 @@ bool Stm32Flash<props>::massErase()
return wait(MASS_ERASE_TIMEOUT);
}

#endif // STM32_FLASH_H_INCLUDED
#endif // STM32TPL_STM32_FLASH_H_INCLUDED
6 changes: 3 additions & 3 deletions stm32_uart.h
Expand Up @@ -28,8 +28,8 @@
*
*/

#ifndef STM32_UART_H_INCLUDED
#define STM32_UART_H_INCLUDED
#ifndef STM32TPL_STM32_UART_H_INCLUDED
#define STM32TPL_STM32_UART_H_INCLUDED

#include "stm32.h"
#include "textstream.h"
Expand Down Expand Up @@ -521,4 +521,4 @@ void Uart<props>::UartIrqHandler()
} // namespace UART
} // namespace STM32

#endif // STM32_UART_H_INCLUDED
#endif // STM32TPL_STM32_UART_H_INCLUDED
6 changes: 3 additions & 3 deletions textbuf.h
Expand Up @@ -33,8 +33,8 @@
*
*/

#ifndef TEXTBUF_H_INCLUDED
#define TEXTBUF_H_INCLUDED
#ifndef STM32TPL_TEXTBUF_H_INCLUDED
#define STM32TPL_TEXTBUF_H_INCLUDED

#include "textstream.h"

Expand Down Expand Up @@ -69,4 +69,4 @@ class TextBuffer: public TextStream
size_t len_;
};

#endif // TEXTBUF_H_INCLUDED
#endif // STM32TPL_TEXTBUF_H_INCLUDED
6 changes: 3 additions & 3 deletions textstream.h
Expand Up @@ -27,8 +27,8 @@
*
*/

#ifndef TEXTSTREAM_H_INCLUDED
#define TEXTSTREAM_H_INCLUDED
#ifndef STM32TPL_TEXTSTREAM_H_INCLUDED
#define STM32TPL_TEXTSTREAM_H_INCLUDED

#include <cstdint>
#include <cstdlib>
Expand Down Expand Up @@ -229,4 +229,4 @@ class TextStream

};

#endif // TEXTSTREAM_H_INCLUDED
#endif // STM32TPL_TEXTSTREAM_H_INCLUDED
4 changes: 2 additions & 2 deletions util.h
Expand Up @@ -28,8 +28,8 @@
*
*/

#ifndef UTIL_H_INCLUDED
#define UTIL_H_INCLUDED
#ifndef STM32TPL_UTIL_H_INCLUDED
#define STM32TPL_UTIL_H_INCLUDED

#include <stdint.h>

Expand Down
6 changes: 3 additions & 3 deletions vars.h
Expand Up @@ -28,8 +28,8 @@
*
*/

#ifndef VARS_H_INCLUDED
#define VARS_H_INCLUDED
#ifndef STM32TPL_VARS_H_INCLUDED
#define STM32TPL_VARS_H_INCLUDED

#include "textstream.h"
#include <string.h>
Expand Down Expand Up @@ -152,4 +152,4 @@ Variable variable_##varName##_object( \
DEFINE_VARIABLE_RO(varName); \
VARIABLE_GET_HANDLER(varName)

#endif // VARS_H_INCLUDED
#endif // STM32TPL_VARS_H_INCLUDED

0 comments on commit 3fe88e2

Please sign in to comment.