From b3cbb07566a54504bfbd2e77ae340665614509ac Mon Sep 17 00:00:00 2001 From: Azim Khan Date: Mon, 5 Jun 2017 13:21:19 +0100 Subject: [PATCH] Merge greentea-client/test_env_c.h into greentea-client/test_env.h --- .../greentea-client/test_env.h | 23 +++++++++++-- .../greentea-client/test_env_c.h | 34 ------------------- 2 files changed, 20 insertions(+), 37 deletions(-) delete mode 100644 features/frameworks/greentea-client/greentea-client/test_env_c.h diff --git a/features/frameworks/greentea-client/greentea-client/test_env.h b/features/frameworks/greentea-client/greentea-client/test_env.h index bde8aad785..293878ffae 100644 --- a/features/frameworks/greentea-client/greentea-client/test_env.h +++ b/features/frameworks/greentea-client/greentea-client/test_env.h @@ -21,6 +21,7 @@ #ifndef GREENTEA_CLIENT_TEST_ENV_H_ #define GREENTEA_CLIENT_TEST_ENV_H_ +#ifdef __cplusplus #ifdef YOTTA_GREENTEA_CLIENT_VERSION_STRING #define MBED_GREENTEA_CLIENT_VERSION_STRING YOTTA_GREENTEA_CLIENT_VERSION_STRING #else @@ -28,9 +29,6 @@ #endif #include -extern "C" { -#include "test_env_c.h" -} /** * Auxilary macros @@ -106,6 +104,25 @@ void greentea_notify_coverage_start(const char *path); void greentea_notify_coverage_end(); #endif // MBED_CFG_DEBUG_OPTIONS_COVERAGE +#endif // __cplusplus + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Greentea-client C API + */ +void GREENTEA_SETUP(const int timeout, const char * host_test); +void greentea_send_kv(const char * key, const char * val); +int greentea_parse_kv(char * key, char * val, + const int key_len, const int val_len); +int greentea_getc(); + +#ifdef __cplusplus +} +#endif + #endif // GREENTEA_CLIENT_TEST_ENV_H_ /** @}*/ diff --git a/features/frameworks/greentea-client/greentea-client/test_env_c.h b/features/frameworks/greentea-client/greentea-client/test_env_c.h deleted file mode 100644 index 352b749b66..0000000000 --- a/features/frameworks/greentea-client/greentea-client/test_env_c.h +++ /dev/null @@ -1,34 +0,0 @@ -/** \addtogroup frameworks */ -/** @{*/ -/* - * Copyright (c) 2013-2017, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_ENV_C_H -#define TEST_ENV_C_H - - -/** - * Greentea-client C API for communication with host side - */ -void GREENTEA_SETUP(const int timeout, const char * host_test); -void greentea_send_kv(const char * key, const char * val); -int greentea_parse_kv(char * key, char * val, - const int key_len, const int val_len); -int greentea_getc(); - -#endif /* TEST_ENV_C_H */ -