blob: a4f7a3b4b9193775cbba34c64d6fd9d7b1c40e3e [file] [log] [blame]
Kevin Peng62a87112020-07-07 15:07:46 +08001/*
Raef Colese1a8c9f2021-06-09 14:11:34 +01002 * Copyright (c) 2017-2021, Arm Limited. All rights reserved.
Kevin Peng62a87112020-07-07 15:07:46 +08003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __TEST_FRAMEWORK_HELPERS_H__
9#define __TEST_FRAMEWORK_HELPERS_H__
10
11#include <stdint.h>
Kevin Peng62a87112020-07-07 15:07:46 +080012#include "test_framework.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18enum serial_color_t {
Raef Colese1a8c9f2021-06-09 14:11:34 +010019 DEFAULT = 0,
20 BLACK = 30,
21 RED = 31,
22 GREEN = 32,
23 YELLOW = 33,
24 BLUE = 34,
25 MAGENDA = 35,
26 CYAN = 36,
27 WHITE = 37,
Kevin Peng62a87112020-07-07 15:07:46 +080028};
29
30/**
31 * \brief Translates asset permissions into a string.
32 *
33 * \param[in] permissions Asset permissions value.
34 *
35 * \return asset permissions as string.
36 */
37const char *asset_perms_to_str(uint8_t permissions);
38
39/**
40 * \brief Sets the the text color in the serial port.
41 *
42 * \param[in] color_id Serial foreground color.
43 *
44 * \return 0 if the message is send successfully, 1 otherwise.
45 */
46void printf_set_color(enum serial_color_t color_id);
47
48#ifdef __cplusplus
49}
50#endif
51
52#endif /* __TEST_FRAMEWORK_HELPERS_H__ */