Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: fix compilation error with gcc++ #190

Merged
merged 1 commit into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ static inline void *metal_allocate_memory(unsigned int size);
*/
static inline void metal_free_memory(void *ptr);

#include <metal/system/@PROJECT_SYSTEM@/alloc.h>

/** @} */

#ifdef __cplusplus
}
#endif

#include <metal/system/@PROJECT_SYSTEM@/alloc.h>

#endif /* __METAL_ALLOC__H__ */
4 changes: 2 additions & 2 deletions lib/condition.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ static inline int metal_condition_broadcast(struct metal_condition *cv);
*/
int metal_condition_wait(struct metal_condition *cv, metal_mutex_t *m);

#include <metal/system/@PROJECT_SYSTEM@/condition.h>

/** @} */

#ifdef __cplusplus
}
#endif

#include <metal/system/@PROJECT_SYSTEM@/condition.h>

#endif /* __METAL_CONDITION__H__ */
6 changes: 3 additions & 3 deletions lib/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#ifndef __METAL_DMA__H__
#define __METAL_DMA__H__

#include <stdint.h>
#include <metal/sys.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -20,9 +23,6 @@ extern "C" {
* @{
*/

#include <stdint.h>
#include <metal/sys.h>

#define METAL_DMA_DEV_R 1 /**< DMA direction, device read */
#define METAL_DMA_DEV_W 2 /**< DMA direction, device write */
#define METAL_DMA_DEV_WR 3 /**< DMA direction, device read/write */
Expand Down
4 changes: 2 additions & 2 deletions lib/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,12 @@ int metal_io_block_write(struct metal_io_region *io, unsigned long offset,
int metal_io_block_set(struct metal_io_region *io, unsigned long offset,
unsigned char value, int len);

#include <metal/system/@PROJECT_SYSTEM@/io.h>

/** @} */

#ifdef __cplusplus
}
#endif

#include <metal/system/@PROJECT_SYSTEM@/io.h>

#endif /* __METAL_IO__H__ */
6 changes: 3 additions & 3 deletions lib/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#ifndef __METAL_IRQ__H__
#define __METAL_IRQ__H__

#include <metal/list.h>
#include <stdlib.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -20,9 +23,6 @@ extern "C" {
* @{
*/

#include <metal/list.h>
#include <stdlib.h>

/** IRQ handled status */
#define METAL_IRQ_NOT_HANDLED 0
#define METAL_IRQ_HANDLED 1
Expand Down
4 changes: 2 additions & 2 deletions lib/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#ifndef __METAL_MUTEX__H__
#define __METAL_MUTEX__H__

#include <metal/system/@PROJECT_SYSTEM@/mutex.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -20,8 +22,6 @@ extern "C" {
* @{
*/

#include <metal/system/@PROJECT_SYSTEM@/mutex.h>

/**
* @brief Initialize a libmetal mutex.
* @param[in] mutex Mutex to initialize.
Expand Down
4 changes: 2 additions & 2 deletions lib/softirq.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#ifndef __METAL_SOFTIRQ__H__
#define __METAL_SOFTIRQ__H__

#include <metal/irq.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -20,8 +22,6 @@ extern "C" {
* @{
*/

#include <metal/irq.h>

/**
* @brief metal_softirq_init
*
Expand Down
6 changes: 3 additions & 3 deletions lib/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#ifndef __METAL_TIME__H__
#define __METAL_TIME__H__

#include <stdint.h>
#include <metal/sys.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -20,9 +23,6 @@ extern "C" {
* @{
*/

#include <stdint.h>
#include <metal/sys.h>

/**
* @brief get timestamp
* This function returns the timestampe as unsigned long long
Expand Down