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

Cpp compatibility #7

Closed
Closed
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
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/generic/mutex.h>

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

#include <metal/system/generic/mutex.h>

/**
* @brief Initialize a libmetal mutex.
* @param[in] mutex Mutex to initialize.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ static inline struct virtqueue *virtqueue_allocate(unsigned int num_desc_extra)
uint32_t vq_size = sizeof(struct virtqueue) +
num_desc_extra * sizeof(struct vq_desc_extra);

vqs = metal_allocate_memory(vq_size);
vqs = (struct virtqueue*) metal_allocate_memory(vq_size);
if (vqs) {
memset(vqs, 0x00, vq_size);
}
Expand Down
5 changes: 2 additions & 3 deletions Middlewares/Third_Party/OpenAMP/virtual_driver/virt_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
#ifndef __VIRT_UART_H
#define __VIRT_UART_H

/* Includes ------------------------------------------------------------------*/
#include "openamp.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "openamp.h"

/* Exported structures --------------------------------------------------------*/
typedef struct __VIRT_UART_HandleTypeDef
{
Expand Down