David Hu | 1a74bc5 | 2021-08-19 11:17:42 +0800 | [diff] [blame] | 1 | /* |
David Hu | d44a0bd | 2022-01-18 14:51:35 +0800 | [diff] [blame] | 2 | * Copyright (c) 2021-2022, Arm Limited. All rights reserved. |
David Hu | 1a74bc5 | 2021-08-19 11:17:42 +0800 | [diff] [blame] | 3 | * |
4 | * SPDX-License-Identifier: BSD-3-Clause | ||||
5 | * | ||||
6 | */ | ||||
7 | |||||
8 | #ifndef __TEST_LOG_H__ | ||||
9 | #define __TEST_LOG_H__ | ||||
10 | |||||
Raef Coles | 4817eb8 | 2022-01-18 12:33:24 +0000 | [diff] [blame] | 11 | #ifdef USE_SP_LOG |
David Hu | 1a74bc5 | 2021-08-19 11:17:42 +0800 | [diff] [blame] | 12 | #include "tfm_sp_log.h" |
Kevin Peng | 33f4f7d | 2023-11-15 17:35:48 +0800 | [diff] [blame] | 13 | #elif defined USE_STDIO |
14 | #include <stdio.h> | ||||
Raef Coles | 4817eb8 | 2022-01-18 12:33:24 +0000 | [diff] [blame] | 15 | #else |
16 | #include "tfm_log_raw.h" | ||||
17 | #endif /* USE_SP_LOG */ | ||||
David Hu | 1a74bc5 | 2021-08-19 11:17:42 +0800 | [diff] [blame] | 18 | |
19 | #ifdef __cplusplus | ||||
20 | extern "C" { | ||||
21 | #endif | ||||
22 | |||||
Kevin Peng | 33f4f7d | 2023-11-15 17:35:48 +0800 | [diff] [blame] | 23 | #if defined USE_SP_LOG || USE_STDIO |
Ken Liu | a3d6be4 | 2022-09-29 11:12:20 +0800 | [diff] [blame] | 24 | #define TEST_LOG(...) printf(__VA_ARGS__) |
Raef Coles | 4817eb8 | 2022-01-18 12:33:24 +0000 | [diff] [blame] | 25 | #else |
26 | #define TEST_LOG(...) tfm_log_printf(__VA_ARGS__) | ||||
27 | #endif /* USE_SP_LOG */ | ||||
David Hu | 1a74bc5 | 2021-08-19 11:17:42 +0800 | [diff] [blame] | 28 | |
29 | #ifdef __cplusplus | ||||
30 | } | ||||
31 | #endif | ||||
32 | |||||
33 | #endif /* __TEST_LOG_H__ */ |