stm32: timer/dmamux: fix broken includes
bad Karl, you can't just _start_ using pragma on common files, and expect it to keep working. Just finish, convert them fully to pragma. pros: no more weird @cond boilerplate mess and trailing #endifs. easier to follow cons: no warning for people who deliberately try and include things in bad orders.
This commit is contained in:
parent
1abb945dcd
commit
a499ea3480
|
@ -25,11 +25,7 @@
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @cond */
|
||||
#if defined(LIBOPENCM3_DMAMUX_H)
|
||||
/** @endcond */
|
||||
#ifndef LIBOPENCM3_DMAMUX_COMMON_ALL_H
|
||||
#define LIBOPENCM3_DMAMUX_COMMON_ALL_H
|
||||
#pragma once
|
||||
|
||||
/**@{*/
|
||||
|
||||
|
@ -205,10 +201,3 @@ void dmamux_clear_request_generator_trigger_overrun_interrupt(uint32_t dmamux, u
|
|||
END_DECLS
|
||||
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
/** @cond */
|
||||
#else
|
||||
#warning "dmamux_common_all.h should not be included explicitly, only via dmamux.h"
|
||||
#endif
|
||||
/** @endcond */
|
||||
|
|
|
@ -28,12 +28,7 @@
|
|||
The order of header inclusion is important. timer.h includes the device
|
||||
specific memorymap.h header before including this header file.*/
|
||||
|
||||
/** @cond */
|
||||
#if defined(LIBOPENCM3_TIMER_H)
|
||||
/** @endcond */
|
||||
#ifndef LIBOPENCM3_TIMER_COMMON_H
|
||||
#define LIBOPENCM3_TIMER_COMMON_H
|
||||
|
||||
#pragma once
|
||||
/* --- Convenience macros -------------------------------------------------- */
|
||||
|
||||
/* Timer register base addresses (for convenience) */
|
||||
|
@ -1241,10 +1236,4 @@ void timer_slave_set_trigger(uint32_t timer, uint8_t trigger);
|
|||
|
||||
END_DECLS
|
||||
|
||||
#endif
|
||||
/** @cond */
|
||||
#else
|
||||
#warning "timer_common_all.h should not be included directly, only via timer.h"
|
||||
#endif
|
||||
/** @endcond */
|
||||
/**@}*/
|
||||
|
|
|
@ -27,12 +27,7 @@
|
|||
The order of header inclusion is important. timer.h includes the device
|
||||
specific memorymap.h header before including this header file.*/
|
||||
|
||||
/** @cond */
|
||||
#ifdef LIBOPENCM3_TIMER_H
|
||||
/** @endcond */
|
||||
#ifndef LIBOPENCM3_TIMER_COMMON_F24_H
|
||||
#define LIBOPENCM3_TIMER_COMMON_F24_H
|
||||
|
||||
#pragma once
|
||||
#include <libopencm3/stm32/common/timer_common_all.h>
|
||||
|
||||
/*
|
||||
|
@ -104,11 +99,3 @@ void timer_ic_set_polarity(uint32_t timer, enum tim_ic_id ic,
|
|||
enum tim_ic_pol pol);
|
||||
|
||||
END_DECLS
|
||||
|
||||
#endif
|
||||
/** @cond */
|
||||
#else
|
||||
#warning "timer_common_f24.h should not be included directly, only via timer.h"
|
||||
#endif
|
||||
/** @endcond */
|
||||
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_TIMER_H
|
||||
#define LIBOPENCM3_TIMER_H
|
||||
#pragma once
|
||||
|
||||
#include <libopencm3/stm32/common/timer_common_f24.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -32,8 +32,7 @@ LGPL License Terms @ref lgpl_license
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_TIMER_H
|
||||
#define LIBOPENCM3_TIMER_H
|
||||
#pragma once
|
||||
|
||||
#include <libopencm3/stm32/common/timer_common_all.h>
|
||||
|
||||
|
@ -52,5 +51,3 @@ void timer_ic_set_polarity(uint32_t timer,
|
|||
enum tim_ic_pol pol);
|
||||
|
||||
END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -31,9 +31,5 @@ LGPL License Terms @ref lgpl_license
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_TIMER_H
|
||||
#define LIBOPENCM3_TIMER_H
|
||||
|
||||
#pragma once
|
||||
#include <libopencm3/stm32/common/timer_common_f24.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -31,9 +31,5 @@
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_TIMER_H
|
||||
#define LIBOPENCM3_TIMER_H
|
||||
|
||||
#pragma once
|
||||
#include <libopencm3/stm32/common/timer_common_f24.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -31,9 +31,5 @@ LGPL License Terms @ref lgpl_license
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_TIMER_H
|
||||
#define LIBOPENCM3_TIMER_H
|
||||
|
||||
#pragma once
|
||||
#include <libopencm3/stm32/common/timer_common_f24.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -30,13 +30,5 @@ LGPL License Terms @ref lgpl_license
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_TIMER_H
|
||||
#define LIBOPENCM3_TIMER_H
|
||||
|
||||
#pragma once
|
||||
#include <libopencm3/stm32/common/timer_common_all.h>
|
||||
|
||||
BEGIN_DECLS
|
||||
|
||||
END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,8 +29,7 @@
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_DMAMUX_H
|
||||
#define LIBOPENCM3_DMAMUX_H
|
||||
#pragma once
|
||||
/**@{*/
|
||||
|
||||
#include <libopencm3/stm32/common/dmamux_common_all.h>
|
||||
|
@ -169,4 +168,3 @@
|
|||
/**@}*/
|
||||
|
||||
/**@}*/
|
||||
#endif
|
||||
|
|
|
@ -27,9 +27,7 @@
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_TIMER_H
|
||||
#define LIBOPENCM3_TIMER_H
|
||||
|
||||
#pragma once
|
||||
#include <libopencm3/stm32/common/timer_common_all.h>
|
||||
|
||||
/**@{*/
|
||||
|
@ -70,5 +68,3 @@ BEGIN_DECLS
|
|||
END_DECLS
|
||||
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
|
|
|
@ -27,9 +27,5 @@
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_TIMER_H
|
||||
#define LIBOPENCM3_TIMER_H
|
||||
|
||||
#pragma once
|
||||
#include <libopencm3/stm32/common/timer_common_f24.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,13 +21,5 @@ LGPL License Terms @ref lgpl_license
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_TIMER_H
|
||||
#define LIBOPENCM3_TIMER_H
|
||||
|
||||
#pragma once
|
||||
#include <libopencm3/stm32/common/timer_common_all.h>
|
||||
|
||||
BEGIN_DECLS
|
||||
|
||||
END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -33,7 +33,6 @@ LGPL License Terms @ref lgpl_license
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libopencm3/stm32/common/timer_common_all.h>
|
||||
|
||||
/**@{*/
|
||||
|
@ -96,4 +95,3 @@ LGPL License Terms @ref lgpl_license
|
|||
#define TIM22_OR_TI1_RMP_COMP1_OUT (2 << TIM22_OR_TI1_RMP_SHIFT)
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
|
|
@ -32,9 +32,7 @@ LGPL License Terms @ref lgpl_license
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_TIMER_H
|
||||
#define LIBOPENCM3_TIMER_H
|
||||
|
||||
#pragma once
|
||||
#include <libopencm3/stm32/common/timer_common_all.h>
|
||||
|
||||
/**@{*/
|
||||
|
@ -84,5 +82,3 @@ void timer_set_option(uint32_t timer_peripheral, uint32_t option);
|
|||
END_DECLS
|
||||
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
|
|
|
@ -32,13 +32,5 @@ LGPL License Terms @ref lgpl_license
|
|||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_TIMER_H
|
||||
#define LIBOPENCM3_TIMER_H
|
||||
|
||||
#pragma once
|
||||
#include <libopencm3/stm32/common/timer_common_all.h>
|
||||
|
||||
BEGIN_DECLS
|
||||
|
||||
END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue